[PATCH] D103539: RISCV: adjust handling of relocation emission for RISCV
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 15 14:14:14 PDT 2021
MaskRay added inline comments.
================
Comment at: llvm/test/CodeGen/RISCV/fixups-diff.ll:27
+; CHECK: 0x22 R_RISCV_ADD32 - 0x0
+; CHECK: 0x22 R_RISCV_SUB32 - 0x0
+; CHECK: 0x2B R_RISCV_ADD32 - 0x0
----------------
Add `-NEXT:`
Otherwise `CHECK: }` cannot ensure there is no additional ADD/SUB.
================
Comment at: llvm/test/CodeGen/RISCV/fixups-diff.ll:33
+; CHECK: Section {{.*}} .rela.eh_frame {
+; CHECK: 0x1C R_RISCV_32_PCREL - 0x0
+; CHECK: 0x20 R_RISCV_ADD32 - 0x0
----------------
ditto
================
Comment at: llvm/test/MC/RISCV/hilo-constaddr-expr.s:12
tmp2:
-# CHECK-RELAX: :[[@LINE+1]]:{{[0-9]+}}: error: expected relocatable expression
+# CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: expected relocatable expression
lui t0, %hi(tmp3-tmp1)
----------------
nit: `[[@` is deprecated. use `:[[#@LINE+1]]:[[#]]: error: ...`
================
Comment at: llvm/test/MC/RISCV/reloc-addend.s:10
+# CHECK: 0x0 R_RISCV_ADD64 function 0x80
+# CHECK: 0x0 R_RISCV_SUB64 .Ltmp0 0x0
+# CHECK: }
----------------
-NEXT
================
Comment at: llvm/test/MC/RISCV/scoped-relaxation.s:1
+# RUN: llvm-mc -mattr -relax -triple riscv64-unknown-none-elf -filetype obj %s -o - | llvm-readobj -d -r - | FileCheck %s
+
----------------
riscv64-unknown-none-elf can be simplified as `riscv64`
================
Comment at: llvm/test/MC/RISCV/scoped-relaxation.s:30
+# CHECK: 0x10 R_RISCV_ADD64 function 0x0
+# CHECK: 0x10 R_RISCV_SUB64 - 0x0
----------------
To ensure no additional add/sub, add -NEXT and check `}` wherever appropriate
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103539/new/
https://reviews.llvm.org/D103539
More information about the llvm-commits
mailing list