This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH][gold] AArch64: Implement MOVW_UABS_* and MOVW_SABS_* relocations.
- From: Cary Coutant <ccoutant at gmail dot com>
- To: Igor Kudrin <ikudrin at accesssoftek dot com>, Han Shen <shenhan at google dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Tue, 28 Jun 2016 15:18:43 -0700
- Subject: Re: [PATCH][gold] AArch64: Implement MOVW_UABS_* and MOVW_SABS_* relocations.
- Authentication-results: sourceware.org; auth=none
- References: <1466787419528 dot 41306 at accesssoftek dot com> <CAJimCsFmHe2aQSXu5ycME+YwkTusX2d-Xu2ypm6Xr1QOKansBw at mail dot gmail dot com>
[+shenhan this time]
On Tue, Jun 28, 2016 at 3:17 PM, Cary Coutant <ccoutant@gmail.com> wrote:
>> This patch implements R_AARCH64_MOVW_UABS_G* and R_AARCH64_MOVW_SABS_G*
>> relocations for AArch64 target.
>>
>> Best regards,
>> Igor Kudrin
>>
>> ---
>> gold/ChangeLog
>>
>> * aarch64-reloc-property.cc (Rvalue_bit_select_impl): New class.
>> (rvalue_bit_select): Use Rvalue_bit_select_impl.
>> * aarch64-reloc.def (MOVW_UABS_G0, MOVW_UABS_G0_NC, MOVW_UABS_G1,
>> MOVW_UABS_G1_NC, MOVW_UABS_G2, MOVW_UABS_G2_NC, MOVW_UABS_G3,
>> MOVW_SABS_G0, MOVW_SABS_G1, MOVW_SABS_G2): New relocations.
>> * aarch64.cc (Target_aarch64::Scan::local): Add cases for new
>> MOVW_UABS_* and MOVW_SABS_* relocations.
>> (Target_aarch64::Scan::global): Likewise.
>> (Target_aarch64::Relocate::relocate): Add cases and handlings
>> for new MOVW_UABS_* and MOVW_SABS_* relocations.
>> * testsuite/Makefile.am (aarch64_relocs): New test.
>> * testsuite/Makefile.in: Regenerate.
>> * testsuite/aarch64_globals.s: New test source file.
>> * testsuite/aarch64_relocs.s: New test source file.
>> * testsuite/aarch64_relocs.sh: New test script.
>
> + static uint64_t
> + calc(uint64_t x)
> + {
> + return (x & (((uint64_t)1 << (U+1)) - 1)) >> L;
> + }
>
> I know this was the same before your patch, but I'd prefer using
> "1ULL" instead of the C-style cast.
>
> Han, can you take a look at this patch?
>
> -cary