[lld] r255451 - [ELF][MIPS] Fix calculation of the R_MIPS_HI16 relocation
Simon Atanasyan via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 14 22:10:54 PST 2015
On Mon, Dec 14, 2015 at 11:51 PM, Rui Ueyama <ruiu at google.com> wrote:
> On Sat, Dec 12, 2015 at 10:49 PM, Simon Atanasyan via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
>>
>> Author: atanasyan
>> Date: Sun Dec 13 00:49:01 2015
>> New Revision: 255451
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=255451&view=rev
>> Log:
>> [ELF][MIPS] Fix calculation of the R_MIPS_HI16 relocation
>>
>> Modified:
>> lld/trunk/ELF/Target.cpp
>> lld/trunk/test/ELF/mips-hilo.s
>>
>> Modified: lld/trunk/ELF/Target.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=255451&r1=255450&r2=255451&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/ELF/Target.cpp (original)
>> +++ lld/trunk/ELF/Target.cpp Sun Dec 13 00:49:01 2015
>> @@ -1287,6 +1287,8 @@ bool MipsTargetInfo<ELFT>::relocNeedsPlt
>> return false;
>> }
>>
>> +static uint16_t mipsHigh(uint64_t V) { return ((V + 0x8000) >> 16) &
>> 0xffff; }
>
>
> You don't need &0xffff since this function returns a uint16_t value.
Thanks. Fixed at r255622.
--
Simon Atanasyan
More information about the llvm-commits
mailing list