Skip to content

Commit

Permalink
AArch64: Call redoTrampolineReservationIfNecessary() event if label i…
Browse files Browse the repository at this point in the history
…s not null

The commit changes `TR::ARM64ImmSymInstruction::generateBinaryEncoding` to
call `redoTrampolineReservationIfNecessary()` even if label is not null,
which happens when a direct call is done through a snippet.

Signed-off-by: Akira Saitoh <saiaki@jp.ibm.com>
  • Loading branch information
Akira Saitoh committed Sep 13, 2021
1 parent fa7d68b commit 06bf6db
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions compiler/aarch64/codegen/ARM64BinaryEncoding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ uint8_t *TR::ARM64ImmSymInstruction::generateBinaryEncoding()

TR::ResolvedMethodSymbol *sym = symRef->getSymbol()->getResolvedMethodSymbol();

if (cg()->hasCodeCacheSwitched())
{
cg()->redoTrampolineReservationIfNecessary(this, symRef);
}
if (cg()->comp()->isRecursiveMethodTarget(sym))
{
intptr_t jitToJitStart = cg()->getLinkage()->entryPointFromCompiledMethod();
Expand All @@ -143,11 +147,6 @@ uint8_t *TR::ARM64ImmSymInstruction::generateBinaryEncoding()
{
TR::MethodSymbol *method = symRef->getSymbol()->getMethodSymbol();

if (cg()->hasCodeCacheSwitched())
{
cg()->redoTrampolineReservationIfNecessary(this, symRef);
}

if (method && method->isHelper())
{
intptr_t destination = (intptr_t)symRef->getMethodAddress();
Expand Down

0 comments on commit 06bf6db

Please sign in to comment.