summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips
diff options
context:
space:
mode:
authorAleksandar Beserminji <Aleksandar.Beserminji@mips.com>2017-11-24 14:00:47 +0000
committerAleksandar Beserminji <Aleksandar.Beserminji@mips.com>2017-11-24 14:00:47 +0000
commit590f0793e8c7f25a7d993031436928823cd2c95a (patch)
treee5c79e6bbd8327ed4c47227190cfdc10dd82b9c4 /llvm/lib/Target/Mips
parentdd2f1c993e1f870fce490e47e5f9ef8acf23ada1 (diff)
downloadbcm5719-llvm-590f0793e8c7f25a7d993031436928823cd2c95a.tar.gz
bcm5719-llvm-590f0793e8c7f25a7d993031436928823cd2c95a.zip
[mips] Set microMIPS ASE flag
This patch fixes an issue where microMIPS ASE flag is not set when a function has micromips attribute or when .set micromips directive is used. Differential Revision: https://reviews.llvm.org/D40316 llvm-svn: 318948
Diffstat (limited to 'llvm/lib/Target/Mips')
-rw-r--r--llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp4
-rw-r--r--llvm/lib/Target/Mips/MipsAsmPrinter.cpp1
2 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
index 8da7dfbd4de..4db5e3c8cca 100644
--- a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
+++ b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
@@ -2273,8 +2273,10 @@ bool MipsAsmParser::processInstruction(MCInst &Inst, SMLoc IDLoc,
// We know we emitted an instruction on the MER_NotAMacro or MER_Success path.
// If we're in microMIPS mode then we must also set EF_MIPS_MICROMIPS.
- if (inMicroMipsMode())
+ if (inMicroMipsMode()) {
TOut.setUsesMicroMips();
+ TOut.updateABIInfo(*this);
+ }
// If this instruction has a delay slot and .set reorder is active,
// emit a NOP after it.
diff --git a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
index c2869bd7ecb..fbf7b5e28b7 100644
--- a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
+++ b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
@@ -361,6 +361,7 @@ void MipsAsmPrinter::EmitFunctionEntryLabel() {
if (Subtarget->inMicroMipsMode()) {
TS.emitDirectiveSetMicroMips();
TS.setUsesMicroMips();
+ TS.updateABIInfo(*Subtarget);
} else
TS.emitDirectiveSetNoMicroMips();
OpenPOWER on IntegriCloud