src/share/vm/asm/assembler.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6961690 Cdiff src/share/vm/asm/assembler.hpp

src/share/vm/asm/assembler.hpp

Print this page
rev 1838 : 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:

*** 1,7 **** /* ! * Copyright (c) 1997, 2009, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 1997, 2010, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 268,278 **** void end_a_stub(); // Ditto for constants. address start_a_const(int required_space, int required_align = sizeof(double)); void end_a_const(); ! // fp constants support address double_constant(jdouble c) { address ptr = start_a_const(sizeof(c), sizeof(c)); if (ptr != NULL) { *(jdouble*)ptr = c; _code_pos = ptr + sizeof(c); --- 268,287 ---- void end_a_stub(); // Ditto for constants. address start_a_const(int required_space, int required_align = sizeof(double)); void end_a_const(); ! // 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) { *(jdouble*)ptr = c; _code_pos = ptr + sizeof(c);
*** 287,308 **** _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) { relocate(rspec); *(address*)ptr = c; _code_pos = ptr + sizeof(c); end_a_const(); } 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. // The value zero (NULL) stands instead of a constant which is still uncomputed. // Thus, the eventual value of the constant must not be zero. --- 296,324 ---- _code_pos = ptr + sizeof(c); end_a_const(); } 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) { relocate(rspec); *(address*)ptr = c; _code_pos = ptr + sizeof(c); end_a_const(); } return ptr; } // Bootstrapping aid to cope with delayed determination of constants. // Returns a static address which will eventually contain the constant. // The value zero (NULL) stands instead of a constant which is still uncomputed. // Thus, the eventual value of the constant must not be zero.
src/share/vm/asm/assembler.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File