forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AArch64] Add assembly/disassembly for PMLAL/PMULL instructions (llvm…
…#113564) This patch adds assembly/disassembly for the following SVE_AES2 instructions - PMLAL - PMULL - In accordance with: https://developer.arm.com/documentation/ddi0602/latest/
- Loading branch information
1 parent
a2f8fba
commit 21a3df7
Showing
6 changed files
with
184 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2p1,+sve-aes2 2>&1 < %s | FileCheck %s | ||
|
||
// --------------------------------------------------------------------------// | ||
// Invalid vector list | ||
|
||
pmlal {z0.q-z2.q}, z0.d, z0.d | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction | ||
// CHECK-NEXT: pmlal {z0.q-z2.q}, z0.d, z0.d | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
pmlal {z0.q-z0.q}, z0.d, z0.d | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid number of vectors | ||
// CHECK-NEXT: pmlal {z0.q-z0.q}, z0.d, z0.d | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
pmlal {z1.q-z2.q}, z0.d, z0.d | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: Invalid vector list, expected list with 2 consecutive SVE vectors, where the first vector is a multiple of 2 and with matching element types | ||
// CHECK-NEXT: pmlal {z1.q-z2.q}, z0.d, z0.d | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
pmlal {z0.d-z1.d}, z0.d, z0.d | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction | ||
// CHECK-NEXT: pmlal {z0.d-z1.d}, z0.d, z0.d | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
// --------------------------------------------------------------------------// | ||
// Invalid single source vectors | ||
|
||
pmlal {z0.q-z1.q}, z0.s, z0.d | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width | ||
// CHECK-NEXT: pmlal {z0.q-z1.q}, z0.s, z0.d | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
pmlal {z0.q-z1.q}, z0.d, z0.s | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width | ||
// CHECK-NEXT: pmlal {z0.q-z1.q}, z0.d, z0.s | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve-aes2,+sve2p1 < %s \ | ||
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST | ||
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve-aes2,+ssve-aes < %s \ | ||
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST | ||
// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ | ||
// RUN: | FileCheck %s --check-prefix=CHECK-ERROR | ||
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve-aes2,+sve2p1 < %s \ | ||
// RUN: | llvm-objdump -d --mattr=+sve-aes2,+sve2p1 - | FileCheck %s --check-prefix=CHECK-INST | ||
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve-aes2,+sve2p1 < %s \ | ||
// RUN: | llvm-objdump -d --mattr=-sve-aes2 - | FileCheck %s --check-prefix=CHECK-UNKNOWN | ||
// Disassemble encoding and check the re-encoding (-show-encoding) matches. | ||
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve-aes2,+sve2p1 < %s \ | ||
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ | ||
// RUN: | llvm-mc -triple=aarch64 -mattr=+sve-aes2,+sve2p1 -disassemble -show-encoding \ | ||
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST | ||
|
||
pmlal {z0.q-z1.q}, z0.d, z0.d // 01000101-00100000-11111100-00000000 | ||
// CHECK-INST: pmlal { z0.q, z1.q }, z0.d, z0.d | ||
// CHECK-ENCODING: [0x00,0xfc,0x20,0x45] | ||
// CHECK-ERROR: instruction requires: sve2p1 or ssve-aes sve-aes2 | ||
// CHECK-UNKNOWN: 4520fc00 <unknown> | ||
|
||
pmlal {z22.q-z23.q}, z13.d, z8.d // 01000101-00101000-11111101-10110110 | ||
// CHECK-INST: pmlal { z22.q, z23.q }, z13.d, z8.d | ||
// CHECK-ENCODING: [0xb6,0xfd,0x28,0x45] | ||
// CHECK-ERROR: instruction requires: sve2p1 or ssve-aes sve-aes2 | ||
// CHECK-UNKNOWN: 4528fdb6 <unknown> | ||
|
||
pmlal {z30.q-z31.q}, z31.d, z31.d // 01000101-00111111-11111111-11111110 | ||
// CHECK-INST: pmlal { z30.q, z31.q }, z31.d, z31.d | ||
// CHECK-ENCODING: [0xfe,0xff,0x3f,0x45] | ||
// CHECK-ERROR: instruction requires: sve2p1 or ssve-aes sve-aes2 | ||
// CHECK-UNKNOWN: 453ffffe <unknown> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2p1,+sve-aes2 2>&1 < %s | FileCheck %s | ||
|
||
// --------------------------------------------------------------------------// | ||
// Invalid vector list | ||
|
||
pmull {z0.q-z2.q}, z0.d, z0.d | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction | ||
// CHECK-NEXT: pmull {z0.q-z2.q}, z0.d, z0.d | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
pmull {z0.q-z0.q}, z0.d, z0.d | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid number of vectors | ||
// CHECK-NEXT: pmull {z0.q-z0.q}, z0.d, z0.d | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
pmull {z1.q-z2.q}, z0.d, z0.d | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: Invalid vector list, expected list with 2 consecutive SVE vectors, where the first vector is a multiple of 2 and with matching element types | ||
// CHECK-NEXT: pmull {z1.q-z2.q}, z0.d, z0.d | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
pmull {z0.d-z1.d}, z0.d, z0.d | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction | ||
// CHECK-NEXT: pmull {z0.d-z1.d}, z0.d, z0.d | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
// --------------------------------------------------------------------------// | ||
// Invalid single source vectors | ||
|
||
pmull {z0.q-z1.q}, z0.s, z0.d | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width | ||
// CHECK-NEXT: pmull {z0.q-z1.q}, z0.s, z0.d | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
pmull {z0.q-z1.q}, z0.d, z0.s | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width | ||
// CHECK-NEXT: pmull {z0.q-z1.q}, z0.d, z0.s | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve-aes2,+sve2p1 < %s \ | ||
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST | ||
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve-aes2,+ssve-aes < %s \ | ||
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST | ||
// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ | ||
// RUN: | FileCheck %s --check-prefix=CHECK-ERROR | ||
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve-aes2,+sve2p1 < %s \ | ||
// RUN: | llvm-objdump -d --mattr=+sve-aes2,+sve2p1 - | FileCheck %s --check-prefix=CHECK-INST | ||
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve-aes2,+sve2p1 < %s \ | ||
// RUN: | llvm-objdump -d --mattr=-sve-aes2 - | FileCheck %s --check-prefix=CHECK-UNKNOWN | ||
// Disassemble encoding and check the re-encoding (-show-encoding) matches. | ||
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve-aes2,+sve2p1 < %s \ | ||
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ | ||
// RUN: | llvm-mc -triple=aarch64 -mattr=+sve-aes2,+sve2p1 -disassemble -show-encoding \ | ||
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST | ||
|
||
pmull {z0.q-z1.q}, z0.d, z0.d // 01000101-00100000-11111000-00000000 | ||
// CHECK-INST: pmull { z0.q, z1.q }, z0.d, z0.d | ||
// CHECK-ENCODING: [0x00,0xf8,0x20,0x45] | ||
// CHECK-ERROR: instruction requires: sve2p1 or ssve-aes sve-aes2 | ||
// CHECK-UNKNOWN: 4520f800 <unknown> | ||
|
||
pmull {z22.q-z23.q}, z13.d, z8.d // 01000101-00101000-11111001-10110110 | ||
// CHECK-INST: pmull { z22.q, z23.q }, z13.d, z8.d | ||
// CHECK-ENCODING: [0xb6,0xf9,0x28,0x45] | ||
// CHECK-ERROR: instruction requires: sve2p1 or ssve-aes sve-aes2 | ||
// CHECK-UNKNOWN: 4528f9b6 <unknown> | ||
|
||
pmull {z30.q-z31.q}, z31.d, z31.d // 01000101-00111111-11111011-11111110 | ||
// CHECK-INST: pmull { z30.q, z31.q }, z31.d, z31.d | ||
// CHECK-ENCODING: [0xfe,0xfb,0x3f,0x45] | ||
// CHECK-ERROR: instruction requires: sve2p1 or ssve-aes sve-aes2 | ||
// CHECK-UNKNOWN: 453ffbfe <unknown> |