RFR: 8171537: aarch64: compiler/c1/Test6849574.java generates guarantee failure in C1
Edward Nevill
edward.nevill at gmail.com
Tue Dec 20 21:01:52 UTC 2016
Hi,
Please review the following webrev
http://cr.openjdk.java.net/~enevill/8171537/webrev
JIRA Issue: https://bugs.openjdk.java.net/browse/JDK-8171537
This fixes an issue where the JTreg hotspot test compiler/c1/Test6849574.java fails with a guarantee failure when run with -XX:TieredStopAtLevel=1 to force use of C1.
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (assembler_aarch64.hpp:232), pid=8576, tid=8601
# guarantee(val < (1U << nbits)) failed: Field too big for insn
The problem is the following call in LIR_Assembler::atomic_op in src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
Address addr = as_Address(src->as_address_ptr(), noreg);
(noreg has the value -1)
as_Address looks like
Address LIR_Assembler::as_Address(LIR_Address* addr, Register tmp) {
....
intptr_t addr_offset = intptr_t(addr->disp());
if (Address::offset_ok_for_immed(addr_offset, addr->scale()))
return Address(base, addr_offset, Address::lsl(addr->scale()));
else {
__ mov(tmp, addr_offset); <<<<< tmp is used here, but has value -1
return Address(base, tmp, Address::lsl(addr->scale()));
}
}
The proposed solution is to change the call to
Address addr = as_Address(src->as_address_ptr());
which calls the two argument form with rscratch1 as the tmp register instead of -1.
All the best,
Ed.
More information about the hotspot-compiler-dev
mailing list