[aarch64-port-dev ] 8133352: aarch64: generates constrained unpredictable instructions
Vladimir Kozlov
vladimir.kozlov at oracle.com
Tue Aug 11 16:55:08 UTC 2015
I think it depends how expensive push/pop on arm64.
In c2 generated code you may introduced spills to stack around GetAndAdd code since you use additional register (in
.ad). So you are saving on stack anyway.
On other hand your changes (third temp) are not so big and I think acceptable.
Thanks,
Vladimir
On 8/11/15 8:57 AM, Edward Nevill wrote:
> Hi,
>
> Webrev http://cr.openjdk.java.net/~enevill/8133352/
>
> fixes an issue reported by one of our partners where aarch64 jdk9 is still generating constrained unpredictable instructions.
>
> The two cases being generates are
>
> STXR Rs, Rt, [Rn] where Rs == Rt
>
> and
>
> LDAXP Rt1, Rt2, [Rn] where Rt1 == Rt2 (this case is only generated in the assembler smoke test and is not generated in real code)
>
> On the particular vendors HW the behavior for these instructions is to generate a SIGILL.
>
> Unfortunately the fix for this is non trivial, the reason being that
>
> STXR Rs, Rt, [Rn]
>
> requires Rs != Rt != Rn however we only have 2 scratch registers.
>
> The solution I have adopted is to add an addition temp arg to the routines in macroAssembler and pass down an additional temp from the top level usage, but this involves a non trivial amount of code changes.
>
> The alternative solution would be create a temp by pushing a register on the stack.
>
> I am in the process of testing this but I want to get peoples feedback as to whether this is the right solution or whether there is some better way of doing it.
>
> Thanks for your help,
> Ed.
>
>
More information about the aarch64-port-dev
mailing list