diff options
author | Jiangning Liu <jiangning.liu@arm.com> | 2013-10-05 08:22:10 +0000 |
---|---|---|
committer | Jiangning Liu <jiangning.liu@arm.com> | 2013-10-05 08:22:10 +0000 |
commit | beb6afa84397a27e48a9d72ac1d588bc6fcaf564 (patch) | |
tree | e4c47d31248bdeca916aa69eb24edf9cdcf6685a /test/MC | |
parent | 936910d9293f7118056498c75c7bca79a7fc579c (diff) | |
download | external_llvm-beb6afa84397a27e48a9d72ac1d588bc6fcaf564.zip external_llvm-beb6afa84397a27e48a9d72ac1d588bc6fcaf564.tar.gz external_llvm-beb6afa84397a27e48a9d72ac1d588bc6fcaf564.tar.bz2 |
Implement aarch64 neon instruction set AdvSIMD (Across).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192028 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r-- | test/MC/AArch64/neon-across.s | 101 | ||||
-rw-r--r-- | test/MC/AArch64/neon-diagnostics.s | 163 |
2 files changed, 264 insertions, 0 deletions
diff --git a/test/MC/AArch64/neon-across.s b/test/MC/AArch64/neon-across.s new file mode 100644 index 0000000..8b1c2d4 --- /dev/null +++ b/test/MC/AArch64/neon-across.s @@ -0,0 +1,101 @@ +// RUN: llvm-mc -triple=aarch64 -mattr=+neon -show-encoding < %s | FileCheck %s + +// Check that the assembler can handle the documented syntax for AArch64 + +//------------------------------------------------------------------------------ +// Instructions across vector registers +//------------------------------------------------------------------------------ + + saddlv h0, v1.8b + saddlv h0, v1.16b + saddlv s0, v1.4h + saddlv s0, v1.8h + saddlv d0, v1.4s + +// CHECK: saddlv h0, v1.8b // encoding: [0x20,0x38,0x30,0x0e] +// CHECK: saddlv h0, v1.16b // encoding: [0x20,0x38,0x30,0x4e] +// CHECK: saddlv s0, v1.4h // encoding: [0x20,0x38,0x70,0x0e] +// CHECK: saddlv s0, v1.8h // encoding: [0x20,0x38,0x70,0x4e] +// CHECK: saddlv d0, v1.4s // encoding: [0x20,0x38,0xb0,0x4e] + + uaddlv h0, v1.8b + uaddlv h0, v1.16b + uaddlv s0, v1.4h + uaddlv s0, v1.8h + uaddlv d0, v1.4s + +// CHECK: uaddlv h0, v1.8b // encoding: [0x20,0x38,0x30,0x2e] +// CHECK: uaddlv h0, v1.16b // encoding: [0x20,0x38,0x30,0x6e] +// CHECK: uaddlv s0, v1.4h // encoding: [0x20,0x38,0x70,0x2e] +// CHECK: uaddlv s0, v1.8h // encoding: [0x20,0x38,0x70,0x6e] +// CHECK: uaddlv d0, v1.4s // encoding: [0x20,0x38,0xb0,0x6e] + + smaxv b0, v1.8b + smaxv b0, v1.16b + smaxv h0, v1.4h + smaxv h0, v1.8h + smaxv s0, v1.4s + +// CHECK: smaxv b0, v1.8b // encoding: [0x20,0xa8,0x30,0x0e] +// CHECK: smaxv b0, v1.16b // encoding: [0x20,0xa8,0x30,0x4e] +// CHECK: smaxv h0, v1.4h // encoding: [0x20,0xa8,0x70,0x0e] +// CHECK: smaxv h0, v1.8h // encoding: [0x20,0xa8,0x70,0x4e] +// CHECK: smaxv s0, v1.4s // encoding: [0x20,0xa8,0xb0,0x4e] + + sminv b0, v1.8b + sminv b0, v1.16b + sminv h0, v1.4h + sminv h0, v1.8h + sminv s0, v1.4s + +// CHECK: sminv b0, v1.8b // encoding: [0x20,0xa8,0x31,0x0e] +// CHECK: sminv b0, v1.16b // encoding: [0x20,0xa8,0x31,0x4e] +// CHECK: sminv h0, v1.4h // encoding: [0x20,0xa8,0x71,0x0e] +// CHECK: sminv h0, v1.8h // encoding: [0x20,0xa8,0x71,0x4e] +// CHECK: sminv s0, v1.4s // encoding: [0x20,0xa8,0xb1,0x4e] + + umaxv b0, v1.8b + umaxv b0, v1.16b + umaxv h0, v1.4h + umaxv h0, v1.8h + umaxv s0, v1.4s + +// CHECK: umaxv b0, v1.8b // encoding: [0x20,0xa8,0x30,0x2e] +// CHECK: umaxv b0, v1.16b // encoding: [0x20,0xa8,0x30,0x6e] +// CHECK: umaxv h0, v1.4h // encoding: [0x20,0xa8,0x70,0x2e] +// CHECK: umaxv h0, v1.8h // encoding: [0x20,0xa8,0x70,0x6e] +// CHECK: umaxv s0, v1.4s // encoding: [0x20,0xa8,0xb0,0x6e] + + uminv b0, v1.8b + uminv b0, v1.16b + uminv h0, v1.4h + uminv h0, v1.8h + uminv s0, v1.4s + +// CHECK: uminv b0, v1.8b // encoding: [0x20,0xa8,0x31,0x2e] +// CHECK: uminv b0, v1.16b // encoding: [0x20,0xa8,0x31,0x6e] +// CHECK: uminv h0, v1.4h // encoding: [0x20,0xa8,0x71,0x2e] +// CHECK: uminv h0, v1.8h // encoding: [0x20,0xa8,0x71,0x6e] +// CHECK: uminv s0, v1.4s // encoding: [0x20,0xa8,0xb1,0x6e] + + addv b0, v1.8b + addv b0, v1.16b + addv h0, v1.4h + addv h0, v1.8h + addv s0, v1.4s + +// CHECK: addv b0, v1.8b // encoding: [0x20,0xb8,0x31,0x0e] +// CHECK: addv b0, v1.16b // encoding: [0x20,0xb8,0x31,0x4e] +// CHECK: addv h0, v1.4h // encoding: [0x20,0xb8,0x71,0x0e] +// CHECK: addv h0, v1.8h // encoding: [0x20,0xb8,0x71,0x4e] +// CHECK: addv s0, v1.4s // encoding: [0x20,0xb8,0xb1,0x4e] + + fmaxnmv s0, v1.4s + fminnmv s0, v1.4s + fmaxv s0, v1.4s + fminv s0, v1.4s + +// CHECK: fmaxnmv s0, v1.4s // encoding: [0x20,0xc8,0x30,0x6e] +// CHECK: fminnmv s0, v1.4s // encoding: [0x20,0xc8,0xb0,0x6e] +// CHECK: fmaxv s0, v1.4s // encoding: [0x20,0xf8,0x30,0x6e] +// CHECK: fminv s0, v1.4s // encoding: [0x20,0xf8,0xb0,0x6e] diff --git a/test/MC/AArch64/neon-diagnostics.s b/test/MC/AArch64/neon-diagnostics.s index 211bc9a..a86796f 100644 --- a/test/MC/AArch64/neon-diagnostics.s +++ b/test/MC/AArch64/neon-diagnostics.s @@ -3608,3 +3608,166 @@ // CHECK-ERROR: error: invalid operand for instruction // CHECK-ERROR: sqrdmulh v0.2d, v1.2d, v22.d[1] // CHECK-ERROR: ^ + +//---------------------------------------------------------------------- +// Across vectors +//---------------------------------------------------------------------- + + saddlv b0, v1.8b + saddlv b0, v1.16b + saddlv h0, v1.4h + saddlv h0, v1.8h + saddlv s0, v1.2s + saddlv s0, v1.4s + saddlv d0, v1.2s + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: saddlv b0, v1.8b +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: saddlv b0, v1.16b +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: saddlv h0, v1.4h +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: saddlv h0, v1.8h +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: saddlv s0, v1.2s +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: saddlv s0, v1.4s +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: saddlv d0, v1.2s +// CHECK-ERROR: ^ + + uaddlv b0, v1.8b + uaddlv b0, v1.16b + uaddlv h0, v1.4h + uaddlv h0, v1.8h + uaddlv s0, v1.2s + uaddlv s0, v1.4s + uaddlv d0, v1.2s + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: uaddlv b0, v1.8b +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: uaddlv b0, v1.16b +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: uaddlv h0, v1.4h +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: uaddlv h0, v1.8h +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: uaddlv s0, v1.2s +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: uaddlv s0, v1.4s +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: uaddlv d0, v1.2s +// CHECK-ERROR: ^ + + smaxv s0, v1.2s + sminv s0, v1.2s + umaxv s0, v1.2s + uminv s0, v1.2s + addv s0, v1.2s + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: smaxv s0, v1.2s +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: sminv s0, v1.2s +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: umaxv s0, v1.2s +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: uminv s0, v1.2s +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: addv s0, v1.2s +// CHECK-ERROR: ^ + + smaxv d0, v1.2d + sminv d0, v1.2d + umaxv d0, v1.2d + uminv d0, v1.2d + addv d0, v1.2d + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: smaxv d0, v1.2d +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: sminv d0, v1.2d +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: umaxv d0, v1.2d +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: uminv d0, v1.2d +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: addv d0, v1.2d +// CHECK-ERROR: ^ + + fmaxnmv b0, v1.16b + fminnmv b0, v1.16b + fmaxv b0, v1.16b + fminv b0, v1.16b + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fmaxnmv b0, v1.16b +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fminnmv b0, v1.16b +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fmaxv b0, v1.16b +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fminv b0, v1.16b +// CHECK-ERROR: ^ + + fmaxnmv h0, v1.8h + fminnmv h0, v1.8h + fmaxv h0, v1.8h + fminv h0, v1.8h + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fmaxnmv h0, v1.8h +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fminnmv h0, v1.8h +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fmaxv h0, v1.8h +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fminv h0, v1.8h +// CHECK-ERROR: ^ + + fmaxnmv d0, v1.2d + fminnmv d0, v1.2d + fmaxv d0, v1.2d + fminv d0, v1.2d + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fmaxnmv d0, v1.2d +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fminnmv d0, v1.2d +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fmaxv d0, v1.2d +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fminv d0, v1.2d +// CHECK-ERROR: ^ + |