diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-04-08 19:18:07 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-04-08 19:18:07 +0000 |
commit | 40de2b3f1529c23fee5de6e8324a1f023b361765 (patch) | |
tree | e785d6922baec42a3334c1a0d80be946b053a8c7 /test/MC/Disassembler | |
parent | 5b03a3a59aad2beca37829e4d357db592d18de6e (diff) | |
download | external_llvm-40de2b3f1529c23fee5de6e8324a1f023b361765.zip external_llvm-40de2b3f1529c23fee5de6e8324a1f023b361765.tar.gz external_llvm-40de2b3f1529c23fee5de6e8324a1f023b361765.tar.bz2 |
Sanity check the option operand for DMB/DSB.
PR9648
rdar://problem/9257634
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129146 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/Disassembler')
-rw-r--r-- | test/MC/Disassembler/ARM/invalid-DMB-thumb.txt | 16 | ||||
-rw-r--r-- | test/MC/Disassembler/ARM/invalid-DSB-arm.txt | 16 | ||||
-rw-r--r-- | test/MC/Disassembler/ARM/thumb-tests.txt | 6 |
3 files changed, 38 insertions, 0 deletions
diff --git a/test/MC/Disassembler/ARM/invalid-DMB-thumb.txt b/test/MC/Disassembler/ARM/invalid-DMB-thumb.txt new file mode 100644 index 0000000..0a4be68 --- /dev/null +++ b/test/MC/Disassembler/ARM/invalid-DMB-thumb.txt @@ -0,0 +1,16 @@ +# RUN: llvm-mc --disassemble %s -triple=thumb-apple-darwin9 |& grep {invalid instruction encoding} + +# Opcode=1908 Name=t2DMB Format=ARM_FORMAT_THUMBFRM(25) +# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 +# ------------------------------------------------------------------------------------------------- +# | 1: 1: 1: 1| 0: 0: 1: 1| 1: 0: 1: 1| 1: 1: 1: 1| 1: 0: 0: 0| 1: 1: 1: 1| 0: 1: 0: 1| 0: 0: 0: 1| +# ------------------------------------------------------------------------------------------------- +# +# Inst{3-0} encodes the option: SY, ST, ISH, ISHST, NSH, NSHST, OSH, OSHST. +# Reject invalid encodings. +# +# See also A8.6.42 DSB +# All other encodings of option are reserved. It is IMPLEMENTATION DEFINED whether options +# other than SY are implemented. All unsupported and reserved options must execute as a full +# system DSB operation, but software must not rely on this behavior. +0xbf 0xf3 0x51 0x8f diff --git a/test/MC/Disassembler/ARM/invalid-DSB-arm.txt b/test/MC/Disassembler/ARM/invalid-DSB-arm.txt new file mode 100644 index 0000000..afa2baf --- /dev/null +++ b/test/MC/Disassembler/ARM/invalid-DSB-arm.txt @@ -0,0 +1,16 @@ +# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding} + +# Opcode=102 Name=DSB Format=ARM_FORMAT_MISCFRM(26) +# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 +# ------------------------------------------------------------------------------------------------- +# | 1: 1: 1: 1| 0: 1: 0: 1| 0: 1: 1: 1| 1: 1: 1: 1| 1: 1: 1: 1| 0: 0: 0: 0| 0: 1: 0: 0| 0: 0: 0: 0| +# ------------------------------------------------------------------------------------------------- +# +# Inst{3-0} encodes the option: SY, ST, ISH, ISHST, NSH, NSHST, OSH, OSHST. +# Reject invalid encodings. +# +# See also A8.6.42 DSB +# All other encodings of option are reserved. It is IMPLEMENTATION DEFINED whether options +# other than SY are implemented. All unsupported and reserved options must execute as a full +# system DSB operation, but software must not rely on this behavior. +0x40 0xf0 0x7f 0xf5 diff --git a/test/MC/Disassembler/ARM/thumb-tests.txt b/test/MC/Disassembler/ARM/thumb-tests.txt index 358ecf0..fe260a1 100644 --- a/test/MC/Disassembler/ARM/thumb-tests.txt +++ b/test/MC/Disassembler/ARM/thumb-tests.txt @@ -202,3 +202,9 @@ # CHECK: vmov r1, r0, d11 0x50 0xec 0x1b 0x1b + +# CHECK: dsb nsh +0xbf 0xf3 0x47 0x8f + +# CHECK: isb +0xbf 0xf3 0x6f 0x8f |