aboutsummaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
authorjiangli <none@none>2012-06-06 14:33:43 -0400
committerjiangli <none@none>2012-06-06 14:33:43 -0400
commit46ee878b61d93984d60bef7bccd9ac412c4b8752 (patch)
treeba5e22d8fd2e6b726424450f40e9a10bcd694c07 /src/cpu
parent75cbda45455e027d781fd95ea3677244a5861630 (diff)
7172967: Eliminate constMethod's _method backpointer to methodOop.
Summary: Eliminate constMethod's _method backpointer to methodOop, and move the _constant field from methodOop to constMethod. Reviewed-by: roland, bdelsart, kamg
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/sparc/vm/cppInterpreter_sparc.cpp18
-rw-r--r--src/cpu/sparc/vm/interp_masm_sparc.cpp10
-rw-r--r--src/cpu/sparc/vm/interp_masm_sparc.hpp3
-rw-r--r--src/cpu/sparc/vm/templateInterpreter_sparc.cpp11
-rw-r--r--src/cpu/x86/vm/cppInterpreter_x86.cpp16
-rw-r--r--src/cpu/x86/vm/interp_masm_x86_32.hpp5
-rw-r--r--src/cpu/x86/vm/interp_masm_x86_64.hpp11
-rw-r--r--src/cpu/x86/vm/templateInterpreter_x86_32.cpp13
-rw-r--r--src/cpu/x86/vm/templateInterpreter_x86_64.cpp13
9 files changed, 65 insertions, 35 deletions
diff --git a/src/cpu/sparc/vm/cppInterpreter_sparc.cpp b/src/cpu/sparc/vm/cppInterpreter_sparc.cpp
index f85d4e331..6736f5c0a 100644
--- a/src/cpu/sparc/vm/cppInterpreter_sparc.cpp
+++ b/src/cpu/sparc/vm/cppInterpreter_sparc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -490,7 +490,8 @@ address InterpreterGenerator::generate_accessor_entry(void) {
ConstantPoolCacheEntry::size()) * BytesPerWord), G1_scratch);
// get constant pool cache
- __ ld_ptr(G5_method, in_bytes(methodOopDesc::constants_offset()), G3_scratch);
+ __ ld_ptr(G5_method, in_bytes(methodOopDesc::const_offset()), G3_scratch);
+ __ ld_ptr(G3_scratch, in_bytes(constMethodOopDesc::constants_offset()), G3_scratch);
__ ld_ptr(G3_scratch, constantPoolOopDesc::cache_offset_in_bytes(), G3_scratch);
// get specific constant pool cache entry
@@ -768,7 +769,8 @@ address InterpreterGenerator::generate_native_entry(bool synchronized) {
// for static methods insert the mirror argument
const int mirror_offset = in_bytes(Klass::java_mirror_offset());
- __ ld_ptr(Address(G5_method, 0, in_bytes(methodOopDesc:: constants_offset())), O1);
+ __ ld_ptr(Address(G5_method, 0, in_bytes(methodOopDesc:: const_offset())), O1);
+ __ ld_ptr(Address(O1, 0, in_bytes(constMethodOopDesc::constants_offset())), O1);
__ ld_ptr(Address(O1, 0, constantPoolOopDesc::pool_holder_offset_in_bytes()), O1);
__ ld_ptr(O1, mirror_offset, O1);
// where the mirror handle body is allocated:
@@ -1047,7 +1049,7 @@ void CppInterpreterGenerator::generate_compute_interpreter_state(const Register
assert_different_registers(state, prev_state);
assert_different_registers(prev_state, G3_scratch);
const Register Gtmp = G3_scratch;
- const Address constants (G5_method, 0, in_bytes(methodOopDesc::constants_offset()));
+ const Address constMethod (G5_method, 0, in_bytes(methodOopDesc::const_offset()));
const Address access_flags (G5_method, 0, in_bytes(methodOopDesc::access_flags_offset()));
const Address size_of_parameters(G5_method, 0, in_bytes(methodOopDesc::size_of_parameters_offset()));
const Address max_stack (G5_method, 0, in_bytes(methodOopDesc::max_stack_offset()));
@@ -1155,7 +1157,8 @@ void CppInterpreterGenerator::generate_compute_interpreter_state(const Register
__ set((int) BytecodeInterpreter::method_entry, O1);
__ st(O1, XXX_STATE(_msg));
- __ ld_ptr(constants, O3);
+ __ ld_ptr(constMethod, O3);
+ __ ld_ptr(O3, in_bytes(constMethodOopDesc::constants_offset()), O3);
__ ld_ptr(O3, constantPoolOopDesc::cache_offset_in_bytes(), O2);
__ st_ptr(O2, XXX_STATE(_constants));
@@ -1178,7 +1181,8 @@ void CppInterpreterGenerator::generate_compute_interpreter_state(const Register
__ ld_ptr(XXX_STATE(_locals), O1);
__ br( Assembler::zero, true, Assembler::pt, got_obj);
__ delayed()->ld_ptr(O1, 0, O1); // get receiver for not-static case
- __ ld_ptr(constants, O1);
+ __ ld_ptr(constMethod, O1);
+ __ ld_ptr( O1, in_bytes(constMethodOopDesc::constants_offset()), O1);
__ ld_ptr( O1, constantPoolOopDesc::pool_holder_offset_in_bytes(), O1);
// lock the mirror, not the klassOop
__ ld_ptr( O1, mirror_offset, O1);
@@ -1536,7 +1540,7 @@ address InterpreterGenerator::generate_normal_entry(bool synchronized) {
const Register Gtmp1 = G3_scratch;
// const Register Lmirror = L1; // native mirror (native calls only)
- const Address constants (G5_method, 0, in_bytes(methodOopDesc::constants_offset()));
+ const Address constMethod (G5_method, 0, in_bytes(methodOopDesc::const_offset()));
const Address access_flags (G5_method, 0, in_bytes(methodOopDesc::access_flags_offset()));
const Address size_of_parameters(G5_method, 0, in_bytes(methodOopDesc::size_of_parameters_offset()));
const Address max_stack (G5_method, 0, in_bytes(methodOopDesc::max_stack_offset()));
diff --git a/src/cpu/sparc/vm/interp_masm_sparc.cpp b/src/cpu/sparc/vm/interp_masm_sparc.cpp
index 8e3b919cf..eee214841 100644
--- a/src/cpu/sparc/vm/interp_masm_sparc.cpp
+++ b/src/cpu/sparc/vm/interp_masm_sparc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -934,8 +934,14 @@ void InterpreterMacroAssembler::index_check(Register array, Register index, int
}
+void InterpreterMacroAssembler::get_const(Register Rdst) {
+ ld_ptr(Lmethod, in_bytes(methodOopDesc::const_offset()), Rdst);
+}
+
+
void InterpreterMacroAssembler::get_constant_pool(Register Rdst) {
- ld_ptr(Lmethod, in_bytes(methodOopDesc::constants_offset()), Rdst);
+ get_const(Rdst);
+ ld_ptr(Rdst, in_bytes(constMethodOopDesc::constants_offset()), Rdst);
}
diff --git a/src/cpu/sparc/vm/interp_masm_sparc.hpp b/src/cpu/sparc/vm/interp_masm_sparc.hpp
index 8e05e9a1e..4732bf0a6 100644
--- a/src/cpu/sparc/vm/interp_masm_sparc.hpp
+++ b/src/cpu/sparc/vm/interp_masm_sparc.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -205,6 +205,7 @@ class InterpreterMacroAssembler: public MacroAssembler {
void index_check(Register array, Register index, int index_shift, Register tmp, Register res);
void index_check_without_pop(Register array, Register index, int index_shift, Register tmp, Register res);
+ void get_const(Register Rdst);
void get_constant_pool(Register Rdst);
void get_constant_pool_cache(Register Rdst);
void get_cpool_and_tags(Register Rcpool, Register Rtags);
diff --git a/src/cpu/sparc/vm/templateInterpreter_sparc.cpp b/src/cpu/sparc/vm/templateInterpreter_sparc.cpp
index 98028af0e..e5f0df08c 100644
--- a/src/cpu/sparc/vm/templateInterpreter_sparc.cpp
+++ b/src/cpu/sparc/vm/templateInterpreter_sparc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -371,7 +371,8 @@ void InterpreterGenerator::lock_method(void) {
__ br( Assembler::zero, true, Assembler::pt, done);
__ delayed()->ld_ptr(Llocals, Interpreter::local_offset_in_bytes(0), O0); // get receiver for not-static case
- __ ld_ptr( Lmethod, in_bytes(methodOopDesc::constants_offset()), O0);
+ __ ld_ptr( Lmethod, in_bytes(methodOopDesc::const_offset()), O0);
+ __ ld_ptr( O0, in_bytes(constMethodOopDesc::constants_offset()), O0);
__ ld_ptr( O0, constantPoolOopDesc::pool_holder_offset_in_bytes(), O0);
// lock the mirror, not the klassOop
@@ -670,7 +671,8 @@ address InterpreterGenerator::generate_accessor_entry(void) {
ConstantPoolCacheEntry::size()) * BytesPerWord), G1_scratch);
// get constant pool cache
- __ ld_ptr(G5_method, methodOopDesc::constants_offset(), G3_scratch);
+ __ ld_ptr(G5_method, methodOopDesc::const_offset(), G3_scratch);
+ __ ld_ptr(G3_scratch, constMethodOopDesc::constants_offset(), G3_scratch);
__ ld_ptr(G3_scratch, constantPoolOopDesc::cache_offset_in_bytes(), G3_scratch);
// get specific constant pool cache entry
@@ -993,7 +995,8 @@ address InterpreterGenerator::generate_native_entry(bool synchronized) {
// for static methods insert the mirror argument
const int mirror_offset = in_bytes(Klass::java_mirror_offset());
- __ ld_ptr(Lmethod, methodOopDesc:: constants_offset(), O1);
+ __ ld_ptr(Lmethod, methodOopDesc:: const_offset(), O1);
+ __ ld_ptr(O1, constMethodOopDesc::constants_offset(), O1);
__ ld_ptr(O1, constantPoolOopDesc::pool_holder_offset_in_bytes(), O1);
__ ld_ptr(O1, mirror_offset, O1);
#ifdef ASSERT
diff --git a/src/cpu/x86/vm/cppInterpreter_x86.cpp b/src/cpu/x86/vm/cppInterpreter_x86.cpp
index b9a5c2293..022af0452 100644
--- a/src/cpu/x86/vm/cppInterpreter_x86.cpp
+++ b/src/cpu/x86/vm/cppInterpreter_x86.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -481,7 +481,8 @@ void CppInterpreterGenerator::generate_compute_interpreter_state(const Register
__ xorptr(rdx, rdx);
__ movptr(STATE(_oop_temp), rdx); // state->_oop_temp = NULL (only really needed for native)
__ movptr(STATE(_mdx), rdx); // state->_mdx = NULL
- __ movptr(rdx, Address(rbx, methodOopDesc::constants_offset()));
+ __ movptr(rdx, Address(rbx, methodOopDesc::const_offset()));
+ __ movptr(rdx, Address(rdx, constMethodOopDesc::constants_offset()));
__ movptr(rdx, Address(rdx, constantPoolOopDesc::cache_offset_in_bytes()));
__ movptr(STATE(_constants), rdx); // state->_constants = constants()
@@ -516,7 +517,8 @@ void CppInterpreterGenerator::generate_compute_interpreter_state(const Register
__ testl(rax, JVM_ACC_STATIC);
__ movptr(rax, Address(locals, 0)); // get receiver (assume this is frequent case)
__ jcc(Assembler::zero, done);
- __ movptr(rax, Address(rbx, methodOopDesc::constants_offset()));
+ __ movptr(rax, Address(rbx, methodOopDesc::const_offset()));
+ __ movptr(rax, Address(rax, constMethodOopDesc::constants_offset()));
__ movptr(rax, Address(rax, constantPoolOopDesc::pool_holder_offset_in_bytes()));
__ movptr(rax, Address(rax, mirror_offset));
__ bind(done);
@@ -769,7 +771,8 @@ void InterpreterGenerator::lock_method(void) {
__ testl(rax, JVM_ACC_STATIC);
__ movptr(rax, Address(rdi, 0)); // get receiver (assume this is frequent case)
__ jcc(Assembler::zero, done);
- __ movptr(rax, Address(rbx, methodOopDesc::constants_offset()));
+ __ movptr(rax, Address(rbx, methodOopDesc::const_offset()));
+ __ movptr(rax, Address(rax, constMethodOopDesc::constants_offset()));
__ movptr(rax, Address(rax, constantPoolOopDesc::pool_holder_offset_in_bytes()));
__ movptr(rax, Address(rax, mirror_offset));
__ bind(done);
@@ -821,9 +824,9 @@ address InterpreterGenerator::generate_accessor_entry(void) {
__ testptr(rax, rax);
__ jcc(Assembler::zero, slow_path);
- __ movptr(rdi, Address(rbx, methodOopDesc::constants_offset()));
// read first instruction word and extract bytecode @ 1 and index @ 2
__ movptr(rdx, Address(rbx, methodOopDesc::const_offset()));
+ __ movptr(rdi, Address(rdx, constMethodOopDesc::constants_offset()));
__ movl(rdx, Address(rdx, constMethodOopDesc::codes_offset()));
// Shift codes right to get the index on the right.
// The bytecode fetched looks like <index><0xb4><0x2a>
@@ -1185,7 +1188,8 @@ address InterpreterGenerator::generate_native_entry(bool synchronized) {
__ testl(t, JVM_ACC_STATIC);
__ jcc(Assembler::zero, L);
// get mirror
- __ movptr(t, Address(method, methodOopDesc:: constants_offset()));
+ __ movptr(t, Address(method, methodOopDesc:: const_offset()));
+ __ movptr(t, Address(t, constMethodOopDesc::constants_offset()));
__ movptr(t, Address(t, constantPoolOopDesc::pool_holder_offset_in_bytes()));
__ movptr(t, Address(t, mirror_offset));
// copy mirror into activation object
diff --git a/src/cpu/x86/vm/interp_masm_x86_32.hpp b/src/cpu/x86/vm/interp_masm_x86_32.hpp
index 97f1da41f..458325765 100644
--- a/src/cpu/x86/vm/interp_masm_x86_32.hpp
+++ b/src/cpu/x86/vm/interp_masm_x86_32.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -77,7 +77,8 @@ class InterpreterMacroAssembler: public MacroAssembler {
// Helpers for runtime call arguments/results
void get_method(Register reg) { movptr(reg, Address(rbp, frame::interpreter_frame_method_offset * wordSize)); }
- void get_constant_pool(Register reg) { get_method(reg); movptr(reg, Address(reg, methodOopDesc::constants_offset())); }
+ void get_const(Register reg) { get_method(reg); movptr(reg, Address(reg, methodOopDesc::const_offset())); }
+ void get_constant_pool(Register reg) { get_const(reg); movptr(reg, Address(reg, constMethodOopDesc::constants_offset())); }
void get_constant_pool_cache(Register reg) { get_constant_pool(reg); movptr(reg, Address(reg, constantPoolOopDesc::cache_offset_in_bytes())); }
void get_cpool_and_tags(Register cpool, Register tags) { get_constant_pool(cpool); movptr(tags, Address(cpool, constantPoolOopDesc::tags_offset_in_bytes()));
}
diff --git a/src/cpu/x86/vm/interp_masm_x86_64.hpp b/src/cpu/x86/vm/interp_masm_x86_64.hpp
index cb17e01fa..8486c348b 100644
--- a/src/cpu/x86/vm/interp_masm_x86_64.hpp
+++ b/src/cpu/x86/vm/interp_masm_x86_64.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -84,9 +84,14 @@ class InterpreterMacroAssembler: public MacroAssembler {
movptr(reg, Address(rbp, frame::interpreter_frame_method_offset * wordSize));
}
- void get_constant_pool(Register reg) {
+ void get_const(Register reg) {
get_method(reg);
- movptr(reg, Address(reg, methodOopDesc::constants_offset()));
+ movptr(reg, Address(reg, methodOopDesc::const_offset()));
+ }
+
+ void get_constant_pool(Register reg) {
+ get_const(reg);
+ movptr(reg, Address(reg, constMethodOopDesc::constants_offset()));
}
void get_constant_pool_cache(Register reg) {
diff --git a/src/cpu/x86/vm/templateInterpreter_x86_32.cpp b/src/cpu/x86/vm/templateInterpreter_x86_32.cpp
index fda7980d8..da0f66160 100644
--- a/src/cpu/x86/vm/templateInterpreter_x86_32.cpp
+++ b/src/cpu/x86/vm/templateInterpreter_x86_32.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -566,7 +566,8 @@ void InterpreterGenerator::lock_method(void) {
__ testl(rax, JVM_ACC_STATIC);
__ movptr(rax, Address(rdi, Interpreter::local_offset_in_bytes(0))); // get receiver (assume this is frequent case)
__ jcc(Assembler::zero, done);
- __ movptr(rax, Address(rbx, methodOopDesc::constants_offset()));
+ __ movptr(rax, Address(rbx, methodOopDesc::const_offset()));
+ __ movptr(rax, Address(rax, constMethodOopDesc::constants_offset()));
__ movptr(rax, Address(rax, constantPoolOopDesc::pool_holder_offset_in_bytes()));
__ movptr(rax, Address(rax, mirror_offset));
__ bind(done);
@@ -606,7 +607,8 @@ void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call) {
__ push(0);
}
- __ movptr(rdx, Address(rbx, methodOopDesc::constants_offset()));
+ __ movptr(rdx, Address(rbx, methodOopDesc::const_offset()));
+ __ movptr(rdx, Address(rdx, constMethodOopDesc::constants_offset()));
__ movptr(rdx, Address(rdx, constantPoolOopDesc::cache_offset_in_bytes()));
__ push(rdx); // set constant pool cache
__ push(rdi); // set locals pointer
@@ -661,9 +663,9 @@ address InterpreterGenerator::generate_accessor_entry(void) {
__ testptr(rax, rax);
__ jcc(Assembler::zero, slow_path);
- __ movptr(rdi, Address(rbx, methodOopDesc::constants_offset()));
// read first instruction word and extract bytecode @ 1 and index @ 2
__ movptr(rdx, Address(rbx, methodOopDesc::const_offset()));
+ __ movptr(rdi, Address(rdx, constMethodOopDesc::constants_offset()));
__ movl(rdx, Address(rdx, constMethodOopDesc::codes_offset()));
// Shift codes right to get the index on the right.
// The bytecode fetched looks like <index><0xb4><0x2a>
@@ -1026,7 +1028,8 @@ address InterpreterGenerator::generate_native_entry(bool synchronized) {
__ testl(t, JVM_ACC_STATIC);
__ jcc(Assembler::zero, L);
// get mirror
- __ movptr(t, Address(method, methodOopDesc:: constants_offset()));
+ __ movptr(t, Address(method, methodOopDesc:: const_offset()));
+ __ movptr(t, Address(t, constMethodOopDesc::constants_offset()));
__ movptr(t, Address(t, constantPoolOopDesc::pool_holder_offset_in_bytes()));
__ movptr(t, Address(t, mirror_offset));
// copy mirror into activation frame
diff --git a/src/cpu/x86/vm/templateInterpreter_x86_64.cpp b/src/cpu/x86/vm/templateInterpreter_x86_64.cpp
index 2e78cd5aa..bb57b742e 100644
--- a/src/cpu/x86/vm/templateInterpreter_x86_64.cpp
+++ b/src/cpu/x86/vm/templateInterpreter_x86_64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -522,7 +522,8 @@ void InterpreterGenerator::lock_method(void) {
// get receiver (assume this is frequent case)
__ movptr(rax, Address(r14, Interpreter::local_offset_in_bytes(0)));
__ jcc(Assembler::zero, done);
- __ movptr(rax, Address(rbx, methodOopDesc::constants_offset()));
+ __ movptr(rax, Address(rbx, methodOopDesc::const_offset()));
+ __ movptr(rax, Address(rax, constMethodOopDesc::constants_offset()));
__ movptr(rax, Address(rax,
constantPoolOopDesc::pool_holder_offset_in_bytes()));
__ movptr(rax, Address(rax, mirror_offset));
@@ -579,7 +580,8 @@ void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call) {
__ push(0);
}
- __ movptr(rdx, Address(rbx, methodOopDesc::constants_offset()));
+ __ movptr(rdx, Address(rbx, methodOopDesc::const_offset()));
+ __ movptr(rdx, Address(rdx, constMethodOopDesc::constants_offset()));
__ movptr(rdx, Address(rdx, constantPoolOopDesc::cache_offset_in_bytes()));
__ push(rdx); // set constant pool cache
__ push(r14); // set locals pointer
@@ -629,9 +631,9 @@ address InterpreterGenerator::generate_accessor_entry(void) {
__ testptr(rax, rax);
__ jcc(Assembler::zero, slow_path);
- __ movptr(rdi, Address(rbx, methodOopDesc::constants_offset()));
// read first instruction word and extract bytecode @ 1 and index @ 2
__ movptr(rdx, Address(rbx, methodOopDesc::const_offset()));
+ __ movptr(rdi, Address(rdx, constMethodOopDesc::constants_offset()));
__ movl(rdx, Address(rdx, constMethodOopDesc::codes_offset()));
// Shift codes right to get the index on the right.
// The bytecode fetched looks like <index><0xb4><0x2a>
@@ -1020,7 +1022,8 @@ address InterpreterGenerator::generate_native_entry(bool synchronized) {
__ testl(t, JVM_ACC_STATIC);
__ jcc(Assembler::zero, L);
// get mirror
- __ movptr(t, Address(method, methodOopDesc::constants_offset()));
+ __ movptr(t, Address(method, methodOopDesc::const_offset()));
+ __ movptr(t, Address(t, constMethodOopDesc::constants_offset()));
__ movptr(t, Address(t, constantPoolOopDesc::pool_holder_offset_in_bytes()));
__ movptr(t, Address(t, mirror_offset));
// copy mirror into activation frame