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

Igor Veresov igor.veresov at oracle.com
Thu May 26 03:02:23 PDT 2011


On 5/26/11 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()

I think you're right!

Thanks,
igor


More information about the hotspot-compiler-dev mailing list