[aarch64-port-dev ] RFR: JDK-8203041 : AArch64: fix overflow in immediate cmp/cmn instruction
Joshua Zhu
Joshua.Zhu at arm.com
Tue May 22 07:49:38 UTC 2018
Hi,
Thanks Andrew for detailed explanation. It is helpful for me.
I submit http://cr.openjdk.java.net/~zyao/8203041/webrev.02/ for review.
I think there will be another change to cover all rscratch alias issue mentioned by Andrew. Therefore I do not touch it.
Best Regards,
Joshua
-----Original Message-----
From: Andrew Haley <aph at redhat.com>
Sent: Monday, May 21, 2018 7:45 PM
To: Joshua Zhu <Joshua.Zhu at arm.com>; Dmitrij Pochepko <dmitrij.pochepko at bell-sw.com>; aarch64-port-dev at openjdk.java.net
Cc: nd <nd at arm.com>
Subject: Re: [aarch64-port-dev ] RFR: JDK-8203041 : AArch64: fix overflow in immediate cmp/cmn instruction
Hi,
On 05/21/2018 08:52 AM, Joshua Zhu wrote:
> Thanks for your review.
>
> In my patch I decided not to replace cmp with subs at callsite (in
> generate_large_array_equals()) because imm cmp has accidentally been
> misused for serval times such as
> https://bugs.openjdk.java.net/browse/JDK-8184900
> https://bugs.openjdk.java.net/browse/JDK-8161190
That's a fair point. I have made the same mistake myself.
> I added an assert to ensure that for large imm all callsites do not
> use rscratch1.
Does that help at all? rscratch1 might be live, even if it is not use in the cmp instruction.
> But your suggestion makes sense. Rscratch1 may imports more confusion.
> Let's replace cmp with subs at callsite when this assertion failure
> happens. The only concern is that this depends on engineers be aware
> of immediate bits limitation for imm cmp instruction.
Well, yes. As far as I can see it's a limitation of the instruction set. I can't see any reasonable way to fix it.
Andrew.
More information about the aarch64-port-dev
mailing list