Skip to content

Commit

Permalink
Correct arm64 SignExtension (#110635)
Browse files Browse the repository at this point in the history
* correct arm64 SignExtension

* check for the 28th bit
  • Loading branch information
mikelle-rogers authored Dec 12, 2024
1 parent f0e64f5 commit 43b89b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/coreclr/debug/ee/arm64/walker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 43b89b4

Please sign in to comment.