RFR: 8284681: compiler/c2/aarch64/TestFarJump.java fails with "RuntimeException: for CodeHeap < 250MB the far jump is expected to be encoded with a single branch instruction"
Boris Ulasevich
bulasevich at openjdk.java.net
Thu Apr 14 16:58:56 UTC 2022
Recently [introduced](https://bugs.openjdk.java.net/browse/JDK-8280872) TestFarJump.java test checks the PrintAssembly output for ADRP instruction. Test fails intermittently when the subsequent raw address is similar to the ADRP instruction encoding. With this fix, the test is fixed to only check the first instruction of the exception handler to avoid false positives.
False positive case, the raw pointer is disassembled as ADRP instruction:
[Exception Handler]
0x0000fffdd3940410: ; {runtime_call handle_exception_from_callee Runtime1 stub}
0x0000fffdd3940410: 5c50 8695 | c1d5 bbd4 | 78be 56f0 | fdff 0000
Disassembly:
0x0000000000000000: 5C 50 86 95 bl #0x6194170
0x0000000000000004: C1 D5 BB D4 dcps1 #0xdeae
0x0000000000000008: 78 BE 56 F0 adrp x24, #0xad7cf000
0x000000000000000c: FC FF 00 00 n/a
The row pointer (above) is pointer to "should not reach here" chars:
void MacroAssembler::stop(const char* msg) {
BLOCK_COMMENT(msg);
dcps1(0xdeae);
emit_int64((uintptr_t)msg);
}
void should_not_reach_here() { stop("should not reach here"); }
int LIR_Assembler::emit_exception_handler() {
...
__ far_call(RuntimeAddress(Runtime1::entry_for(Runtime1::handle_exception_from_callee_id)));
__ should_not_reach_here();
}
-------------
Commit messages:
- 8284681: compiler/c2/aarch64/TestFarJump.java fails with "RuntimeException: for CodeHeap < 250MB the far jump is expected to be encoded with a single branch instruction"
Changes: https://git.openjdk.java.net/jdk/pull/8223/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8223&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8284681
Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod
Patch: https://git.openjdk.java.net/jdk/pull/8223.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/8223/head:pull/8223
PR: https://git.openjdk.java.net/jdk/pull/8223
More information about the hotspot-compiler-dev
mailing list