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

John Brawn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 7 07:09:37 PDT 2023


john.brawn added a comment.

A few comments:

- Please run clang-format on the patch (pre-merge is showing as failed due to this)
- We should have a test to check that we're emitting the right relocation (probably something similar to test/MC/ARM/thumb-movwt-reloc.s)
- There should be something in ARMAsmParser::validateInstruction to check that the expression is valid, like we do for movw/movt, as currently you can do `movs r0, :lower16:some_symbol` and it's accepted and results in a 16-bit mov with a movw relocation.
- Something weird is happening when I try to use these expressions in movs on v7m. If I try to assemble `movs r0, :upper8_15:some_symbol` I get "error: expected relocatable expression", and looking at the `llvm-mc --show-encoding --show-inst-operands` it's selected movs.w instead of 16-bit mov for some reason.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149443



More information about the llvm-commits mailing list