summaryrefslogtreecommitdiff
path: root/lib/MC/MCExpr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MC/MCExpr.cpp')
-rw-r--r--lib/MC/MCExpr.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/MC/MCExpr.cpp b/lib/MC/MCExpr.cpp
index 3c022199145fb..0e4174a7a4c94 100644
--- a/lib/MC/MCExpr.cpp
+++ b/lib/MC/MCExpr.cpp
@@ -559,6 +559,11 @@ static void AttemptToFoldSymbolOffsetDifference(
if (Asm->isThumbFunc(&SA))
Addend |= 1;
+ // If symbol is labeled as micromips, we set low-bit to ensure
+ // correct offset in .gcc_except_table
+ if (Asm->getBackend().isMicroMips(&SA))
+ Addend |= 1;
+
// Clear the symbol expr pointers to indicate we have folded these
// operands.
A = B = nullptr;