diff options
author | Joey Gouly <joey.gouly@arm.com> | 2013-08-27 17:38:16 +0000 |
---|---|---|
committer | Joey Gouly <joey.gouly@arm.com> | 2013-08-27 17:38:16 +0000 |
commit | 0b90c6223d9c49b5e0dc4bf4e53796b0714d7b80 (patch) | |
tree | 97160f0d3863d43fff79cd5243fdf0e833c67582 /test | |
parent | 00c198042e22d781e46180a2aec2332945712552 (diff) | |
download | external_llvm-0b90c6223d9c49b5e0dc4bf4e53796b0714d7b80.zip external_llvm-0b90c6223d9c49b5e0dc4bf4e53796b0714d7b80.tar.gz external_llvm-0b90c6223d9c49b5e0dc4bf4e53796b0714d7b80.tar.bz2 |
[ARMv8] Add MC support for the new load/store acquire/release instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189388 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
4 files changed, 131 insertions, 0 deletions
diff --git a/test/MC/ARM/load-store-acquire-release-v8-thumb.s b/test/MC/ARM/load-store-acquire-release-v8-thumb.s new file mode 100644 index 0000000..fe45757 --- /dev/null +++ b/test/MC/ARM/load-store-acquire-release-v8-thumb.s @@ -0,0 +1,33 @@ +@ RUN: llvm-mc -triple=thumbv8 -show-encoding < %s | FileCheck %s + ldaexb r3, [r4] + ldaexh r2, [r5] + ldaex r1, [r7] + ldaexd r6, r7, [r8] + +@ CHECK: ldaexb r3, [r4] @ encoding: [0xd4,0xe8,0xcf,0x3f] +@ CHECK: ldaexh r2, [r5] @ encoding: [0xd5,0xe8,0xdf,0x2f] +@ CHECK: ldaex r1, [r7] @ encoding: [0xd7,0xe8,0xef,0x1f] +@ CHECK: ldaexd r6, r7, [r8] @ encoding: [0xd8,0xe8,0xff,0x67] + + stlexb r1, r3, [r4] + stlexh r4, r2, [r5] + stlex r2, r1, [r7] + stlexd r6, r2, r3, [r8] +@ CHECK: stlexb r1, r3, [r4] @ encoding: [0xc4,0xe8,0xc1,0x3f] +@ CHECK: stlexh r4, r2, [r5] @ encoding: [0xc5,0xe8,0xd4,0x2f] +@ CHECK: stlex r2, r1, [r7] @ encoding: [0xc7,0xe8,0xe2,0x1f] +@ CHECK: stlexd r6, r2, r3, [r8] @ encoding: [0xc8,0xe8,0xf6,0x23] + + lda r5, [r6] + ldab r5, [r6] + ldah r12, [r9] +@ CHECK: lda r5, [r6] @ encoding: [0xd6,0xe8,0xaf,0x5f] +@ CHECK: ldab r5, [r6] @ encoding: [0xd6,0xe8,0x8f,0x5f] +@ CHECK: ldah r12, [r9] @ encoding: [0xd9,0xe8,0x9f,0xcf] + + stl r3, [r0] + stlb r2, [r1] + stlh r2, [r3] +@ CHECK: stl r3, [r0] @ encoding: [0xc0,0xe8,0xaf,0x3f] +@ CHECK: stlb r2, [r1] @ encoding: [0xc1,0xe8,0x8f,0x2f] +@ CHECK: stlh r2, [r3] @ encoding: [0xc3,0xe8,0x9f,0x2f] diff --git a/test/MC/ARM/load-store-acquire-release-v8.s b/test/MC/ARM/load-store-acquire-release-v8.s new file mode 100644 index 0000000..85f8306 --- /dev/null +++ b/test/MC/ARM/load-store-acquire-release-v8.s @@ -0,0 +1,33 @@ +@ RUN: llvm-mc -triple=armv8 -show-encoding < %s | FileCheck %s + ldaexb r3, [r4] + ldaexh r2, [r5] + ldaex r1, [r7] + ldaexd r6, r7, [r8] + +@ CHECK: ldaexb r3, [r4] @ encoding: [0x9f,0x3e,0xd4,0xe1] +@ CHECK: ldaexh r2, [r5] @ encoding: [0x9f,0x2e,0xf5,0xe1] +@ CHECK: ldaex r1, [r7] @ encoding: [0x9f,0x1e,0x97,0xe1] +@ CHECK: ldaexd r6, r7, [r8] @ encoding: [0x9f,0x6e,0xb8,0xe1] + + stlexb r1, r3, [r4] + stlexh r4, r2, [r5] + stlex r2, r1, [r7] + stlexd r6, r2, r3, [r8] +@ CHECK: stlexb r1, r3, [r4] @ encoding: [0x93,0x1e,0xc4,0xe1] +@ CHECK: stlexh r4, r2, [r5] @ encoding: [0x92,0x4e,0xe5,0xe1] +@ CHECK: stlex r2, r1, [r7] @ encoding: [0x91,0x2e,0x87,0xe1] +@ CHECK: stlexd r6, r2, r3, [r8] @ encoding: [0x92,0x6e,0xa8,0xe1] + + lda r5, [r6] + ldab r5, [r6] + ldah r12, [r9] +@ CHECK: lda r5, [r6] @ encoding: [0x9f,0x5c,0x96,0xe1] +@ CHECK: ldab r5, [r6] @ encoding: [0x9f,0x5c,0xd6,0xe1] +@ CHECK: ldah r12, [r9] @ encoding: [0x9f,0xcc,0xf9,0xe1] + + stl r3, [r0] + stlb r2, [r1] + stlh r2, [r3] +@ CHECK: stl r3, [r0] @ encoding: [0x93,0xfc,0x80,0xe1] +@ CHECK: stlb r2, [r1] @ encoding: [0x92,0xfc,0xc1,0xe1] +@ CHECK: stlh r2, [r3] @ encoding: [0x92,0xfc,0xe3,0xe1] diff --git a/test/MC/Disassembler/ARM/load-store-acquire-release-v8-thumb.txt b/test/MC/Disassembler/ARM/load-store-acquire-release-v8-thumb.txt new file mode 100644 index 0000000..8a2ba74 --- /dev/null +++ b/test/MC/Disassembler/ARM/load-store-acquire-release-v8-thumb.txt @@ -0,0 +1,33 @@ +# RUN: llvm-mc -triple=thumbv8 -disassemble -show-encoding < %s | FileCheck %s + +0xd4 0xe8 0xcf 0x3f +0xd5 0xe8 0xdf 0x2f +0xd7 0xe8 0xef 0x1f +0xd8 0xe8 0xff 0x67 +# CHECK: ldaexb r3, [r4] @ encoding: [0xd4,0xe8,0xcf,0x3f] +# CHECK: ldaexh r2, [r5] @ encoding: [0xd5,0xe8,0xdf,0x2f] +# CHECK: ldaex r1, [r7] @ encoding: [0xd7,0xe8,0xef,0x1f] +# CHECK: ldaexd r6, r7, [r8] @ encoding: [0xd8,0xe8,0xff,0x67] + +0xc4 0xe8 0xc1 0x3f +0xc5 0xe8 0xd4 0x2f +0xc7 0xe8 0xe2 0x1f +0xc8 0xe8 0xf6 0x23 +# CHECK: stlexb r1, r3, [r4] @ encoding: [0xc4,0xe8,0xc1,0x3f] +# CHECK: stlexh r4, r2, [r5] @ encoding: [0xc5,0xe8,0xd4,0x2f] +# CHECK: stlex r2, r1, [r7] @ encoding: [0xc7,0xe8,0xe2,0x1f] +# CHECK: stlexd r6, r2, r3, [r8] @ encoding: [0xc8,0xe8,0xf6,0x23] + +0xd6 0xe8 0xaf 0x5f +0xd6 0xe8 0x8f 0x5f +0xd9 0xe8 0x9f 0xcf +# CHECK: lda r5, [r6] @ encoding: [0xd6,0xe8,0xaf,0x5f] +# CHECK: ldab r5, [r6] @ encoding: [0xd6,0xe8,0x8f,0x5f] +# CHECK: ldah r12, [r9] @ encoding: [0xd9,0xe8,0x9f,0xcf] + +0xc0 0xe8 0xaf 0x3f +0xc1 0xe8 0x8f 0x2f +0xc3 0xe8 0x9f 0x2f +# CHECK: stl r3, [r0] @ encoding: [0xc0,0xe8,0xaf,0x3f] +# CHECK: stlb r2, [r1] @ encoding: [0xc1,0xe8,0x8f,0x2f] +# CHECK: stlh r2, [r3] @ encoding: [0xc3,0xe8,0x9f,0x2f] diff --git a/test/MC/Disassembler/ARM/load-store-acquire-release-v8.txt b/test/MC/Disassembler/ARM/load-store-acquire-release-v8.txt new file mode 100644 index 0000000..058f9cc --- /dev/null +++ b/test/MC/Disassembler/ARM/load-store-acquire-release-v8.txt @@ -0,0 +1,32 @@ +# RUN: llvm-mc -triple=armv8 -disassemble -show-encoding < %s | FileCheck %s +0x9f 0x0e 0xd8 0xe1 +0x9f 0x1e 0xfc 0xe1 +0x9f 0x1e 0x90 0xe1 +0x9f 0x8e 0xbd 0xe1 +# CHECK: ldaexb r0, [r8] @ encoding: [0x9f,0x0e,0xd8,0xe1] +# CHECK: ldaexh r1, [r12] @ encoding: [0x9f,0x1e,0xfc,0xe1] +# CHECK: ldaex r1, [r0] @ encoding: [0x9f,0x1e,0x90,0xe1] +# CHECK: ldaexd r8, r9, [sp] @ encoding: [0x9f,0x8e,0xbd,0xe1] + +0x93 0x1e 0xc4 0xe1 +0x92 0x4e 0xe5 0xe1 +0x91 0x2e 0x87 0xe1 +0x92 0x6e 0xa8 0xe1 +# CHECK: stlexb r1, r3, [r4] @ encoding: [0x93,0x1e,0xc4,0xe1] +# CHECK: stlexh r4, r2, [r5] @ encoding: [0x92,0x4e,0xe5,0xe1] +# CHECK: stlex r2, r1, [r7] @ encoding: [0x91,0x2e,0x87,0xe1] +# CHECK: stlexd r6, r2, r3, [r8] @ encoding: [0x92,0x6e,0xa8,0xe1] + +0x9f 0x5c 0x96 0xe1 +0x9f 0x5c 0xd6 0xe1 +0x9f 0xcc 0xf9 0xe1 +# CHECK: lda r5, [r6] @ encoding: [0x9f,0x5c,0x96,0xe1] +# CHECK: ldab r5, [r6] @ encoding: [0x9f,0x5c,0xd6,0xe1] +# CHECK: ldah r12, [r9] @ encoding: [0x9f,0xcc,0xf9,0xe1] + +0x93 0xfc 0x80 0xe1 +0x92 0xfc 0xc1 0xe1 +0x92 0xfc 0xe3 0xe1 +# CHECK: stl r3, [r0] @ encoding: [0x93,0xfc,0x80,0xe1] +# CHECK: stlb r2, [r1] @ encoding: [0x92,0xfc,0xc1,0xe1] +# CHECK: stlh r2, [r3] @ encoding: [0x92,0xfc,0xe3,0xe1] |