review (XS): 7047491: C1: registers saved incorrectly when calling checkcast_arraycopy stub
Tom Rodriguez
tom.rodriguez at oracle.com
Thu May 26 09:39:55 PDT 2011
On May 26, 2011, at 2:38 AM, Roland Westrelin wrote:
>> 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()
My fuzzy memory said it was something like that. Thanks for confirming. Looks good.
tom
>
> Roland.
More information about the hotspot-compiler-dev
mailing list