summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorTilmann Scheller <t.scheller@samsung.com>2014-07-24 09:55:46 +0000
committerTilmann Scheller <t.scheller@samsung.com>2014-07-24 09:55:46 +0000
commit96ef72e54abff11b81fa53a57e22ab4c5bef27d8 (patch)
tree02d833448ee544639c0cc3f474114d820ea89075 /llvm/test
parentbdcfab117c7b7c4408ab5d9a304c054299984dff (diff)
downloadbcm5719-llvm-96ef72e54abff11b81fa53a57e22ab4c5bef27d8.tar.gz
bcm5719-llvm-96ef72e54abff11b81fa53a57e22ab4c5bef27d8.zip
[ARM] Make the assembler reject unpredictable pre/post-indexed ARM STRH instructions.
The ARM ARM prohibits STRH instructions with writeback into the source register. With this commit this constraint is now enforced and we stop assembling STRH instructions with unpredictable behavior. llvm-svn: 213850
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/MC/ARM/diagnostics.s16
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/MC/ARM/diagnostics.s b/llvm/test/MC/ARM/diagnostics.s
index 25eb6f227a6..83af10d2091 100644
--- a/llvm/test/MC/ARM/diagnostics.s
+++ b/llvm/test/MC/ARM/diagnostics.s
@@ -496,6 +496,10 @@ foo2:
str r0, [r0, r1]!
str r0, [r0], #4
str r0, [r0], r1
+ strh r0, [r0, #2]!
+ strh r0, [r0, r1]!
+ strh r0, [r0], #2
+ strh r0, [r0], r1
strb r0, [r0, #1]!
strb r0, [r0, r1]!
strb r0, [r0], #1
@@ -513,6 +517,18 @@ foo2:
@ CHECK-ERRORS: str r0, [r0], r1
@ CHECK-ERRORS: ^
@ CHECK-ERRORS: error: source register and base register can't be identical
+@ CHECK-ERRORS: strh r0, [r0, #2]!
+@ CHECK-ERRORS: ^
+@ CHECK-ERRORS: error: source register and base register can't be identical
+@ CHECK-ERRORS: strh r0, [r0, r1]!
+@ CHECK-ERRORS: ^
+@ CHECK-ERRORS: error: source register and base register can't be identical
+@ CHECK-ERRORS: strh r0, [r0], #2
+@ CHECK-ERRORS: ^
+@ CHECK-ERRORS: error: source register and base register can't be identical
+@ CHECK-ERRORS: strh r0, [r0], r1
+@ CHECK-ERRORS: ^
+@ CHECK-ERRORS: error: source register and base register can't be identical
@ CHECK-ERRORS: strb r0, [r0, #1]!
@ CHECK-ERRORS: ^
@ CHECK-ERRORS: error: source register and base register can't be identical
OpenPOWER on IntegriCloud