summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2012-03-27 01:50:08 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2012-03-27 01:50:08 +0000
commitda72819725db2fcb118370489991a746969c782f (patch)
treea10b87860125a2d5d1aa588a0a939a4f2012518e /llvm/lib
parent1453e310fd340b21fde4cb4b9f02956f0486f630 (diff)
downloadbcm5719-llvm-da72819725db2fcb118370489991a746969c782f.tar.gz
bcm5719-llvm-da72819725db2fcb118370489991a746969c782f.zip
Rewrite computation of Value in adjustFixupValue so that the upper 48-bits are
cleared. No functionality change. llvm-svn: 153491
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp b/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
index a92604d26c8..6e8dacefe0e 100644
--- a/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
+++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
@@ -55,7 +55,7 @@ static unsigned adjustFixupValue(unsigned Kind, uint64_t Value) {
case Mips::fixup_Mips_HI16:
case Mips::fixup_Mips_GOT_Local:
// Get the higher 16-bits. Also add 1 if bit 15 is 1.
- Value = (Value >> 16) + ((Value & 0x8000) != 0);
+ Value = ((Value + 0x8000) >> 16) & 0xffff;
break;
}
OpenPOWER on IntegriCloud