[aarch64-port-dev ] Fix overflow on field offsets
Edward Nevill
edward.nevill at linaro.org
Tue Mar 11 15:46:09 UTC 2014
Hi,
The following patch fixes a problem encountered in the JDK JTREG test sun/nio/cs/OLD/TestIBMDB.java which generates a guarantee failure due to the offset being too large for an ldr instruction.
$ /home/ed/images/j2sdk-server-release/bin/java -version
openjdk version "1.8.0-internal"
OpenJDK Runtime Environment (build 1.8.0-internal-ed_2014_02_28_16_19-b00)
OpenJDK 64-Bit Server VM (build 25.0-b69, mixed mode)
$ /home/ed/images/j2sdk-server-release/bin/java TestIBMDB
...
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (assembler_aarch64.hpp:257), pid=6511, tid=547116085744
# guarantee(chk == -1 || chk == 0) failed: Field too big for insn
#
Regards,
Ed.
--- CUT HERE ---
exporting patch:
# HG changeset patch
# User Edward Nevill edward.nevill at linaro.org
# Date 1394552661 0
# Tue Mar 11 15:44:21 2014 +0000
# Node ID 939480aaf1b23f1013de7bca05dd6a2c3cef3430
# Parent a6537e63b117b13eaa108f2a1931e1ce6cf44122
Fix problem with field offsets overflowing
diff -r a6537e63b117 -r 939480aaf1b2 src/cpu/aarch64/vm/aarch64.ad
--- a/src/cpu/aarch64/vm/aarch64.ad Mon Mar 10 08:08:30 2014 -0400
+++ b/src/cpu/aarch64/vm/aarch64.ad Tue Mar 11 15:44:21 2014 +0000
@@ -1812,7 +1812,7 @@
}
if (index == -1) {
- (masm.*insn)(reg, Address(base, disp));
+ (masm.*insn)(reg, masm.form_address(rscratch1, base, disp, 0));
} else {
if (disp == 0) {
(masm.*insn)(reg, Address(base, as_Register(index), scale));
@@ -1841,7 +1841,7 @@
}
if (index == -1) {
- (masm.*insn)(reg, Address(base, disp));
+ (masm.*insn)(reg, masm.form_address(rscratch1, base, disp, 0));
} else {
if (disp == 0) {
(masm.*insn)(reg, Address(base, as_Register(index), scale));
--- CUT HERE ---
More information about the aarch64-port-dev
mailing list