[PATCH] D39910: [ARM] Issue an eror when non-general-purpose registers used in address operands (alternative)

Momchil Velikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 10 10:58:26 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.
The check are done in the various AsmOperandClass predicates, which seems simple and as the right place to do it, but
the error messages aren't that good as in the alternative patch here:  https://reviews.llvm.org/D39909


https://reviews.llvm.org/D39910

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

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


More information about the llvm-commits mailing list