[PATCH] D97236: [MC][ARM] add .w suffixes for BL (T1) and DBG

David Spickett via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 23 03:09:08 PST 2021


DavidSpickett added a comment.

I couldn't find an official rule for allowing ".w" when the instructions only have 32 bit encodings. However GAS does it and we also allow others such as `AND (immediate)` (see test/MC/ARM/basic-thumb2-instructions.s) so I think it's fine.



================
Comment at: llvm/test/MC/ARM/thumb2-branches.s:103
+@ CHECK: bl	foo                     @ encoding: [A,0xf0'A',A,0xd0'A']
+@ CHECK-NEXT: @   fixup A - offset: 0, value: foo, kind: fixup_arm_thumb_bl
 @ CHECK: bmi.w	#-256                   @ encoding: [0x3f,0xf5,0x80,0xaf]
----------------
You could just use an immediate here and not need to check the relocation emitted.

Also I'd add one with a predicate just to check the alias allows that.

I thought that maybe we should use ".w" in the disassembly, however all bl and dbg are 32 bit encodings so there's no ambiguity here. This matches GAS's behavior too.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97236



More information about the llvm-commits mailing list