From 21de4e55b8fa2ba138338ec82c159897ab3d4233 Mon Sep 17 00:00:00 2001 From: Boris Ulasevich Date: Sat, 16 Apr 2022 05:57:00 +0000 Subject: [PATCH] 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" Reviewed-by: kvn --- test/hotspot/jtreg/compiler/c2/aarch64/TestFarJump.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/hotspot/jtreg/compiler/c2/aarch64/TestFarJump.java b/test/hotspot/jtreg/compiler/c2/aarch64/TestFarJump.java index df6bb1436a3..f47331a6d80 100644 --- a/test/hotspot/jtreg/compiler/c2/aarch64/TestFarJump.java +++ b/test/hotspot/jtreg/compiler/c2/aarch64/TestFarJump.java @@ -74,9 +74,9 @@ public class TestFarJump { } int dump = (int)Long.parseLong(match, 16); int encoding = Integer.reverseBytes(dump); - if (isADRP(encoding)) { - return true; - } + // Check the first instruction only. The raw pointer can be confused with the encoded adrp instruction: + // emit_exception_handler() = far_call() + should_not_reach_here() = ADRP + ADD + BLR + DCPS1 + raw_pointer + return isADRP(encoding); } return false; }