[PATCH] D39909: [ARM] Issue an eror when non-general-purpose registers used in address operands

Momchil Velikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 10 10:53:05 PST 2017


chill created this revision.
Herald added subscribers: kristof.beyls, javed.absar, aemerson.

Currently the assembler  will happily assemble, e.g. `ldr r0, [s0, #12]` and similar.
This patch add checks that only general-purpose registers are used in address operands, shifted registers, and shift amounts.
This is done in the asm parser, as it results in better error messages, compared do doing the check in the various `AsmOperandClass` predicates.


https://reviews.llvm.org/D39909

Files:
  lib/Target/ARM/AsmParser/ARMAsmParser.cpp
  test/MC/ARM/arm-reg-addr-errors.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39909.122475.patch
Type: text/x-patch
Size: 6637 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171110/eebc0d50/attachment.bin>


More information about the llvm-commits mailing list