diff options
author | Jim Grosbach <grosbach@apple.com> | 2012-06-22 23:56:48 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2012-06-22 23:56:48 +0000 |
commit | 70c9bf3c1a77b5707c92a7cfe74104c320480391 (patch) | |
tree | d0d2b02ab5d5f896404da77f350dea2c77617910 /test | |
parent | 4dbfdfba6c92b6224bf58364371569f5780844d3 (diff) | |
download | external_llvm-70c9bf3c1a77b5707c92a7cfe74104c320480391.zip external_llvm-70c9bf3c1a77b5707c92a7cfe74104c320480391.tar.gz external_llvm-70c9bf3c1a77b5707c92a7cfe74104c320480391.tar.bz2 |
ARM: Add a better diagnostic for some out of range immediates.
As an example of how the custom DiagnosticType can be used to provide
better operand-mismatch diagnostics, add a custom diagnostic for
the imm0_15 operand class used for several system instructions.
Update the tests to expect the improved diagnostic.
rdar://8987109
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159051 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/MC/ARM/diagnostics.s | 12 | ||||
-rw-r--r-- | test/MC/ARM/thumb2-diagnostics.s | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/test/MC/ARM/diagnostics.s b/test/MC/ARM/diagnostics.s index 117c851..499e055 100644 --- a/test/MC/ARM/diagnostics.s +++ b/test/MC/ARM/diagnostics.s @@ -70,8 +70,8 @@ dbg #-1 dbg #16 -@ CHECK-ERRORS: error: invalid operand for instruction -@ CHECK-ERRORS: error: invalid operand for instruction +@ CHECK-ERRORS: error: immediate operand must be in the range [0,15] +@ CHECK-ERRORS: error: immediate operand must be in the range [0,15] @ Double-check that we're synced up with the right diagnostics. @ CHECK-ERRORS: dbg #16 @@ -86,8 +86,8 @@ @ CHECK-ERRORS: error: invalid operand for instruction @ CHECK-ERRORS: error: invalid operand for instruction @ CHECK-ERRORS: error: invalid operand for instruction -@ CHECK-ERRORS: error: invalid operand for instruction -@ CHECK-ERRORS: error: invalid operand for instruction +@ CHECK-ERRORS: error: immediate operand must be in the range [0,15] +@ CHECK-ERRORS: error: immediate operand must be in the range [0,15] @ Out of range immediate for MOV @@ -115,8 +115,8 @@ @ CHECK-ERRORS: error: invalid operand for instruction @ CHECK-ERRORS: error: invalid operand for instruction @ CHECK-ERRORS: error: invalid operand for instruction -@ CHECK-ERRORS: error: invalid operand for instruction -@ CHECK-ERRORS: error: invalid operand for instruction +@ CHECK-ERRORS: error: immediate operand must be in the range [0,15] +@ CHECK-ERRORS: error: immediate operand must be in the range [0,15] @ Shifter operand validation for PKH instructions. pkhbt r2, r2, r3, lsl #-1 diff --git a/test/MC/ARM/thumb2-diagnostics.s b/test/MC/ARM/thumb2-diagnostics.s index e38f53c..d94c686 100644 --- a/test/MC/ARM/thumb2-diagnostics.s +++ b/test/MC/ARM/thumb2-diagnostics.s @@ -40,5 +40,5 @@ @ CHECK-ERRORS: error: invalid operand for instruction @ CHECK-ERRORS: error: invalid operand for instruction @ CHECK-ERRORS: error: invalid operand for instruction -@ CHECK-ERRORS: error: invalid operand for instruction -@ CHECK-ERRORS: error: invalid operand for instruction +@ CHECK-ERRORS: error: immediate operand must be in the range [0,15] +@ CHECK-ERRORS: error: immediate operand must be in the range [0,15] |