Add tests for ARM PKH assembly parsing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135696 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach 2011-07-21 19:02:03 +00:00
parent 92a202213b
commit 61b1b21e9a
2 changed files with 48 additions and 0 deletions

View File

@ -969,6 +969,27 @@ _func:
@ CHECK: orrslt r6, r6, r7, ror r9 @ encoding: [0x77,0x69,0x96,0xb1]
@ CHECK: orrsgt r4, r4, r5, rrx @ encoding: [0x65,0x40,0x94,0xc1]
@------------------------------------------------------------------------------
@ PKH
@------------------------------------------------------------------------------
pkhbt r2, r2, r3
pkhbt r2, r2, r3, lsl #31
pkhbt r2, r2, r3, lsl #0
pkhbt r2, r2, r3, lsl #15
pkhtb r2, r2, r3
pkhtb r2, r2, r3, asr #31
pkhtb r2, r2, r3, asr #15
@ CHECK: pkhbt r2, r2, r3 @ encoding: [0x13,0x20,0x82,0xe6]
@ CHECK: pkhbt r2, r2, r3, lsl #31 @ encoding: [0x93,0x2f,0x82,0xe6]
@ CHECK: pkhbt r2, r2, r3 @ encoding: [0x13,0x20,0x82,0xe6]
@ CHECK: pkhbt r2, r2, r3, lsl #15 @ encoding: [0x93,0x27,0x82,0xe6]
@ CHECK: pkhbt r2, r2, r3 @ encoding: [0x13,0x20,0x82,0xe6]
@ CHECK: pkhtb r2, r2, r3, asr #31 @ encoding: [0xd3,0x2f,0x82,0xe6]
@ CHECK: pkhtb r2, r2, r3, asr #15 @ encoding: [0xd3,0x27,0x82,0xe6]
@------------------------------------------------------------------------------
@ STM*

View File

@ -117,3 +117,30 @@
@ CHECK-ERRORS: error: invalid operand for instruction
@ CHECK-ERRORS: error: invalid operand for instruction
@ CHECK-ERRORS: error: invalid operand for instruction
@ Shifter operand validation for PKH instructions.
pkhbt r2, r2, r3, lsl #-1
pkhbt r2, r2, r3, lsl #32
pkhtb r2, r2, r3, asr #0
pkhtb r2, r2, r3, asr #33
pkhbt r2, r2, r3, asr #3
pkhtb r2, r2, r3, lsl #3
@ CHECK: error: immediate value out of range
@ CHECK: pkhbt r2, r2, r3, lsl #-1
@ CHECK: ^
@ CHECK: error: immediate value out of range
@ CHECK: pkhbt r2, r2, r3, lsl #32
@ CHECK: ^
@ CHECK: error: immediate value out of range
@ CHECK: pkhtb r2, r2, r3, asr #0
@ CHECK: ^
@ CHECK: error: immediate value out of range
@ CHECK: pkhtb r2, r2, r3, asr #33
@ CHECK: ^
@ CHECK: error: lsl operand expected.
@ CHECK: pkhbt r2, r2, r3, asr #3
@ CHECK: ^
@ CHECK: error: asr operand expected.
@ CHECK: pkhtb r2, r2, r3, lsl #3
@ CHECK: ^