diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2012-03-27 01:50:08 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2012-03-27 01:50:08 +0000 |
commit | bca9c25dabbf50923319339ae780d6f916f56bfb (patch) | |
tree | 32395ef74875b7bdfaebecc34804b19e3fa87dc8 /lib/Target/Mips/MCTargetDesc | |
parent | d9eb1d77979f10d0237af22d87789803162044fa (diff) | |
download | external_llvm-bca9c25dabbf50923319339ae780d6f916f56bfb.zip external_llvm-bca9c25dabbf50923319339ae780d6f916f56bfb.tar.gz external_llvm-bca9c25dabbf50923319339ae780d6f916f56bfb.tar.bz2 |
Rewrite computation of Value in adjustFixupValue so that the upper 48-bits are
cleared. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153491 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MCTargetDesc')
-rw-r--r-- | lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp b/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp index a92604d..6e8dace 100644 --- a/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp +++ b/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; } |