summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToma Tabacu <toma.tabacu@imgtec.com>2015-04-16 13:37:32 +0000
committerToma Tabacu <toma.tabacu@imgtec.com>2015-04-16 13:37:32 +0000
commit2cc44f50a5644e3ae43a6b0158315981ba87212f (patch)
tree2ce10ae68ac53a6b5450c2d43e1f494d3fe8a917
parenta2f9943cf6e38be92e5a13535066122ff0012e51 (diff)
downloadbcm5719-llvm-2cc44f50a5644e3ae43a6b0158315981ba87212f.tar.gz
bcm5719-llvm-2cc44f50a5644e3ae43a6b0158315981ba87212f.zip
[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 llvm-svn: 235095
-rw-r--r--llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp5
-rw-r--r--llvm/test/MC/Mips/micromips-alias.s12
2 files changed, 14 insertions, 3 deletions
diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp b/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
index ccc019e86aa..cfd56c6a5cd 100644
--- a/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
+++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
@@ -513,9 +513,8 @@ void MipsTargetELFStreamer::emitAssignment(MCSymbol *Symbol,
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);
diff --git a/llvm/test/MC/Mips/micromips-alias.s b/llvm/test/MC/Mips/micromips-alias.s
index c0bf4b3a8e3..256b3b68aa6 100644
--- a/llvm/test/MC/Mips/micromips-alias.s
+++ b/llvm/test/MC/Mips/micromips-alias.s
@@ -14,3 +14,15 @@ f:
nop
.globl bar
bar = f
+
+# CHECK: Name: foo
+# CHECK: Other: 128
+ .type o,@object
+ .set micromips
+o:
+ .insn
+ .word 0x00000000
+ .set nomicromips
+
+ .globl foo
+foo = o
OpenPOWER on IntegriCloud