[PATCH] D115591: [VE] Support srel32 in symbol reference
Kazushi Marukawa via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 13 03:29:25 PST 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGcffce86a1cb2: [VE] Support srel32 in symbol reference (authored by kaz7).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115591/new/
https://reviews.llvm.org/D115591
Files:
llvm/lib/Target/VE/MCTargetDesc/VEELFObjectWriter.cpp
llvm/test/MC/VE/sym-lea.s
Index: llvm/test/MC/VE/sym-lea.s
===================================================================
--- /dev/null
+++ llvm/test/MC/VE/sym-lea.s
@@ -0,0 +1,11 @@
+# RUN: llvm-mc -triple=ve %s -o - | FileCheck %s
+# RUN: llvm-mc -triple=ve -filetype=obj %s -o - | llvm-objdump -r - | FileCheck %s --check-prefix=CHECK-OBJ
+
+ lea %s0, tgt
+ lea %s0, tgt2-.
+# CHECK: lea %s0, tgt
+# CHECK-NEXT: [[LABEL:.*]]:
+# CHECK-NEXT: lea %s0, tgt2-[[LABEL]]
+
+# CHECK-OBJ: 0 R_VE_REFLONG tgt
+# CHECK-OBJ: 8 R_VE_SREL32 tgt2
Index: llvm/lib/Target/VE/MCTargetDesc/VEELFObjectWriter.cpp
===================================================================
--- llvm/lib/Target/VE/MCTargetDesc/VEELFObjectWriter.cpp
+++ llvm/lib/Target/VE/MCTargetDesc/VEELFObjectWriter.cpp
@@ -67,6 +67,7 @@
Ctx.reportError(Fixup.getLoc(),
"8-byte pc-relative data relocation is not supported");
return ELF::R_VE_NONE;
+ case VE::fixup_ve_reflong:
case VE::fixup_ve_srel32:
return ELF::R_VE_SREL32;
case VE::fixup_ve_pc_hi32:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115591.393834.patch
Type: text/x-patch
Size: 1067 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211213/ba59dfc1/attachment.bin>
More information about the llvm-commits
mailing list