[mips] Remove redundant setup of less-significant bit. NFC
authorSimon Atanasyan <simon@atanasyan.com>
Wed, 13 Mar 2019 16:00:35 +0000 (16:00 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Wed, 13 Mar 2019 16:00:35 +0000 (16:00 +0000)
The less-significant bit for microMIPS symbols configured
in the `getSymVA` function. Do not need to setup it once again.

llvm-svn: 356058

lld/ELF/Thunks.cpp

index d7150d4..fb371f1 100644 (file)
@@ -636,7 +636,7 @@ InputSection *MipsThunk::getTargetInputSection() const {
 // 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::getTargetInputSection() const {
 // 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)