Skip to content

[AArch64][llvm] Unify AArch64 tests into a single file (1/4) (NFC) #146328

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions llvm/test/MC/AArch64/armv8.9a-ats1a.s
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
// RUN: llvm-mc -triple aarch64 -show-encoding %s | FileCheck %s
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefixes=CHECK-UNKNOWN
// Disassemble encoding and check the re-encoding (-show-encoding) matches.
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \
// RUN: | llvm-mc -triple=aarch64 -disassemble -show-encoding \
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST



at s1e1a, x1
// CHECK: at s1e1a, x1 // encoding: [0x41,0x79,0x08,0xd5]
// CHECK-INST: at s1e1a, x1
// CHECK-ENCODING: encoding: [0x41,0x79,0x08,0xd5]
// CHECK-UNKNOWN: d5087941 at s1e1a, x1

at s1e2a, x1
// CHECK: at s1e2a, x1 // encoding: [0x41,0x79,0x0c,0xd5]
// CHECK-INST: at s1e2a, x1
// CHECK-ENCODING: encoding: [0x41,0x79,0x0c,0xd5]
// CHECK-UNKNOWN: d50c7941 at s1e2a, x1

at s1e3a, x1
// CHECK: at s1e3a, x1 // encoding: [0x41,0x79,0x0e,0xd5]
// CHECK-INST: at s1e3a, x1
// CHECK-ENCODING: encoding: [0x41,0x79,0x0e,0xd5]
// CHECK-UNKNOWN: d50e7941 at s1e3a, x1
40 changes: 36 additions & 4 deletions llvm/test/MC/AArch64/armv9.4a-ebep.s
Original file line number Diff line number Diff line change
@@ -1,9 +1,41 @@
// RUN: llvm-mc -triple aarch64 -show-encoding < %s | FileCheck %s
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
// RUN: | llvm-objdump -d --no-print-imm-hex - | FileCheck %s --check-prefix=CHECK-UNKNOWN
// Disassemble encoding and check the re-encoding (-show-encoding) matches.
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \
// RUN: | llvm-mc -triple=aarch64 -disassemble -show-encoding \
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST


mrs x2, PM
// CHECK-INST: mrs x2, PM
// CHECK-ENCODING: encoding: [0x22,0x43,0x38,0xd5]
// CHECK-UNKNOWN: d5384322 mrs x2, PM

mrs x3, PM
// CHECK-INST: mrs x3, PM
// CHECK-ENCODING: encoding: [0x23,0x43,0x38,0xd5]
// CHECK-UNKNOWN: d5384323 mrs x3, PM

msr PM, x3
// CHECK-INST: msr PM, x3
// CHECK-ENCODING: encoding: [0x23,0x43,0x18,0xd5]
// CHECK-UNKNOWN: d5184323 msr PM, x3

msr PM, x6
// CHECK-INST: msr PM, x6
// CHECK-ENCODING: encoding: [0x26,0x43,0x18,0xd5]
// CHECK-UNKNOWN: d5184326 msr PM, x6

msr PM, #0
// CHECK-INST: msr PM, #0
// CHECK-ENCODING: encoding: [0x1f,0x42,0x01,0xd5]
// CHECK-UNKNOWN: d501421f msr PM, #0

msr PM, #1
// CHECK-INST: msr PM, #1
// CHECK-ENCODING: encoding: [0x1f,0x43,0x01,0xd5]
// CHECK-UNKNOWN: d501431f msr PM, #1

// CHECK: mrs x2, {{pm|PM}} // encoding: [0x22,0x43,0x38,0xd5]
// CHECK: msr {{pm|PM}}, x3 // encoding: [0x23,0x43,0x18,0xd5]
// CHECK: msr {{pm|PM}}, #1 // encoding: [0x1f,0x43,0x01,0xd5]
28 changes: 23 additions & 5 deletions llvm/test/MC/AArch64/armv9.5a-e3dse.s
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
// RUN: llvm-mc -triple aarch64 -show-encoding < %s | FileCheck %s
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
// Disassemble encoding and check the re-encoding (-show-encoding) matches.
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \
// RUN: | llvm-mc -triple=aarch64 -disassemble -show-encoding \
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST



mrs x0, VDISR_EL3
// CHECK: mrs x0, VDISR_EL3 // encoding: [0x20,0xc1,0x3e,0xd5]
// CHECK-INST: mrs x0, VDISR_EL3
// CHECK-ENCODING: encoding: [0x20,0xc1,0x3e,0xd5]
// CHECK-UNKNOWN: d53ec120 mrs x0, VDISR_EL3

msr VDISR_EL3, x0
// CHECK: msr VDISR_EL3, x0 // encoding: [0x20,0xc1,0x1e,0xd5]
// CHECK-INST: msr VDISR_EL3, x0
// CHECK-ENCODING: encoding: [0x20,0xc1,0x1e,0xd5]
// CHECK-UNKNOWN: d51ec120 msr VDISR_EL3, x0

mrs x0, VSESR_EL3
// CHECK: mrs x0, VSESR_EL3 // encoding: [0x60,0x52,0x3e,0xd5]
// CHECK-INST: mrs x0, VSESR_EL3
// CHECK-ENCODING: encoding: [0x60,0x52,0x3e,0xd5]
// CHECK-UNKNOWN: d53e5260 mrs x0, VSESR_EL3

msr VSESR_EL3, x0
// CHECK: msr VSESR_EL3, x0 // encoding: [0x60,0x52,0x1e,0xd5]
// CHECK-INST: msr VSESR_EL3, x0
// CHECK-ENCODING: encoding: [0x60,0x52,0x1e,0xd5]
// CHECK-UNKNOWN: d51e5260 msr VSESR_EL3, x0
20 changes: 17 additions & 3 deletions llvm/test/MC/AArch64/armv9.5a-fgwte3.s
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
// RUN: llvm-mc -triple aarch64 -show-encoding < %s | FileCheck %s
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
// Disassemble encoding and check the re-encoding (-show-encoding) matches.
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \
// RUN: | llvm-mc -triple=aarch64 -disassemble -show-encoding \
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST


mrs x0, FGWTE3_EL3
// CHECK: mrs x0, FGWTE3_EL3 // encoding: [0xa0,0x11,0x3e,0xd5]
// CHECK-INST: mrs x0, FGWTE3_EL3
// CHECK-ENCODING: encoding: [0xa0,0x11,0x3e,0xd5]
// CHECK-UNKNOWN: d53e11a0 mrs x0, FGWTE3_EL3

msr FGWTE3_EL3, x0
// CHECK: msr FGWTE3_EL3, x0 // encoding: [0xa0,0x11,0x1e,0xd5]
// CHECK-INST: msr FGWTE3_EL3, x0
// CHECK-ENCODING: encoding: [0xa0,0x11,0x1e,0xd5]
// CHECK-UNKNOWN: d51e11a0 msr FGWTE3_EL3, x0
29 changes: 24 additions & 5 deletions llvm/test/MC/AArch64/armv9.5a-hacdbs.s
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
// RUN: llvm-mc -triple aarch64 -show-encoding < %s | FileCheck %s
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
// Disassemble encoding and check the re-encoding (-show-encoding) matches.
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \
// RUN: | llvm-mc -triple=aarch64 -disassemble -show-encoding \
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST


mrs x0, HACDBSBR_EL2
// CHECK: mrs x0, HACDBSBR_EL2 // encoding: [0x80,0x23,0x3c,0xd5]
// CHECK-INST: mrs x0, HACDBSBR_EL2
// CHECK-ENCODING: encoding: [0x80,0x23,0x3c,0xd5]
// CHECK-UNKNOWN: d53c2380 mrs x0, HACDBSBR_EL2

msr HACDBSBR_EL2, x0
// CHECK: msr HACDBSBR_EL2, x0 // encoding: [0x80,0x23,0x1c,0xd5]
// CHECK-INST: msr HACDBSBR_EL2, x0
// CHECK-ENCODING: encoding: [0x80,0x23,0x1c,0xd5]
// CHECK-UNKNOWN: d51c2380 msr HACDBSBR_EL2, x0

mrs x0, HACDBSCONS_EL2
// CHECK: mrs x0, HACDBSCONS_EL2 // encoding: [0xa0,0x23,0x3c,0xd5]
// CHECK-INST: mrs x0, HACDBSCONS_EL2
// CHECK-ENCODING: encoding: [0xa0,0x23,0x3c,0xd5]
// CHECK-UNKNOWN: d53c23a0 mrs x0, HACDBSCONS_EL2

msr HACDBSCONS_EL2, x0
// CHECK: msr HACDBSCONS_EL2, x0 // encoding: [0xa0,0x23,0x1c,0xd5]
// CHECK-INST: msr HACDBSCONS_EL2, x0
// CHECK-ENCODING: encoding: [0xa0,0x23,0x1c,0xd5]
// CHECK-UNKNOWN: d51c23a0 msr HACDBSCONS_EL2, x0

30 changes: 25 additions & 5 deletions llvm/test/MC/AArch64/armv9.5a-hdbss.s
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
// RUN: llvm-mc -triple aarch64 -show-encoding < %s | FileCheck %s
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
// Disassemble encoding and check the re-encoding (-show-encoding) matches.
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \
// RUN: | llvm-mc -triple=aarch64 -disassemble -show-encoding \
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST



mrs x0, HDBSSBR_EL2
// CHECK: mrs x0, HDBSSBR_EL2 // encoding: [0x40,0x23,0x3c,0xd5]
// CHECK-INST: mrs x0, HDBSSBR_EL2
// CHECK-ENCODING: encoding: [0x40,0x23,0x3c,0xd5]
// CHECK-UNKNOWN: d53c2340 mrs x0, HDBSSBR_EL2

msr HDBSSBR_EL2, x0
// CHECK: msr HDBSSBR_EL2, x0 // encoding: [0x40,0x23,0x1c,0xd5]
// CHECK-INST: msr HDBSSBR_EL2, x0
// CHECK-ENCODING: encoding: [0x40,0x23,0x1c,0xd5]
// CHECK-UNKNOWN: d51c2340 msr HDBSSBR_EL2, x0

mrs x0, HDBSSPROD_EL2
// CHECK: mrs x0, HDBSSPROD_EL2 // encoding: [0x60,0x23,0x3c,0xd5]
// CHECK-INST: mrs x0, HDBSSPROD_EL2
// CHECK-ENCODING: encoding: [0x60,0x23,0x3c,0xd5]
// CHECK-UNKNOWN: d53c2360 mrs x0, HDBSSPROD_EL2

msr HDBSSPROD_EL2, x0
// CHECK: msr HDBSSPROD_EL2, x0 // encoding: [0x60,0x23,0x1c,0xd5]
// CHECK-INST: msr HDBSSPROD_EL2, x0
// CHECK-ENCODING: encoding: [0x60,0x23,0x1c,0xd5]
// CHECK-UNKNOWN: d51c2360 msr HDBSSPROD_EL2, x0

16 changes: 14 additions & 2 deletions llvm/test/MC/AArch64/armv9.5a-spmu2.s
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
// RUN: llvm-mc -triple aarch64 -show-encoding < %s | FileCheck %s
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
// Disassemble encoding and check the re-encoding (-show-encoding) matches.
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \
// RUN: | llvm-mc -triple=aarch64 -disassemble -show-encoding \
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST



msr SPMZR_EL0, x0
// CHECK: msr SPMZR_EL0, x0 // encoding: [0x80,0x9c,0x13,0xd5]
// CHECK-INST: msr SPMZR_EL0, x0
// CHECK-ENCODING: encoding: [0x80,0x9c,0x13,0xd5]
// CHECK-UNKNOWN: d5139c80 msr SPMZR_EL0, x0
20 changes: 17 additions & 3 deletions llvm/test/MC/AArch64/armv9.5a-step2.s
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
// RUN: llvm-mc -triple aarch64 -show-encoding < %s | FileCheck %s
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
// Disassemble encoding and check the re-encoding (-show-encoding) matches.
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \
// RUN: | llvm-mc -triple=aarch64 -disassemble -show-encoding \
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST



mrs x0, MDSTEPOP_EL1
// CHECK: mrs x0, MDSTEPOP_EL1 // encoding: [0x40,0x05,0x30,0xd5]
// CHECK-INST: mrs x0, MDSTEPOP_EL1
// CHECK-ENCODING: encoding: [0x40,0x05,0x30,0xd5]
// CHECK-UNKNOWN: d5300540 mrs x0, MDSTEPOP_EL1

msr MDSTEPOP_EL1, x0
// CHECK: msr MDSTEPOP_EL1, x0 // encoding: [0x40,0x05,0x10,0xd5]
// CHECK-INST: msr MDSTEPOP_EL1, x0
// CHECK-ENCODING: encoding: [0x40,0x05,0x10,0xd5]
// CHECK-UNKNOWN: d5100540 msr MDSTEPOP_EL1, x0
Loading
Loading