[PATCH] D81457: [LLD][PowerPC] Add support for R_PPC64_PCREL34

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 16 15:24:01 PDT 2020


MaskRay added inline comments.


================
Comment at: lld/ELF/Arch/PPC64.cpp:1004
+  case R_PPC64_PCREL34: {
+    uint64_t si0Mask = 0x00000003FFFF0000;
+    uint64_t si1Mask = 0x000000000000FFFF;
----------------
Nit: Lower-case hexadecimals are more common.

(I know that there are a few places in this file where upper-case hexadecimals are inconsistently used)


================
Comment at: lld/test/ELF/ppc64-pcrel34-reloc.s:20
+# SYMBOL:      1001018c     4 NOTYPE  LOCAL  DEFAULT     2 glob_int
+.section .GLOB_INT_PCREL,"ax", at progbits
+	plwa 3, glob_int at PCREL(0), 1
----------------
Instead of a `.section`, it is better using a label. You'll then able to use `CHECK-NEXT`:

```
# CHECK:      <foo>:
# CHECK-NEXT:   plwa 3, 12(0), 1
```


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81457/new/

https://reviews.llvm.org/D81457





More information about the llvm-commits mailing list