Mercurial > hg > graal-compiler
diff src/share/vm/asm/assembler.hpp @ 2008:2f644f85485d
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
author | twisti |
---|---|
date | Fri, 03 Dec 2010 01:34:31 -0800 |
parents | f95d63e2154a |
children | b92c45f2bc75 |
line wrap: on
line diff
--- a/src/share/vm/asm/assembler.hpp Thu Dec 02 17:21:12 2010 -0800 +++ b/src/share/vm/asm/assembler.hpp Fri Dec 03 01:34:31 2010 -0800 @@ -292,7 +292,16 @@ 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 @@ } 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 @@ } 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.