diff options
author | twisti <none@none> | 2010-12-03 01:34:31 -0800 |
---|---|---|
committer | twisti <none@none> | 2010-12-03 01:34:31 -0800 |
commit | 7519ccef5207260cf08b6719d6f15a0dec23f01a (patch) | |
tree | 18754063293c32ad2ef1540da2417c0327196480 /src/share/vm/asm/assembler.hpp | |
parent | 8d885e9a6cc86571bcf87be42bcabcfe9f4a60fd (diff) |
6961690: load oops from constant table on SPARC
Summary: oops should be loaded from the constant table of an nmethod instead of materializing them with a long code sequence.
Reviewed-by: never, kvn
Diffstat (limited to 'src/share/vm/asm/assembler.hpp')
-rw-r--r-- | src/share/vm/asm/assembler.hpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/share/vm/asm/assembler.hpp b/src/share/vm/asm/assembler.hpp index 04d84c437..0b3544e69 100644 --- a/src/share/vm/asm/assembler.hpp +++ b/src/share/vm/asm/assembler.hpp @@ -292,7 +292,16 @@ class AbstractAssembler : public ResourceObj { address start_a_const(int required_space, int required_align = sizeof(double)); void end_a_const(); - // fp constants support + // constants support + address long_constant(jlong c) { + address ptr = start_a_const(sizeof(c), sizeof(c)); + if (ptr != NULL) { + *(jlong*)ptr = c; + _code_pos = ptr + sizeof(c); + end_a_const(); + } + return ptr; + } address double_constant(jdouble c) { address ptr = start_a_const(sizeof(c), sizeof(c)); if (ptr != NULL) { @@ -311,6 +320,15 @@ class AbstractAssembler : public ResourceObj { } return ptr; } + address address_constant(address c) { + address ptr = start_a_const(sizeof(c), sizeof(c)); + if (ptr != NULL) { + *(address*)ptr = c; + _code_pos = ptr + sizeof(c); + end_a_const(); + } + return ptr; + } address address_constant(address c, RelocationHolder const& rspec) { address ptr = start_a_const(sizeof(c), sizeof(c)); if (ptr != NULL) { @@ -321,8 +339,6 @@ class AbstractAssembler : public ResourceObj { } return ptr; } - inline address address_constant(Label& L); - inline address address_table_constant(GrowableArray<Label*> label); // Bootstrapping aid to cope with delayed determination of constants. // Returns a static address which will eventually contain the constant. |