From 2c07a1340c42101babe473cfc422c15eb0c5c6c2 Mon Sep 17 00:00:00 2001 From: KONNO Kazuhiro Date: Tue, 14 Apr 2020 00:07:08 +0900 Subject: [PATCH] (0.20.0) AArch64: Call redoTrampolineReservationIfNecessary() This commit adds a call to redoTrampolineReservationIfNecessary() upon hasCodeCacheSwitched() in generateBinaryEncoding() for ARM64ImmSymInstruction. Original PR for master: eclipse/omr#5052 Signed-off-by: KONNO Kazuhiro --- compiler/aarch64/codegen/ARM64BinaryEncoding.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compiler/aarch64/codegen/ARM64BinaryEncoding.cpp b/compiler/aarch64/codegen/ARM64BinaryEncoding.cpp index 6057051e31..fd7d57eb61 100644 --- a/compiler/aarch64/codegen/ARM64BinaryEncoding.cpp +++ b/compiler/aarch64/codegen/ARM64BinaryEncoding.cpp @@ -95,6 +95,12 @@ uint8_t *TR::ARM64ImmSymInstruction::generateBinaryEncoding() else { TR::MethodSymbol *method = symRef->getSymbol()->getMethodSymbol(); + + if (cg()->hasCodeCacheSwitched()) + { + cg()->redoTrampolineReservationIfNecessary(this, symRef); + } + if (method && method->isHelper()) { intptrj_t destination = (intptrj_t)symRef->getMethodAddress();