Skip to content

Commit 43b89b4

Browse files
Correct arm64 SignExtension (#110635)
* correct arm64 SignExtension * check for the 28th bit
1 parent f0e64f5 commit 43b89b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/coreclr/debug/ee/arm64/walker.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,9 @@ BOOL NativeWalker::DecodePCRelativeBranchInst(PT_CONTEXT context, const PRD_TYP
278278
{
279279
offset = (opcode & 0x03FFFFFF) << 2;
280280
// Sign extension
281-
if ((offset & 0x4000000)) //Check for 26'st bit
281+
if ((offset & 0x8000000)) //Check for (26 + 2)'st bit
282282
{
283-
offset = offset | 0xFFFFFFFFF8000000;
283+
offset = offset | 0xFFFFFFFFF0000000;
284284
}
285285

286286
if ((opcode & 0x80000000) != 0) //BL

0 commit comments

Comments
 (0)