[lld] r356058 - [mips] Remove redundant setup of less-significant bit. NFC

Simon Atanasyan via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 13 09:00:36 PDT 2019


Author: atanasyan
Date: Wed Mar 13 09:00:35 2019
New Revision: 356058

URL: http://llvm.org/viewvc/llvm-project?rev=356058&view=rev
Log:
[mips] Remove redundant setup of less-significant bit. NFC

The less-significant bit for microMIPS symbols configured
in the `getSymVA` function. Do not need to setup it once again.

Modified:
    lld/trunk/ELF/Thunks.cpp

Modified: lld/trunk/ELF/Thunks.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Thunks.cpp?rev=356058&r1=356057&r2=356058&view=diff
==============================================================================
--- lld/trunk/ELF/Thunks.cpp (original)
+++ lld/trunk/ELF/Thunks.cpp Wed Mar 13 09:00:35 2019
@@ -636,7 +636,7 @@ InputSection *MipsThunk::getTargetInputS
 // Write microMIPS R2-R5 LA25 thunk code
 // to call PIC function from the non-PIC one.
 void MicroMipsThunk::writeTo(uint8_t *Buf) {
-  uint64_t S = Destination.getVA() | 1;
+  uint64_t S = Destination.getVA();
   write16(Buf, 0x41b9);       // lui   $25, %hi(func)
   write16(Buf + 4, 0xd400);   // j     func
   write16(Buf + 8, 0x3339);   // addiu $25, $25, %lo(func)
@@ -660,7 +660,7 @@ InputSection *MicroMipsThunk::getTargetI
 // Write microMIPS R6 LA25 thunk code
 // to call PIC function from the non-PIC one.
 void MicroMipsR6Thunk::writeTo(uint8_t *Buf) {
-  uint64_t S = Destination.getVA() | 1;
+  uint64_t S = Destination.getVA();
   uint64_t P = getThunkTargetSym()->getVA();
   write16(Buf, 0x1320);       // lui   $25, %hi(func)
   write16(Buf + 4, 0x3339);   // addiu $25, $25, %lo(func)




More information about the llvm-commits mailing list