[aarch64-port-dev ] jdk8: backport of 8177661: AArch64: Incorrect C2 patterns cause system register corruption

Andrew Dinn adinn at redhat.com
Tue Mar 28 10:44:40 UTC 2017


The patch included inline below is against the latest
aarch64-port-dev/jdk8u tree. It backports the upstream jdk9 fix for
JDK-8177661 fixing a critical potential crasher bug.

It has been tested by running java Hello, javac Hello.java and netbeans.

Ok, to push?

regards,


Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander

----- 8<-------- 8<-------- 8<-------- 8<-------- 8<-------- 8<---
# HG changeset patch
# User adinn
# Date 1490695969 14400
#      Tue Mar 28 06:12:49 2017 -0400
# Node ID 142389cae1d354241d0268f610fda174d009e596
# Parent  daf232a19060305db8af63c118ae3e66f8670468
Correct ad rule output register types from iRegX to iRegXNoSp
Backport to jdk8 of JDK9 fix for JDK-8177661

diff -r daf232a19060 -r 142389cae1d3 src/cpu/aarch64/vm/aarch64.ad
--- a/src/cpu/aarch64/vm/aarch64.ad	Mon Jan 23 21:28:30 2017 +0000
+++ b/src/cpu/aarch64/vm/aarch64.ad	Tue Mar 28 06:12:49 2017 -0400
@@ -15152,7 +15152,7 @@
 %}

 instruct string_indexof(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2,
iRegI_R2 cnt2,
-       iRegI_R0 result, iRegI tmp1, iRegI tmp2, iRegI tmp3, iRegI tmp4,
rFlagsReg cr)
+       iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3,
iRegINoSp tmp4, rFlagsReg cr)
 %{
   match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 cnt2)));
   effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2,
@@ -15170,8 +15170,8 @@
 %}

 instruct string_indexof_con(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2,
-                 immI_le_4 int_cnt2, iRegI_R0 result, iRegI tmp1, iRegI
tmp2,
-                 iRegI tmp3, iRegI tmp4, rFlagsReg cr)
+                 immI_le_4 int_cnt2, iRegI_R0 result, iRegINoSp tmp1,
iRegINoSp tmp2,
+                 iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr)
 %{
   match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 int_cnt2)));
   effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1,


More information about the aarch64-port-dev mailing list