[llvm] r235095 - [mips] [IAS] Preserve microMIPS label marking for objects when assigning.
Toma Tabacu
toma.tabacu at imgtec.com
Thu Apr 16 06:37:33 PDT 2015
Author: tomatabacu
Date: Thu Apr 16 08:37:32 2015
New Revision: 235095
URL: http://llvm.org/viewvc/llvm-project?rev=235095&view=rev
Log:
[mips] [IAS] Preserve microMIPS label marking for objects when assigning.
Summary: Previously, this was only happening for functions, but because of .insn, objects can also be marked now.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8007
Modified:
llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
llvm/trunk/test/MC/Mips/micromips-alias.s
Modified: llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp?rev=235095&r1=235094&r2=235095&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp Thu Apr 16 08:37:32 2015
@@ -513,9 +513,8 @@ void MipsTargetELFStreamer::emitAssignme
const MCSymbol &RhsSym =
static_cast<const MCSymbolRefExpr *>(Value)->getSymbol();
MCSymbolData &Data = getStreamer().getOrCreateSymbolData(&RhsSym);
- uint8_t Type = MCELF::GetType(Data);
- if ((Type != ELF::STT_FUNC) ||
- !(MCELF::getOther(Data) & (ELF::STO_MIPS_MICROMIPS >> 2)))
+
+ if (!(MCELF::getOther(Data) & (ELF::STO_MIPS_MICROMIPS >> 2)))
return;
MCSymbolData &SymbolData = getStreamer().getOrCreateSymbolData(Symbol);
Modified: llvm/trunk/test/MC/Mips/micromips-alias.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/micromips-alias.s?rev=235095&r1=235094&r2=235095&view=diff
==============================================================================
--- llvm/trunk/test/MC/Mips/micromips-alias.s (original)
+++ llvm/trunk/test/MC/Mips/micromips-alias.s Thu Apr 16 08:37:32 2015
@@ -14,3 +14,15 @@ f:
nop
.globl bar
bar = f
+
+# CHECK: Name: foo
+# CHECK: Other: 128
+ .type o, at object
+ .set micromips
+o:
+ .insn
+ .word 0x00000000
+ .set nomicromips
+
+ .globl foo
+foo = o
More information about the llvm-commits
mailing list