[llvm] e99d8ad - [MC] [Win64EH] Fix the operator ordering for UOP_SaveFPLRX. NFC.
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 28 13:02:32 PST 2025
Author: Martin Storsjö
Date: 2025-11-28T22:43:18+02:00
New Revision: e99d8adf8d34da521d9243ba225995ac543745df
URL: https://github.com/llvm/llvm-project/commit/e99d8adf8d34da521d9243ba225995ac543745df
DIFF: https://github.com/llvm/llvm-project/commit/e99d8adf8d34da521d9243ba225995ac543745df.diff
LOG: [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.
Added:
Modified:
llvm/lib/MC/MCWin64EH.cpp
Removed:
################################################################################
diff --git a/llvm/lib/MC/MCWin64EH.cpp b/llvm/lib/MC/MCWin64EH.cpp
index 6d146f6cedd6e..a7ce8d527250f 100644
--- a/llvm/lib/MC/MCWin64EH.cpp
+++ b/llvm/lib/MC/MCWin64EH.cpp
@@ -673,7 +673,7 @@ static void ARM64EmitUnwindCode(MCStreamer &streamer,
break;
case Win64EH::UOP_SaveFPLRX:
b = 0x80;
- b |= ((inst.Offset - 1) >> 3) & 0x3F;
+ b |= ((inst.Offset >> 3) - 1) & 0x3F;
streamer.emitInt8(b);
break;
case Win64EH::UOP_SaveFPLR:
More information about the llvm-commits
mailing list