review (XS): 7047491: C1: registers saved incorrectly when calling checkcast_arraycopy stub

Roland Westrelin roland.westrelin at oracle.com
Thu May 26 02:38:46 PDT 2011


> Hm, I just assumed it's there because previous code used it. Now that I
> look at it I don't even see how it worked in 32bit. The space on stack
> is allocated in java_calling_convention() which is called from
> ArrayCopyStub::emit_code(). So even in 32bit there should be only space
> on stack for 3 out of 5 arguments, yet 5 slots are used. Perhaps we get
> it adjusted but I don't see how...

_reserved_argument_area_size in FrameMap is initialized with an argument passed to the constructor. The argument is MAX2(4, hir()->max_stack()) (see Compilation::compile_java_method()). I think that's what guarantees that there's space on the stack for 5 arguments, the number of arguments to System.arraycopy()

Roland.


More information about the hotspot-compiler-dev mailing list