[PATCH] D40362: [TableGen][AsmMatcherEmitter] Only choose specific diagnostic for enabled instruction
Simon Dardis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 13 05:40:36 PST 2017
sdardis accepted this revision.
sdardis added a comment.
Second look, this appears alright. We just need the near miss reporting facility to id the multiple errors.
================
Comment at: test/MC/Mips/micromips32r6/invalid-wrong-error.s:10-29
+ teq $8, $9, $2 # CHECK: :[[@LINE]]:15: error: expected 4-bit unsigned immediate
+ teq $8, $9, -1 # CHECK: :[[@LINE]]:15: error: expected 4-bit unsigned immediate
teq $8, $9, 16 # CHECK: :[[@LINE]]:3: error: instruction requires a CPU feature not currently enabled
- tge $8, $9, $2 # CHECK: :[[@LINE]]:15: error: expected 10-bit unsigned immediate
- tge $8, $9, -1 # CHECK: :[[@LINE]]:15: error: expected 10-bit unsigned immediate
+ tge $8, $9, $2 # CHECK: :[[@LINE]]:15: error: expected 4-bit unsigned immediate
+ tge $8, $9, -1 # CHECK: :[[@LINE]]:15: error: expected 4-bit unsigned immediate
tge $8, $9, 16 # CHECK: :[[@LINE]]:3: error: instruction requires a CPU feature not currently enabled
+ tgeu $8, $9, $2 # CHECK: :[[@LINE]]:16: error: expected 4-bit unsigned immediate
----------------
sdardis wrote:
> These all look like improvements.
If a line changed here you can move it from this test file to invalid.s in the same directory.
================
Comment at: test/MC/Mips/target-soft-float.s:271
ldc1 $f2, 16($7)
- # FIXME: LDC1 is correctly rejected but the wrong error message is emitted.
- # 32: :[[@LINE-2]]:19: error: expected memory with 16-bit signed offset
----------------
Restore this line as it is still correct.
================
Comment at: test/MC/Mips/target-soft-float.s:274
lwc1 $f2, 16($7)
- # FIXME: LWC1 is correctly rejected but the wrong error message is emitted.
- # 32: :[[@LINE-2]]:19: error: expected memory with 16-bit signed offset
----------------
Restore this line as it is still correct.
================
Comment at: test/MC/Mips/target-soft-float.s:315
sdc1 $f2, 16($7)
- # FIXME: SDC1 is correctly rejected but the wrong error message is emitted.
- # 32: :[[@LINE-2]]:19: error: expected memory with 16-bit signed offset
----------------
Restore this line as it is still correct.
================
Comment at: test/MC/Mips/target-soft-float.s:326
swc1 $f2, 16($7)
- # FIXME: SWC1 is correctly rejected but the wrong error message is emitted.
- # 32: :[[@LINE-2]]:19: error: expected memory with 16-bit signed offset
----------------
Restore this line as it is still correct.
https://reviews.llvm.org/D40362
More information about the llvm-commits
mailing list