Skip to content

Commit e99d8ad

Browse files
committed
[MC] [Win64EH] Fix the operator ordering for UOP_SaveFPLRX. NFC.
The encoded offset should be (OffsetInBytes/8)-1 due to an implicit offset of 1. Previously the operator ordering was inverted. As the offset is a multiple of 8, the incorrect operator ordering did produce the right result in all cases anyway.
1 parent 8a2965d commit e99d8ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/MC/MCWin64EH.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ static void ARM64EmitUnwindCode(MCStreamer &streamer,
673673
break;
674674
case Win64EH::UOP_SaveFPLRX:
675675
b = 0x80;
676-
b |= ((inst.Offset - 1) >> 3) & 0x3F;
676+
b |= ((inst.Offset >> 3) - 1) & 0x3F;
677677
streamer.emitInt8(b);
678678
break;
679679
case Win64EH::UOP_SaveFPLR:

0 commit comments

Comments
 (0)