[llvm-commits] [llvm] r153491 - /llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
Akira Hatanaka
ahatanaka at mips.com
Mon Mar 26 18:50:08 PDT 2012
Author: ahatanak
Date: Mon Mar 26 20:50:08 2012
New Revision: 153491
URL: http://llvm.org/viewvc/llvm-project?rev=153491&view=rev
Log:
Rewrite computation of Value in adjustFixupValue so that the upper 48-bits are
cleared. No functionality change.
Modified:
llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
Modified: llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp?rev=153491&r1=153490&r2=153491&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp Mon Mar 26 20:50:08 2012
@@ -55,7 +55,7 @@
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;
}
More information about the llvm-commits
mailing list