[PATCH] D149443: [ARM] add Thumb-1 8-bit movs/adds relocations to LLVM

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 16 09:34:30 PDT 2023


MaskRay added inline comments.


================
Comment at: llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp:1244
+    int64_t Value = CE->getValue();
+    return Value >= 0 && Value < 256;
+  }
----------------
`isUInt<8>(Value)`.

Can the limit be tested?


================
Comment at: llvm/test/MC/ARM/thumb-8-bit-relocs.s:1
+@ RUN: llvm-mc -triple thumbv6m-eabi -filetype asm -o - %s | FileCheck %s
+@ RUN: llvm-mc -triple thumbv6m-eabi -filetype obj -o - %s | llvm-readobj -r - \
----------------
`-filetype asm` can be omitted.


================
Comment at: llvm/test/MC/ARM/thumb-8-bit-relocs.s:31
+@ CHECK-RELOCATIONS: Relocations [
+@ CHECK-RELOCATIONS:     0x2 R_ARM_THM_ALU_ABS_G3 function
+@ CHECK-RELOCATIONS:     0x4 R_ARM_THM_ALU_ABS_G2_NC function
----------------
Add `-NEXT` whenever applicable to test that there is no other relocation.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149443



More information about the cfe-commits mailing list