[PATCH] D108769: [lld][Hexagon] Add check for missing predicated TLS reloc
Sid Manning via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 26 08:30:17 PDT 2021
sidneym created this revision.
sidneym added a reviewer: bcain.
Herald added subscribers: arichardson, emaste.
Herald added a reviewer: MaskRay.
sidneym requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
The predicated form was missing, found while building the canadian toolchain.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D108769
Files:
lld/ELF/Arch/Hexagon.cpp
lld/test/ELF/hexagon-tls-le.s
Index: lld/test/ELF/hexagon-tls-le.s
===================================================================
--- lld/test/ELF/hexagon-tls-le.s
+++ lld/test/ELF/hexagon-tls-le.s
@@ -35,6 +35,12 @@
# CHECK: { r4 = #-0x10 }
r4 = #a at TPREL
+# RELOC-NEXT: 0x20 R_HEX_TPREL_32_6_X a 0x0
+# RELOC-NEXT: 0x24 R_HEX_TPREL_16_X a 0x0
+# CHECK: { immext(#0xffffffc0)
+# CHECK-NEXT: if (p0) memw(r0+##0xfffffff0) = r1
+ if (p0) memw(r0+##a at TPREL)=r1
+
.section .tdata,"awT", at progbits
.globl a
.p2align 2
Index: lld/ELF/Arch/Hexagon.cpp
===================================================================
--- lld/ELF/Arch/Hexagon.cpp
+++ lld/ELF/Arch/Hexagon.cpp
@@ -228,6 +228,8 @@
return 0x00df3fe0;
if ((0xff000000 & insn) == 0xb0000000)
return 0x0fe03fe0;
+ if ((0xf0000000 & insn) == 0x40000000)
+ return 0x000020f8;
if (isDuplex(insn))
return 0x03f00000;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108769.368892.patch
Type: text/x-patch
Size: 959 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210826/6348cc9b/attachment.bin>
More information about the llvm-commits
mailing list