From 7b56b1cf0e842e7e500af34aea03e7c19e3789d3 Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Tue, 26 Jul 2011 18:07:21 +0000 Subject: [PATCH] ARM parsing and encoding tests for load/store exclusive instructions. llvm-svn: 136105 --- test/MC/ARM/arm_instructions.s | 24 ------------------------ test/MC/ARM/basic-arm-instructions.s | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/test/MC/ARM/arm_instructions.s b/test/MC/ARM/arm_instructions.s index f1407b6733f..68df0ff5f95 100644 --- a/test/MC/ARM/arm_instructions.s +++ b/test/MC/ARM/arm_instructions.s @@ -86,30 +86,6 @@ @ CHECK: add r1, r2, r3, lsl r4 @ encoding: [0x13,0x14,0x82,0xe0] add r1, r2, r3, lsl r4 -@ CHECK: strexb r0, r1, [r2] @ encoding: [0x91,0x0f,0xc2,0xe1] - strexb r0, r1, [r2] - -@ CHECK: strexh r0, r1, [r2] @ encoding: [0x91,0x0f,0xe2,0xe1] - strexh r0, r1, [r2] - -@ CHECK: strex r0, r1, [r2] @ encoding: [0x91,0x0f,0x82,0xe1] - strex r0, r1, [r2] - -@ CHECK: strexd r0, r2, r3, [r1] @ encoding: [0x92,0x0f,0xa1,0xe1] - strexd r0, r2, r3, [r1] - -@ CHECK: ldrexb r0, [r0] @ encoding: [0x9f,0x0f,0xd0,0xe1] - ldrexb r0, [r0] - -@ CHECK: ldrexh r0, [r0] @ encoding: [0x9f,0x0f,0xf0,0xe1] - ldrexh r0, [r0] - -@ CHECK: ldrex r0, [r0] @ encoding: [0x9f,0x0f,0x90,0xe1] - ldrex r0, [r0] - -@ CHECK: ldrexd r0, r1, [r0] @ encoding: [0x9f,0x0f,0xb0,0xe1] - ldrexd r0, r1, [r0] - @ CHECK: ssat16 r0, #7, r0 @ encoding: [0x30,0x0f,0xa6,0xe6] ssat16 r0, #7, r0 diff --git a/test/MC/ARM/basic-arm-instructions.s b/test/MC/ARM/basic-arm-instructions.s index adbdf9e5966..0cd59346d0f 100644 --- a/test/MC/ARM/basic-arm-instructions.s +++ b/test/MC/ARM/basic-arm-instructions.s @@ -622,6 +622,21 @@ _func: @------------------------------------------------------------------------------ @ FIXME: LDR* @------------------------------------------------------------------------------ + +@------------------------------------------------------------------------------ +@ LDREX/LDREXB/LDREXH/LDREXD +@------------------------------------------------------------------------------ + ldrexb r3, [r4] + ldrexh r2, [r5] + ldrex r1, [r7] + ldrexd r6, r7, [r8] + +@ CHECK: ldrexb r3, [r4] @ encoding: [0x9f,0x3f,0xd4,0xe1] +@ CHECK: ldrexh r2, [r5] @ encoding: [0x9f,0x2f,0xf5,0xe1] +@ CHECK: ldrex r1, [r7] @ encoding: [0x9f,0x1f,0x97,0xe1] +@ CHECK: ldrexd r6, r7, [r8] @ encoding: [0x9f,0x6f,0xb8,0xe1] + + @------------------------------------------------------------------------------ @ FIXME: LSL @------------------------------------------------------------------------------ @@ -1697,6 +1712,18 @@ _func: @------------------------------------------------------------------------------ @ FIXME:STR* @------------------------------------------------------------------------------ +@------------------------------------------------------------------------------ +@ STREX/STREXB/STREXH/STREXD +@------------------------------------------------------------------------------ + strexb r1, r3, [r4] + strexh r4, r2, [r5] + strex r2, r1, [r7] + strexd r6, r2, r3, [r8] + +@ CHECK: strexb r1, r3, [r4] @ encoding: [0x93,0x1f,0xc4,0xe1] +@ CHECK: strexh r4, r2, [r5] @ encoding: [0x92,0x4f,0xe5,0xe1] +@ CHECK: strex r2, r1, [r7] @ encoding: [0x91,0x2f,0x87,0xe1] +@ CHECK: strexd r6, r2, r3, [r8] @ encoding: [0x92,0x6f,0xa8,0xe1] @------------------------------------------------------------------------------