summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
diff options
context:
space:
mode:
authorZoran Jovanovic <zoran.jovanovic@imgtec.com>2013-11-04 14:53:22 +0000
committerZoran Jovanovic <zoran.jovanovic@imgtec.com>2013-11-04 14:53:22 +0000
commit8a80aa76c81c2bed7939938ffc6754850bf46488 (patch)
treecc0b25b42f94f85b62ce23223ad5c476917a4ff6 /llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
parentd6f14d98c2ac47d172a3db01a6af04ea11486182 (diff)
downloadbcm5719-llvm-8a80aa76c81c2bed7939938ffc6754850bf46488.tar.gz
bcm5719-llvm-8a80aa76c81c2bed7939938ffc6754850bf46488.zip
Support for microMIPS branch instructions.
llvm-svn: 193992
Diffstat (limited to 'llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp')
-rw-r--r--llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp b/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
index b47bff66f11..3e70b23dccc 100644
--- a/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
+++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
@@ -84,6 +84,10 @@ static unsigned adjustFixupValue(unsigned Kind, uint64_t Value) {
case Mips::fixup_MICROMIPS_26_S1:
Value >>= 1;
break;
+ case Mips::fixup_MICROMIPS_PC16_S1:
+ Value -= 4;
+ Value >>= 1;
+ break;
}
return Value;
@@ -201,6 +205,7 @@ public:
{ "fixup_MICROMIPS_HI16", 0, 16, 0 },
{ "fixup_MICROMIPS_LO16", 0, 16, 0 },
{ "fixup_MICROMIPS_GOT16", 0, 16, 0 },
+ { "fixup_MICROMIPS_PC16_S1", 0, 16, MCFixupKindInfo::FKF_IsPCRel },
{ "fixup_MICROMIPS_CALL16", 0, 16, 0 },
{ "fixup_MICROMIPS_GOT_DISP", 0, 16, 0 },
{ "fixup_MICROMIPS_GOT_PAGE", 0, 16, 0 },
OpenPOWER on IntegriCloud