diff options
author | Jiangning Liu <jiangning.liu@arm.com> | 2013-11-06 03:35:27 +0000 |
---|---|---|
committer | Jiangning Liu <jiangning.liu@arm.com> | 2013-11-06 03:35:27 +0000 |
commit | 8458f371b84ee0cd22c4a433059d53ea6e3ec4f4 (patch) | |
tree | 0a4d59f36e877036558838acfc8eb34a84ae132a /test/MC/AArch64/neon-perm.s | |
parent | 258115258f8fe15e9d74b5fb524f90b75bb917d1 (diff) | |
download | external_llvm-8458f371b84ee0cd22c4a433059d53ea6e3ec4f4.zip external_llvm-8458f371b84ee0cd22c4a433059d53ea6e3ec4f4.tar.gz external_llvm-8458f371b84ee0cd22c4a433059d53ea6e3ec4f4.tar.bz2 |
Implement AArch64 Neon instruction set Perm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194123 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/AArch64/neon-perm.s')
-rw-r--r-- | test/MC/AArch64/neon-perm.s | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/test/MC/AArch64/neon-perm.s b/test/MC/AArch64/neon-perm.s new file mode 100644 index 0000000..20a4acde --- /dev/null +++ b/test/MC/AArch64/neon-perm.s @@ -0,0 +1,103 @@ +// 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 permute +//------------------------------------------------------------------------------ + + uzp1 v0.8b, v1.8b, v2.8b + uzp1 v0.16b, v1.16b, v2.16b + uzp1 v0.4h, v1.4h, v2.4h + uzp1 v0.8h, v1.8h, v2.8h + uzp1 v0.2s, v1.2s, v2.2s + uzp1 v0.4s, v1.4s, v2.4s + uzp1 v0.2d, v1.2d, v2.2d + +// CHECK: uzp1 v0.8b, v1.8b, v2.8b // encoding: [0x20,0x18,0x02,0x0e] +// CHECK: uzp1 v0.16b, v1.16b, v2.16b // encoding: [0x20,0x18,0x02,0x4e] +// CHECK: uzp1 v0.4h, v1.4h, v2.4h // encoding: [0x20,0x18,0x42,0x0e] +// CHECK: uzp1 v0.8h, v1.8h, v2.8h // encoding: [0x20,0x18,0x42,0x4e] +// CHECK: uzp1 v0.2s, v1.2s, v2.2s // encoding: [0x20,0x18,0x82,0x0e] +// CHECK: uzp1 v0.4s, v1.4s, v2.4s // encoding: [0x20,0x18,0x82,0x4e] +// CHECK: uzp1 v0.2d, v1.2d, v2.2d // encoding: [0x20,0x18,0xc2,0x4e] + + trn1 v0.8b, v1.8b, v2.8b + trn1 v0.16b, v1.16b, v2.16b + trn1 v0.4h, v1.4h, v2.4h + trn1 v0.8h, v1.8h, v2.8h + trn1 v0.2s, v1.2s, v2.2s + trn1 v0.4s, v1.4s, v2.4s + trn1 v0.2d, v1.2d, v2.2d + +// CHECK: trn1 v0.8b, v1.8b, v2.8b // encoding: [0x20,0x28,0x02,0x0e] +// CHECK: trn1 v0.16b, v1.16b, v2.16b // encoding: [0x20,0x28,0x02,0x4e] +// CHECK: trn1 v0.4h, v1.4h, v2.4h // encoding: [0x20,0x28,0x42,0x0e] +// CHECK: trn1 v0.8h, v1.8h, v2.8h // encoding: [0x20,0x28,0x42,0x4e] +// CHECK: trn1 v0.2s, v1.2s, v2.2s // encoding: [0x20,0x28,0x82,0x0e] +// CHECK: trn1 v0.4s, v1.4s, v2.4s // encoding: [0x20,0x28,0x82,0x4e] +// CHECK: trn1 v0.2d, v1.2d, v2.2d // encoding: [0x20,0x28,0xc2,0x4e] + + zip1 v0.8b, v1.8b, v2.8b + zip1 v0.16b, v1.16b, v2.16b + zip1 v0.4h, v1.4h, v2.4h + zip1 v0.8h, v1.8h, v2.8h + zip1 v0.2s, v1.2s, v2.2s + zip1 v0.4s, v1.4s, v2.4s + zip1 v0.2d, v1.2d, v2.2d + +// CHECK: zip1 v0.8b, v1.8b, v2.8b // encoding: [0x20,0x38,0x02,0x0e] +// CHECK: zip1 v0.16b, v1.16b, v2.16b // encoding: [0x20,0x38,0x02,0x4e] +// CHECK: zip1 v0.4h, v1.4h, v2.4h // encoding: [0x20,0x38,0x42,0x0e] +// CHECK: zip1 v0.8h, v1.8h, v2.8h // encoding: [0x20,0x38,0x42,0x4e] +// CHECK: zip1 v0.2s, v1.2s, v2.2s // encoding: [0x20,0x38,0x82,0x0e] +// CHECK: zip1 v0.4s, v1.4s, v2.4s // encoding: [0x20,0x38,0x82,0x4e] +// CHECK: zip1 v0.2d, v1.2d, v2.2d // encoding: [0x20,0x38,0xc2,0x4e] + + uzp2 v0.8b, v1.8b, v2.8b + uzp2 v0.16b, v1.16b, v2.16b + uzp2 v0.4h, v1.4h, v2.4h + uzp2 v0.8h, v1.8h, v2.8h + uzp2 v0.2s, v1.2s, v2.2s + uzp2 v0.4s, v1.4s, v2.4s + uzp2 v0.2d, v1.2d, v2.2d + +// CHECK: uzp2 v0.8b, v1.8b, v2.8b // encoding: [0x20,0x58,0x02,0x0e] +// CHECK: uzp2 v0.16b, v1.16b, v2.16b // encoding: [0x20,0x58,0x02,0x4e] +// CHECK: uzp2 v0.4h, v1.4h, v2.4h // encoding: [0x20,0x58,0x42,0x0e] +// CHECK: uzp2 v0.8h, v1.8h, v2.8h // encoding: [0x20,0x58,0x42,0x4e] +// CHECK: uzp2 v0.2s, v1.2s, v2.2s // encoding: [0x20,0x58,0x82,0x0e] +// CHECK: uzp2 v0.4s, v1.4s, v2.4s // encoding: [0x20,0x58,0x82,0x4e] +// CHECK: uzp2 v0.2d, v1.2d, v2.2d // encoding: [0x20,0x58,0xc2,0x4e] + + trn2 v0.8b, v1.8b, v2.8b + trn2 v0.16b, v1.16b, v2.16b + trn2 v0.4h, v1.4h, v2.4h + trn2 v0.8h, v1.8h, v2.8h + trn2 v0.2s, v1.2s, v2.2s + trn2 v0.4s, v1.4s, v2.4s + trn2 v0.2d, v1.2d, v2.2d + +// CHECK: trn2 v0.8b, v1.8b, v2.8b // encoding: [0x20,0x68,0x02,0x0e] +// CHECK: trn2 v0.16b, v1.16b, v2.16b // encoding: [0x20,0x68,0x02,0x4e] +// CHECK: trn2 v0.4h, v1.4h, v2.4h // encoding: [0x20,0x68,0x42,0x0e] +// CHECK: trn2 v0.8h, v1.8h, v2.8h // encoding: [0x20,0x68,0x42,0x4e] +// CHECK: trn2 v0.2s, v1.2s, v2.2s // encoding: [0x20,0x68,0x82,0x0e] +// CHECK: trn2 v0.4s, v1.4s, v2.4s // encoding: [0x20,0x68,0x82,0x4e] +// CHECK: trn2 v0.2d, v1.2d, v2.2d // encoding: [0x20,0x68,0xc2,0x4e] + + zip2 v0.8b, v1.8b, v2.8b + zip2 v0.16b, v1.16b, v2.16b + zip2 v0.4h, v1.4h, v2.4h + zip2 v0.8h, v1.8h, v2.8h + zip2 v0.2s, v1.2s, v2.2s + zip2 v0.4s, v1.4s, v2.4s + zip2 v0.2d, v1.2d, v2.2d + +// CHECK: zip2 v0.8b, v1.8b, v2.8b // encoding: [0x20,0x78,0x02,0x0e] +// CHECK: zip2 v0.16b, v1.16b, v2.16b // encoding: [0x20,0x78,0x02,0x4e] +// CHECK: zip2 v0.4h, v1.4h, v2.4h // encoding: [0x20,0x78,0x42,0x0e] +// CHECK: zip2 v0.8h, v1.8h, v2.8h // encoding: [0x20,0x78,0x42,0x4e] +// CHECK: zip2 v0.2s, v1.2s, v2.2s // encoding: [0x20,0x78,0x82,0x0e] +// CHECK: zip2 v0.4s, v1.4s, v2.4s // encoding: [0x20,0x78,0x82,0x4e] +// CHECK: zip2 v0.2d, v1.2d, v2.2d // encoding: [0x20,0x78,0xc2,0x4e] |