[PATCH] D49567: Add R_HEX_B15_PCREL_X relocation
Sid Manning via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 24 08:08:31 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL337829: [ELF][HEXAGON] Add R_HEX_B15_PCREL_X relocation (authored by sidneym, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D49567?vs=156361&id=157040#toc
Repository:
rL LLVM
https://reviews.llvm.org/D49567
Files:
lld/trunk/ELF/Arch/Hexagon.cpp
lld/trunk/test/ELF/hexagon.s
Index: lld/trunk/test/ELF/hexagon.s
===================================================================
--- lld/trunk/test/ELF/hexagon.s
+++ lld/trunk/test/ELF/hexagon.s
@@ -8,6 +8,11 @@
if (p0) jump:nt #_start
# CHECK: if (p0) jump:nt 0x11000
+# R_HEX_B32_PCREL_X
+# R_HEX_B15_PCREL_X
+if (p0) jump:nt ##_start
+# CHECK: if (p0) jump:nt 0x11000
+
# R_HEX_B22_PCREL
call #_start
# CHECK: call 0x11000
Index: lld/trunk/ELF/Arch/Hexagon.cpp
===================================================================
--- lld/trunk/ELF/Arch/Hexagon.cpp
+++ lld/trunk/ELF/Arch/Hexagon.cpp
@@ -54,6 +54,7 @@
const uint8_t *Loc) const {
switch (Type) {
case R_HEX_B15_PCREL:
+ case R_HEX_B15_PCREL_X:
case R_HEX_B22_PCREL:
case R_HEX_B22_PCREL_X:
case R_HEX_B32_PCREL_X:
@@ -72,6 +73,9 @@
case R_HEX_B15_PCREL:
or32le(Loc, applyMask(0x00df20fe, Val >> 2));
break;
+ case R_HEX_B15_PCREL_X:
+ or32le(Loc, applyMask(0x00df20fe, Val & 0x3f));
+ break;
case R_HEX_B22_PCREL:
or32le(Loc, applyMask(0x1ff3ffe, Val >> 2));
break;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49567.157040.patch
Type: text/x-patch
Size: 1094 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180724/1ccca0bc/attachment.bin>
More information about the llvm-commits
mailing list