diff options
author | Jiangning Liu <jiangning.liu@arm.com> | 2013-11-06 02:25:49 +0000 |
---|---|---|
committer | Jiangning Liu <jiangning.liu@arm.com> | 2013-11-06 02:25:49 +0000 |
commit | 258115258f8fe15e9d74b5fb524f90b75bb917d1 (patch) | |
tree | f7df585491dc8c3376135fb0e8d39db4dd0b643a /test/MC | |
parent | 10bb82e54fc0608e6220581bda0405af8f12d32f (diff) | |
download | external_llvm-258115258f8fe15e9d74b5fb524f90b75bb917d1.zip external_llvm-258115258f8fe15e9d74b5fb524f90b75bb917d1.tar.gz external_llvm-258115258f8fe15e9d74b5fb524f90b75bb917d1.tar.bz2 |
Implement AArch64 Neon instruction set Bitwise Extract.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194118 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r-- | test/MC/AArch64/neon-diagnostics.s | 41 | ||||
-rw-r--r-- | test/MC/AArch64/neon-extract.s | 13 | ||||
-rw-r--r-- | test/MC/Disassembler/AArch64/neon-instructions.txt | 9 |
3 files changed, 63 insertions, 0 deletions
diff --git a/test/MC/AArch64/neon-diagnostics.s b/test/MC/AArch64/neon-diagnostics.s index 67a938e..b549480 100644 --- a/test/MC/AArch64/neon-diagnostics.s +++ b/test/MC/AArch64/neon-diagnostics.s @@ -5194,3 +5194,44 @@ // CHECK: error: invalid operand for instruction // CHECK: sha256su1 v0.16b, v1.16b, v2.16b // CHECK: ^ + +//---------------------------------------------------------------------- +// Bitwise extract +//---------------------------------------------------------------------- + + ext v0.8b, v1.8b, v2.4h, #0x3 + ext v0.4h, v1.4h, v2.4h, #0x3 + ext v0.2s, v1.2s, v2.2s, #0x1 + ext v0.1d, v1.1d, v2.1d, #0x0 + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: ext v0.8b, v1.8b, v2.4h, #0x3 +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: ext v0.4h, v1.4h, v2.4h, #0x3 +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: ext v0.2s, v1.2s, v2.2s, #0x1 +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: ext v0.1d, v1.1d, v2.1d, #0x0 +// CHECK-ERROR: ^ + + ext v0.16b, v1.16b, v2.8h, #0x3 + ext v0.8h, v1.8h, v2.8h, #0x3 + ext v0.4s, v1.4s, v2.4s, #0x1 + ext v0.2d, v1.2d, v2.2d, #0x0 + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: ext v0.16b, v1.16b, v2.8h, #0x3 +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: ext v0.8h, v1.8h, v2.8h, #0x3 +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: ext v0.4s, v1.4s, v2.4s, #0x1 +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: ext v0.2d, v1.2d, v2.2d, #0x0 +// CHECK-ERROR: ^ + diff --git a/test/MC/AArch64/neon-extract.s b/test/MC/AArch64/neon-extract.s new file mode 100644 index 0000000..2d58a75 --- /dev/null +++ b/test/MC/AArch64/neon-extract.s @@ -0,0 +1,13 @@ +// RUN: llvm-mc -triple=aarch64 -mattr=+neon -show-encoding < %s | FileCheck %s + +// Check that the assembler can handle the documented syntax for AArch64 + +//------------------------------------------------------------------------------ +// Instructions for bitwise extract +//------------------------------------------------------------------------------ + + ext v0.8b, v1.8b, v2.8b, #0x3 + ext v0.16b, v1.16b, v2.16b, #0x3 + +// CHECK: ext v0.8b, v1.8b, v2.8b, #0x3 // encoding: [0x20,0x18,0x02,0x2e] +// CHECK: ext v0.16b, v1.16b, v2.16b, #0x3 // encoding: [0x20,0x18,0x02,0x6e] diff --git a/test/MC/Disassembler/AArch64/neon-instructions.txt b/test/MC/Disassembler/AArch64/neon-instructions.txt index c320d7d..225bb16 100644 --- a/test/MC/Disassembler/AArch64/neon-instructions.txt +++ b/test/MC/Disassembler/AArch64/neon-instructions.txt @@ -2042,3 +2042,12 @@ G# RUN: llvm-mc -triple aarch64-none-linux-gnu -mattr=+neon -disassemble < %s | 0x00,0x80,0x81,0x4c 0xef,0x45,0x82,0x4c 0xff,0x0b,0x9f,0x4c + +#---------------------------------------------------------------------- +# Bitwise extract +#---------------------------------------------------------------------- +0x20,0x18,0x02,0x2e +0x20,0x18,0x02,0x6e +# CHECK: ext v0.8b, v1.8b, v2.8b, #0x3 +# CHECK: ext v0.16b, v1.16b, v2.16b, #0x3 + |