[PATCH] D38053: [AArch64] Implement R_AARCH64_ LD_PREL_LO19

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 14:43:15 PDT 2017


Replying via mail as your review didn't go through phabricator for some reason.

On Tue, Sep 19, 2017 at 2:30 PM, Rafael Avila de Espindola
<rafael.espindola at gmail.com> wrote:
> Davide Italiano via Phabricator <reviews at reviews.llvm.org> writes:
>
>> +# RUN: llvm-mc -filetype=obj -triple=aarch64-linux-none %s -o %t.o
>> +# RUN: llvm-readobj -elf-output-style=GNU %t.o -r | FileCheck %s --check-prefix=RELS
>
> In lld we normally just assume that llvm-mc works. If there is no test
> for this in llvm already we should add it there.
>

Done.

>> Index: ELF/InputSection.cpp
>> ===================================================================
>> --- ELF/InputSection.cpp
>> +++ ELF/InputSection.cpp
>> @@ -471,6 +471,7 @@
>>    case R_AARCH64_PREL32:
>>    case R_AARCH64_PREL64:
>>    case R_AARCH64_ADR_PREL_LO21:
>> +  case R_AARCH64_LD_PREL_LO19:
>>      return P + A;
>
> We are missing a test for this, no? There is not weak undef in the test.
>

Done.

>> +  case R_AARCH64_LD_PREL_LO19:
>> +    checkInt<21>(Loc, Val, Type);
>> +    or32le(Loc, (Val & 0x1FFFFC) << 3);
>> +    break;
>
>
> This is exactly the same as R_AARCH64_CONDBR19, no? Can you use a
> fallthrough?
>

Yes, I can, done.

Thanks,

--
Davide


More information about the llvm-commits mailing list