-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[llvm][AArch64][Assembly]: Add FDOT2/FDOT4 assembly and disassembly. (#…
…70237) This patch adds the feature flag FDOT2/FDOT4 and the assembly/disassembly for the following instructions of NEON and SVE2: * NEON: - FDOTlane - FDOT * SVE2: - FDOT_ZZZI_BtoH - FDOT_ZZZ_BtoH - FDOT_ZZZI_BtoS - FDOT_ZZZ_BtoS That is according to this documentation: https://developer.arm.com/documentation/ddi0602/2023-09
- Loading branch information
1 parent
a8ead56
commit f16b7c6
Showing
15 changed files
with
476 additions
and
26 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
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
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
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,59 @@ | ||
// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+fp8dot2,+fp8dot4 2>&1 < %s| FileCheck %s | ||
|
||
// --------------------------------------------------------------------------// | ||
// Element size extension incorrect | ||
|
||
fdot v31.4h, v0.8h, v0.8b | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction | ||
// CHECK-NEXT: fdot v31.4h, v0.8h, v0.8b | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
fdot v31.8h, v0.16b, v31.16h | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid vector kind qualifier | ||
// CHECK-NEXT: fdot v31.8h, v0.16b, v31.16h | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
fdot v0.2s, v0.8s, v31.8b | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid vector kind qualifier | ||
// CHECK-NEXT: fdot v0.2s, v0.8s, v31.8b | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
fdot v31.4s, v0, v31.16b | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction | ||
// CHECK-NEXT: fdot v31.4s, v0, v31.16b | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
//--------------------------------------------------------------------------// | ||
// Last Register range is between 0-15 | ||
|
||
fdot v31.4h, v31.8b, v16.2b[0] | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction | ||
// CHECK-NEXT: fdot v31.4h, v31.8b, v16.2b[0] | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
fdot v0.8h, v0.16b, v16.2b[7] | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction | ||
// CHECK-NEXT: fdot v0.8h, v0.16b, v16.2b[7] | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
// --------------------------------------------------------------------------// | ||
// Out of range index | ||
fdot v31.4h, v31.8b, v15.2b[-1] | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: vector lane must be an integer in range [0, 7]. | ||
// CHECK-NEXT: fdot v31.4h, v31.8b, v15.2b[-1] | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
fdot v0.8h, v0.16b, v15.2b[8] | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: vector lane must be an integer in range [0, 7]. | ||
// CHECK-NEXT: fdot v0.8h, v0.16b, v15.2b[8] | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
fdot v0.2s, v0.8b, v31.4b[-1] | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: vector lane must be an integer in range [0, 3]. | ||
// CHECK-NEXT: fdot v0.2s, v0.8b, v31.4b[-1] | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
fdot v0.4s, v31.16b, v0.4b[4] | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: vector lane must be an integer in range [0, 3]. | ||
// CHECK-NEXT: fdot v0.4s, v31.16b, v0.4b[4] | ||
// 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,63 @@ | ||
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+fp8dot2,+fp8dot4 < %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=+fp8dot2,+fp8dot4 < %s \ | ||
// RUN: | llvm-objdump -d --mattr=+fp8dot2,+fp8dot4 - | FileCheck %s --check-prefix=CHECK-INST | ||
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+fp8dot2,+fp8dot4 < %s \ | ||
// RUN: | llvm-objdump -d --mattr=-sme2 - | FileCheck %s --check-prefix=CHECK-UNKNOWN | ||
// Disassemble encoding and check the re-encoding (-show-encoding) matches. | ||
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+fp8dot2,+fp8dot4 < %s \ | ||
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ | ||
// RUN: | llvm-mc -triple=aarch64 -mattr=+fp8dot2,+fp8dot4 -disassemble -show-encoding \ | ||
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST | ||
|
||
/// VECTOR | ||
fdot v31.4h, v0.8b, v0.8b | ||
// CHECK-INST: fdot v31.4h, v0.8b, v0.8b | ||
// CHECK-ENCODING: [0x1f,0xfc,0x40,0x0e] | ||
// CHECK-ERROR: instruction requires: fp8dot2 | ||
// CHECK-UNKNOWN: 0e40fc1f <unknown> | ||
|
||
fdot v31.8h, v0.16b, v31.16b | ||
// CHECK-INST: fdot v31.8h, v0.16b, v31.16b | ||
// CHECK-ENCODING: [0x1f,0xfc,0x5f,0x4e] | ||
// CHECK-ERROR: instruction requires: fp8dot2 | ||
// CHECK-UNKNOWN: 4e5ffc1f <unknown> | ||
|
||
fdot v0.2s, v0.8b, v31.8b | ||
// CHECK-INST: fdot v0.2s, v0.8b, v31.8b | ||
// CHECK-ENCODING: [0x00,0xfc,0x1f,0x0e] | ||
// CHECK-ERROR: instruction requires: fp8dot4 | ||
// CHECK-UNKNOWN: 0e1ffc00 <unknown> | ||
|
||
fdot v31.4s, v0.16b, v31.16b | ||
// CHECK-INST: fdot v31.4s, v0.16b, v31.16b | ||
// CHECK-ENCODING: [0x1f,0xfc,0x1f,0x4e] | ||
// CHECK-ERROR: instruction requires: fp8dot4 | ||
// CHECK-UNKNOWN: 4e1ffc1f <unknown> | ||
|
||
//INDEXED | ||
fdot v31.4h, v31.8b, v15.2b[0] | ||
// CHECK-INST: fdot v31.4h, v31.8b, v15.2b[0] | ||
// CHECK-ENCODING: [0xff,0x03,0x4f,0x0f] | ||
// CHECK-ERROR: instruction requires: fp8dot2 | ||
// CHECK-UNKNOWN: 0f4f03ff <unknown> | ||
|
||
fdot v0.8h, v0.16b, v15.2b[7] | ||
// CHECK-INST: fdot v0.8h, v0.16b, v15.2b[7] | ||
// CHECK-ENCODING: [0x00,0x08,0x7f,0x4f] | ||
// CHECK-ERROR: instruction requires: fp8dot2 | ||
// CHECK-UNKNOWN: 4f7f0800 <unknown> | ||
|
||
fdot v0.2s, v0.8b, v31.4b[0] | ||
// CHECK-INST: fdot v0.2s, v0.8b, v31.4b[0] | ||
// CHECK-ENCODING: [0x00,0x00,0x1f,0x0f] | ||
// CHECK-ERROR: instruction requires: fp8dot4 | ||
// CHECK-UNKNOWN: 0f1f0000 <unknown> | ||
|
||
fdot v0.4s, v31.16b, v0.4b[3] | ||
// CHECK-INST: fdot v0.4s, v31.16b, v0.4b[3] | ||
// CHECK-ENCODING: [0xe0,0x0b,0x20,0x4f] | ||
// CHECK-ERROR: instruction requires: fp8dot4 | ||
// CHECK-UNKNOWN: 4f200be0 <unknown> |
Oops, something went wrong.