ELF/AArch64: Refactor R_AARCH64_LDST{8,15,32,64,128}_ABS_LO12_NC Relocations
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 7 Dec 2016 17:31:48 +0000 (17:31 +0000)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 7 Dec 2016 17:31:48 +0000 (17:31 +0000)
commitd719d371566ea21e3060bc0a9d4e6d8c7b63c010
treee2e42c93058d19a79d0f50b24469bdc4556f104f
parentef76b8316406c9d139ee1c40a94afc4b1f587b4d
ELF/AArch64: Refactor R_AARCH64_LDST{8,15,32,64,128}_ABS_LO12_NC Relocations

This patch refactor how to apply the R_AARCH64_LDST{8,16,32,64,128}_ABS_NC
relocations by adding a new function to correct extract the bits expected
by each relocation.  This make is explicit which are the bits range expected
and simplify the code to mask and shift the deriable values.

It also fixes the R_AARCH64_LDST128_ABS_LO12_NC mask, although in pratice
the mask/shift always returns a 16 bytes aligned value.

Checked on AArch64 and with test-suite.

llvm-svn: 288921
lld/ELF/Target.cpp