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"
Vladimir Kozlov
kvn at openjdk.java.net
Thu Apr 14 18:01:32 UTC 2022
On Wed, 13 Apr 2022 12:39:59 GMT, Boris Ulasevich <bulasevich at openjdk.org> wrote:
> 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();
> }
Good.
-------------
Marked as reviewed by kvn (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/8223
More information about the hotspot-compiler-dev
mailing list