summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp')
-rw-r--r--llvm/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp b/llvm/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp
index b45d9cf621d..d1e3a47f94b 100644
--- a/llvm/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp
+++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp
@@ -44,7 +44,10 @@ void MipsELFStreamer::createPendingLabelRelocs() {
for (auto *L : Labels) {
auto *Label = cast<MCSymbolELF>(L);
getAssembler().registerSymbol(*Label);
- Label->setOther(ELF::STO_MIPS_MICROMIPS);
+ // The "other" values are stored in the last 6 bits of the second byte.
+ // The traditional defines for STO values assume the full byte and thus
+ // the shift to pack it.
+ Label->setOther(ELF::STO_MIPS_MICROMIPS >> 2);
}
}
OpenPOWER on IntegriCloud