Skip to content

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

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: users/jthackray/unify-tests3
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
1,147 changes: 782 additions & 365 deletions llvm/test/MC/AArch64/armv9.6a-lsui.s

Large diffs are not rendered by default.

57 changes: 41 additions & 16 deletions llvm/test/MC/AArch64/armv9.6a-occmo.s
Original file line number Diff line number Diff line change
@@ -1,17 +1,42 @@
// RUN: llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+occmo -mattr=+mte %s | FileCheck %s
// RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding %s -mattr=+mte 2>&1 | FileCheck --check-prefix=ERROR %s
.func:
// CHECK: .func:
dc civaoc, x12
// CHECK: dc civaoc, x12 // encoding: [0x0c,0x7f,0x0b,0xd5]
// ERROR: error: DC CIVAOC requires: occmo
dc cigdvaoc, x0
// CHECK: dc cigdvaoc, x0 // encoding: [0xe0,0x7f,0x0b,0xd5]
// ERROR: error: DC CIGDVAOC requires: mte, memtag, occmo
dc cvaoc, x13
// CHECK: dc cvaoc, x13 // encoding: [0x0d,0x7b,0x0b,0xd5]
// ERROR: error: DC CVAOC requires: occmo
dc cgdvaoc, x1
// CHECK: dc cgdvaoc, x1 // encoding: [0xe1,0x7b,0x0b,0xd5]
// ERROR: error: DC CGDVAOC requires: mte, memtag, occmo
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+occmo,+mte,+memtag < %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-prefixes=CHECK-ERROR
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+occmo,+mte,+memtag < %s \
// RUN: | llvm-objdump -d --mattr=+occmo,+mte,+memtag --no-print-imm-hex - | FileCheck %s --check-prefix=CHECK-INST
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+occmo,+mte,+memtag < %s \
// RUN: | llvm-objdump -d --mattr=-occmo,-mte,-memtag --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 -mattr=+occmo,+mte,+memtag < %s \
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \
// RUN: | llvm-mc -triple=aarch64 -mattr=+occmo,+mte,+memtag -disassemble -show-encoding \
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST



dc civaoc, x12
// CHECK-INST: dc civaoc, x12
// CHECK-ENCODING: encoding: [0x0c,0x7f,0x0b,0xd5]
// CHECK-ERROR: error: DC CIVAOC requires: occmo
// CHECK-UNKNOWN: d50b7f0c sys #3, c7, c15, #0, x12

dc cigdvaoc, x0
// CHECK-INST: dc cigdvaoc, x0
// CHECK-ENCODING: encoding: [0xe0,0x7f,0x0b,0xd5]
// CHECK-ERROR: error: DC CIGDVAOC requires: mte, memtag, occmo
// CHECK-UNKNOWN: d50b7fe0 sys #3, c7, c15, #7, x0
// ERROR: :[[@LINE-3]]:4: error: DC CIGDVAOC requires: mte, memtag, occmo

dc cvaoc, x13
// CHECK-INST: dc cvaoc, x13
// CHECK-ENCODING: encoding: [0x0d,0x7b,0x0b,0xd5]
// CHECK-ERROR: error: DC CVAOC requires: occmo
// CHECK-UNKNOWN: d50b7b0d sys #3, c7, c11, #0, x13
// ERROR: :[[@LINE-3]]:4: error: DC CVAOC requires: occmo

dc cgdvaoc, x1
// CHECK-INST: dc cgdvaoc, x1
// CHECK-ENCODING: encoding: [0xe1,0x7b,0x0b,0xd5]
// CHECK-ERROR: error: DC CGDVAOC requires: mte, memtag, occmo
// CHECK-UNKNOWN: d50b7be1 sys #3, c7, c11, #7, x1
// ERROR: :[[@LINE-3]]:4: error: DC CGDVAOC requires: mte, memtag, occmo
36 changes: 25 additions & 11 deletions llvm/test/MC/AArch64/armv9.6a-pcdphint.s
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
// RUN: llvm-mc -triple aarch64 -show-encoding -mattr=+pcdphint %s | FileCheck %s
// RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding %s 2>&1 | FileCheck --check-prefix=ERROR %s

.func:
// CHECK: .func:
stshh keep
// CHECK: stshh keep // encoding: [0x1f,0x96,0x01,0xd5]
// ERROR: error: instruction requires: pcdphint
stshh strm
// CHECK: stshh strm // encoding: [0x3f,0x96,0x01,0xd5]
// ERROR: error: instruction requires: pcdphint
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+pcdphint < %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-prefixes=CHECK-ERROR
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+pcdphint < %s \
// RUN: | llvm-objdump -d --mattr=+pcdphint - | FileCheck %s --check-prefix=CHECK-INST
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+pcdphint < %s \
// RUN: | llvm-objdump -d --mattr=-pcdphint - | FileCheck %s --check-prefix=CHECK-UNKNOWN
// Disassemble encoding and check the re-encoding (-show-encoding) matches.
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+pcdphint < %s \
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \
// RUN: | llvm-mc -triple=aarch64 -mattr=+pcdphint -disassemble -show-encoding \
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST

stshh keep
// CHECK-INST: stshh keep
// CHECK-ENCODING: encoding: [0x1f,0x96,0x01,0xd5]
// CHECK-ERROR: error: instruction requires: pcdphint
// CHECK-UNKNOWN: d501961f msr S0_1_C9_C6_0, xzr
// ERROR: :[[@LINE-3]]:3: error: instruction requires: pcdphint

stshh strm
// CHECK-INST: stshh strm
// CHECK-ENCODING: encoding: [0x3f,0x96,0x01,0xd5]
// CHECK-ERROR: error: instruction requires: pcdphint
// CHECK-UNKNOWN: d501963f msr S0_1_C9_C6_1, xzr
// ERROR: :[[@LINE-3]]:3: error: instruction requires: pcdphint
52 changes: 40 additions & 12 deletions llvm/test/MC/AArch64/armv9.6a-rme-gpc3.s
Original file line number Diff line number Diff line change
@@ -1,19 +1,47 @@
# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
// RUN: llvm-mc -triple aarch64 -show-encoding %s | FileCheck %s
.func:
// 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-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


apas x0
// CHECK-INST: apas x0
// CHECK-ENCODING: encoding: [0x00,0x70,0x0e,0xd5]
// CHECK-UNKNOWN: d50e7000 apas x0

apas x1
// CHECK-INST: apas x1
// CHECK-ENCODING: encoding: [0x01,0x70,0x0e,0xd5]
// CHECK-UNKNOWN: d50e7001 apas x1

apas x2
// CHECK-INST: apas x2
// CHECK-ENCODING: encoding: [0x02,0x70,0x0e,0xd5]
// CHECK-UNKNOWN: d50e7002 apas x2

apas x17
// CHECK-INST: apas x17
// CHECK-ENCODING: encoding: [0x11,0x70,0x0e,0xd5]
// CHECK-UNKNOWN: d50e7011 apas x17

apas x30
// CHECK-INST: apas x30
// CHECK-ENCODING: encoding: [0x1e,0x70,0x0e,0xd5]
// CHECK-UNKNOWN: d50e701e apas x30

mrs x3, GPCBW_EL3
msr GPCBW_EL3, x4
// CHECK-INST: mrs x3, GPCBW_EL3
// CHECK-ENCODING: encoding: [0xa3,0x21,0x3e,0xd5]
// CHECK-UNKNOWN: d53e21a3 mrs x3, GPCBW_EL3

# CHECK: .func:
# CHECK-NEXT: apas x0 // encoding: [0x00,0x70,0x0e,0xd5]
# CHECK-NEXT: apas x1 // encoding: [0x01,0x70,0x0e,0xd5]
# CHECK-NEXT: apas x2 // encoding: [0x02,0x70,0x0e,0xd5]
# CHECK-NEXT: apas x17 // encoding: [0x11,0x70,0x0e,0xd5]
# CHECK-NEXT: apas x30 // encoding: [0x1e,0x70,0x0e,0xd5]
# CHECK-NEXT: mrs x3, GPCBW_EL3 // encoding: [0xa3,0x21,0x3e,0xd5]
# CHECK-NEXT: msr GPCBW_EL3, x4 // encoding: [0xa4,0x21,0x1e,0xd5]
msr GPCBW_EL3, x4
// CHECK-INST: msr GPCBW_EL3, x4
// CHECK-ENCODING: encoding: [0xa4,0x21,0x1e,0xd5]
// CHECK-UNKNOWN: d51e21a4 msr GPCBW_EL3, x4
Loading