[PATCH] D51166: Add R_HEX_B13_PCREL relocation support
Sid Manning via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 25 16:17:42 PDT 2018
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rLLD340693: [ELF][HEXAGON] Add R_HEX_B13_PCREL relocation support (authored by sidneym, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D51166?vs=162188&id=162568#toc
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D51166
Files:
ELF/Arch/Hexagon.cpp
test/ELF/hexagon.s
Index: test/ELF/hexagon.s
===================================================================
--- test/ELF/hexagon.s
+++ test/ELF/hexagon.s
@@ -202,3 +202,7 @@
# R_HEX_B9_PCREL_X:
{r0=#1 ; jump ##_start}
# CHECK: jump 0x11000
+
+# R_HEX_B13_PCREL
+if (r0 == #0) jump:t #_start
+# CHECK: if (r0==#0) jump:t 0x11000
Index: ELF/Arch/Hexagon.cpp
===================================================================
--- ELF/Arch/Hexagon.cpp
+++ ELF/Arch/Hexagon.cpp
@@ -55,6 +55,7 @@
switch (Type) {
case R_HEX_B9_PCREL:
case R_HEX_B9_PCREL_X:
+ case R_HEX_B13_PCREL:
case R_HEX_B15_PCREL:
case R_HEX_B15_PCREL_X:
case R_HEX_B22_PCREL:
@@ -160,6 +161,9 @@
case R_HEX_B9_PCREL_X:
or32le(Loc, applyMask(0x003000fe, Val & 0x3f));
break;
+ case R_HEX_B13_PCREL:
+ or32le(Loc, applyMask(0x00202ffe, Val >> 2));
+ break;
case R_HEX_B15_PCREL:
or32le(Loc, applyMask(0x00df20fe, Val >> 2));
break;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51166.162568.patch
Type: text/x-patch
Size: 939 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180825/637a6762/attachment.bin>
More information about the llvm-commits
mailing list