Request for reviews (M): 6934966: JSR 292 add C1 logic for saved SP over MethodHandle calls
Tom Rodriguez
Thomas.Rodriguez at Sun.COM
Mon Mar 15 10:37:38 PDT 2010
I think LIRGenerator::get_method_handle_invoke_SP_save_opr should really be declared in FrameMap instead of down in LIRGenerator since it's a platform invariant. Since it's invariant you don't really have to pass it down all the way through LIRGenerator so this change could be a lot smaller. You could simply do this in c1_LIR.cpp:
+ if (opJavaCall->is_method_handle_invoke()) do_temp(FrameMap::method_handle_saved_sp_opr());
I know we talked about doing it way you've done it but seeing the final webrev I think it can be done much more simply. preserve_SP can just use FrameMap::method_handle_saved_sp_opr() directly as well.
If you want to keep what you have I'm not against that but it's more complicated than it really needs to be.
tom
On Mar 15, 2010, at 9:43 AM, Christian Thalinger wrote:
> http://cr.openjdk.java.net/~twisti/6934966/webrev.01/
>
> The logic for x86 C1 to save the SP over MH calls is pretty straight
> forward which uses the always-callee-saved BP register. On SPARC, and
> maybe other architectures, we need to choose one of the callee-saved
> registers and kill it over MH calls.
>
> This CR adds some logic to support this. It should be pushed before
> SPARC C1 support is pushed since that would break x86 C1.
>
> src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp
> src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp
> src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
> src/cpu/x86/vm/c1_LIRGenerator_x86.cpp
> src/share/vm/c1/c1_LIR.cpp
> src/share/vm/c1/c1_LIR.hpp
> src/share/vm/c1/c1_LIRAssembler.cpp
> src/share/vm/c1/c1_LIRAssembler.hpp
> src/share/vm/c1/c1_LIRGenerator.hpp
> src/share/vm/includeDB_compiler1
>
>
More information about the hotspot-compiler-dev
mailing list