summaryrefslogtreecommitdiff
path: root/lib/MC/MCExpr.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-12-01 15:41:24 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-12-01 15:41:24 +0000
commitd17fea9f4160084012c9596029dfeba3220a5ff3 (patch)
tree7e3aea25e33e59b34dbce3a86580fe0af17efd9d /lib/MC/MCExpr.cpp
parent86392292ee722abb03af4befe2d2c8baaeadaf22 (diff)
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 a4c99a0c1c152..ef6f0041e0c87 100644
--- a/lib/MC/MCExpr.cpp
+++ b/lib/MC/MCExpr.cpp
@@ -524,6 +524,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;