[PATCH] D31333: ARMAsmParser: clean up of isImmediate functions
Sjoerd Meijer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 3 01:50:35 PDT 2017
SjoerdMeijer updated this revision to Diff 93831.
SjoerdMeijer added a comment.
Thanks for the suggestion!
I have rewritten the patch:
- It is now using immediate AsmOperands so that the range check functions are tablegen'ed.
- Big bonus is that error messages become much more accurate, i.e. instead of a useless "invalid operand" error message it will not say that the immediate operand must in range [x,y], which is why regression tests needed updating.
More tablegen operand descriptions could probably benefit from using immediateAsmOperand, but this is a first good step to get rid of most of the nearly identical range check functions. I will address the remaining immediate operands in next clean ups.
https://reviews.llvm.org/D31333
Files:
lib/Target/ARM/ARMInstrFormats.td
lib/Target/ARM/ARMInstrInfo.td
lib/Target/ARM/ARMInstrThumb.td
lib/Target/ARM/ARMInstrThumb2.td
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
test/MC/ARM/basic-arm-instructions-v8.1a.s
test/MC/ARM/diagnostics.s
test/MC/ARM/negative-immediates-fail.s
test/MC/ARM/negative-immediates-thumb1-fail.s
test/MC/ARM/thumb-diagnostics.s
test/MC/ARM/thumb-not-mclass.s
test/MC/ARM/thumb2-diagnostics.s
test/MC/ARM/udf-arm-diagnostics.s
test/MC/ARM/udf-thumb-2-diagnostics.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31333.93831.patch
Type: text/x-patch
Size: 38251 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170403/9290b767/attachment.bin>
More information about the llvm-commits
mailing list