From 43b89b4a40f7642891e48801d56bd706ab717d6b Mon Sep 17 00:00:00 2001 From: mikelle-rogers <45022607+mikelle-rogers@users.noreply.github.com> Date: Thu, 12 Dec 2024 15:23:12 -0800 Subject: [PATCH] Correct arm64 SignExtension (#110635) * correct arm64 SignExtension * check for the 28th bit --- src/coreclr/debug/ee/arm64/walker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreclr/debug/ee/arm64/walker.cpp b/src/coreclr/debug/ee/arm64/walker.cpp index 12b9e3b121b54..ebec232a9afb9 100644 --- a/src/coreclr/debug/ee/arm64/walker.cpp +++ b/src/coreclr/debug/ee/arm64/walker.cpp @@ -278,9 +278,9 @@ BOOL NativeWalker::DecodePCRelativeBranchInst(PT_CONTEXT context, const PRD_TYP { offset = (opcode & 0x03FFFFFF) << 2; // Sign extension - if ((offset & 0x4000000)) //Check for 26'st bit + if ((offset & 0x8000000)) //Check for (26 + 2)'st bit { - offset = offset | 0xFFFFFFFFF8000000; + offset = offset | 0xFFFFFFFFF0000000; } if ((opcode & 0x80000000) != 0) //BL