-
Notifications
You must be signed in to change notification settings - Fork 14.4k
[AArch64][llvm] Unify AArch64 tests into a single file (2/4) (NFC) #146329
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
jthackray
wants to merge
2
commits into
users/jthackray/unify-tests1
Choose a base branch
from
users/jthackray/unify-tests2
base: users/jthackray/unify-tests1
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
@@ -1,55 +1,129 @@ | ||
// RUN: llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+mec < %s | FileCheck %s | ||
// RUN: not llvm-mc -triple aarch64-none-linux-gnu < %s 2>&1 | FileCheck --check-prefix=CHECK-NO-MEC %s | ||
|
||
mrs x0, MECIDR_EL2 | ||
// CHECK: mrs x0, MECIDR_EL2 // encoding: [0xe0,0xa8,0x3c,0xd5] | ||
// CHECK-NO-MEC: [[@LINE-2]]:19: error: expected readable system register | ||
mrs x0, MECID_P0_EL2 | ||
// CHECK: mrs x0, MECID_P0_EL2 // encoding: [0x00,0xa8,0x3c,0xd5] | ||
// CHECK-NO-MEC: [[@LINE-2]]:19: error: expected readable system register | ||
mrs x0, MECID_A0_EL2 | ||
// CHECK: mrs x0, MECID_A0_EL2 // encoding: [0x20,0xa8,0x3c,0xd5] | ||
// CHECK-NO-MEC: [[@LINE-2]]:19: error: expected readable system register | ||
mrs x0, MECID_P1_EL2 | ||
// CHECK: mrs x0, MECID_P1_EL2 // encoding: [0x40,0xa8,0x3c,0xd5] | ||
// CHECK-NO-MEC: [[@LINE-2]]:19: error: expected readable system register | ||
mrs x0, MECID_A1_EL2 | ||
// CHECK: mrs x0, MECID_A1_EL2 // encoding: [0x60,0xa8,0x3c,0xd5] | ||
// CHECK-NO-MEC: [[@LINE-2]]:19: error: expected readable system register | ||
mrs x0, VMECID_P_EL2 | ||
// CHECK: mrs x0, VMECID_P_EL2 // encoding: [0x00,0xa9,0x3c,0xd5] | ||
// CHECK-NO-MEC: [[@LINE-2]]:19: error: expected readable system register | ||
mrs x0, VMECID_A_EL2 | ||
// CHECK: mrs x0, VMECID_A_EL2 // encoding: [0x20,0xa9,0x3c,0xd5] | ||
// CHECK-NO-MEC: [[@LINE-2]]:19: error: expected readable system register | ||
mrs x0, MECID_RL_A_EL3 | ||
// CHECK: mrs x0, MECID_RL_A_EL3 // encoding: [0x20,0xaa,0x3e,0xd5] | ||
// CHECK-NO-MEC: [[@LINE-2]]:19: error: expected readable system register | ||
msr MECID_P0_EL2, x0 | ||
// CHECK: msr MECID_P0_EL2, x0 // encoding: [0x00,0xa8,0x1c,0xd5] | ||
// CHECK-NO-MEC: [[@LINE-2]]:15: error: expected writable system register or pstate | ||
msr MECID_A0_EL2, x0 | ||
// CHECK: msr MECID_A0_EL2, x0 // encoding: [0x20,0xa8,0x1c,0xd5] | ||
// CHECK-NO-MEC: [[@LINE-2]]:15: error: expected writable system register or pstate | ||
msr MECID_P1_EL2, x0 | ||
// CHECK: msr MECID_P1_EL2, x0 // encoding: [0x40,0xa8,0x1c,0xd5] | ||
// CHECK-NO-MEC: [[@LINE-2]]:15: error: expected writable system register or pstate | ||
msr MECID_A1_EL2, x0 | ||
// CHECK: msr MECID_A1_EL2, x0 // encoding: [0x60,0xa8,0x1c,0xd5] | ||
// CHECK-NO-MEC: [[@LINE-2]]:15: error: expected writable system register or pstate | ||
msr VMECID_P_EL2, x0 | ||
// CHECK: msr VMECID_P_EL2, x0 // encoding: [0x00,0xa9,0x1c,0xd5] | ||
// CHECK-NO-MEC: [[@LINE-2]]:15: error: expected writable system register or pstate | ||
msr VMECID_A_EL2, x0 | ||
// CHECK: msr VMECID_A_EL2, x0 // encoding: [0x20,0xa9,0x1c,0xd5] | ||
// CHECK-NO-MEC: [[@LINE-2]]:15: error: expected writable system register or pstate | ||
msr MECID_RL_A_EL3, x0 | ||
// CHECK: msr MECID_RL_A_EL3, x0 // encoding: [0x20,0xaa,0x1e,0xd5] | ||
// CHECK-NO-MEC: [[@LINE-2]]:15: error: expected writable system register or pstate | ||
|
||
dc cigdpae, x0 | ||
// CHECK: dc cigdpae, x0 // encoding: [0xe0,0x7e,0x0c,0xd5] | ||
// CHECK-NO-MEC: [[@LINE-2]]:14: error: DC CIGDPAE requires: mec | ||
dc cipae, x0 | ||
// CHECK: dc cipae, x0 // encoding: [0x00,0x7e,0x0c,0xd5] | ||
// CHECK-NO-MEC: [[@LINE-2]]:14: error: DC CIPAE requires: mec | ||
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+mec < %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=+mec < %s \ | ||
// RUN: | llvm-objdump -d --mattr=+mec --no-print-imm-hex - | FileCheck %s --check-prefix=CHECK-INST | ||
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+mec < %s \ | ||
// RUN: | llvm-objdump -d --mattr=-mec --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=+mec < %s \ | ||
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ | ||
// RUN: | llvm-mc -triple=aarch64 -mattr=+mec -disassemble -show-encoding \ | ||
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST | ||
// RUN: llvm-mc -triple aarch64 -disassemble < %s 2>&1 | FileCheck --check-prefix=CHECK-NO-MEC %s | ||
|
||
|
||
mrs x0, MECIDR_EL2 | ||
// CHECK-INST: mrs x0, MECIDR_EL2 | ||
// CHECK-ENCODING: encoding: [0xe0,0xa8,0x3c,0xd5] | ||
// CHECK-ERROR: error: expected readable system register | ||
// CHECK-UNKNOWN: d53ca8e0 mrs x0, S3_4_C10_C8_7 | ||
|
||
mrs x0, MECID_P0_EL2 | ||
// CHECK-INST: mrs x0, MECID_P0_EL2 | ||
// CHECK-ENCODING: encoding: [0x00,0xa8,0x3c,0xd5] | ||
// CHECK-ERROR: error: expected readable system register | ||
// CHECK-UNKNOWN: d53ca800 mrs x0, S3_4_C10_C8_0 | ||
|
||
mrs x0, MECID_A0_EL2 | ||
// CHECK-INST: mrs x0, MECID_A0_EL2 | ||
// CHECK-ENCODING: encoding: [0x20,0xa8,0x3c,0xd5] | ||
// CHECK-ERROR: error: expected readable system register | ||
// CHECK-UNKNOWN: d53ca820 mrs x0, S3_4_C10_C8_1 | ||
|
||
mrs x0, MECID_P1_EL2 | ||
// CHECK-INST: mrs x0, MECID_P1_EL2 | ||
// CHECK-ENCODING: encoding: [0x40,0xa8,0x3c,0xd5] | ||
// CHECK-ERROR: error: expected readable system register | ||
// CHECK-UNKNOWN: d53ca840 mrs x0, S3_4_C10_C8_2 | ||
|
||
mrs x0, MECID_A1_EL2 | ||
// CHECK-INST: mrs x0, MECID_A1_EL2 | ||
// CHECK-ENCODING: encoding: [0x60,0xa8,0x3c,0xd5] | ||
// CHECK-ERROR: error: expected readable system register | ||
// CHECK-UNKNOWN: d53ca860 mrs x0, S3_4_C10_C8_3 | ||
|
||
mrs x0, VMECID_P_EL2 | ||
// CHECK-INST: mrs x0, VMECID_P_EL2 | ||
// CHECK-ENCODING: encoding: [0x00,0xa9,0x3c,0xd5] | ||
// CHECK-ERROR: error: expected readable system register | ||
// CHECK-UNKNOWN: d53ca900 mrs x0, S3_4_C10_C9_0 | ||
|
||
mrs x0, VMECID_A_EL2 | ||
// CHECK-INST: mrs x0, VMECID_A_EL2 | ||
// CHECK-ENCODING: encoding: [0x20,0xa9,0x3c,0xd5] | ||
// CHECK-ERROR: error: expected readable system register | ||
// CHECK-UNKNOWN: d53ca920 mrs x0, S3_4_C10_C9_1 | ||
|
||
mrs x0, MECID_RL_A_EL3 | ||
// CHECK-INST: mrs x0, MECID_RL_A_EL3 | ||
// CHECK-ENCODING: encoding: [0x20,0xaa,0x3e,0xd5] | ||
// CHECK-ERROR: error: expected readable system register | ||
// CHECK-UNKNOWN: d53eaa20 mrs x0, S3_6_C10_C10_1 | ||
|
||
msr MECID_P0_EL2, x0 | ||
// CHECK-INST: msr MECID_P0_EL2, x0 | ||
// CHECK-ENCODING: encoding: [0x00,0xa8,0x1c,0xd5] | ||
// CHECK-ERROR: error: expected writable system register or pstate | ||
// CHECK-UNKNOWN: d51ca800 msr S3_4_C10_C8_0, x0 | ||
|
||
msr MECID_A0_EL2, x0 | ||
// CHECK-INST: msr MECID_A0_EL2, x0 | ||
// CHECK-ENCODING: encoding: [0x20,0xa8,0x1c,0xd5] | ||
// CHECK-ERROR: error: expected writable system register or pstate | ||
// CHECK-UNKNOWN: d51ca820 msr S3_4_C10_C8_1, x0 | ||
|
||
msr MECID_P1_EL2, x0 | ||
// CHECK-INST: msr MECID_P1_EL2, x0 | ||
// CHECK-ENCODING: encoding: [0x40,0xa8,0x1c,0xd5] | ||
// CHECK-ERROR: error: expected writable system register or pstate | ||
// CHECK-UNKNOWN: d51ca840 msr S3_4_C10_C8_2, x0 | ||
|
||
msr MECID_A1_EL2, x0 | ||
// CHECK-INST: msr MECID_A1_EL2, x0 | ||
// CHECK-ENCODING: encoding: [0x60,0xa8,0x1c,0xd5] | ||
// CHECK-ERROR: error: expected writable system register or pstate | ||
// CHECK-UNKNOWN: d51ca860 msr S3_4_C10_C8_3, x0 | ||
|
||
msr VMECID_P_EL2, x0 | ||
// CHECK-INST: msr VMECID_P_EL2, x0 | ||
// CHECK-ENCODING: encoding: [0x00,0xa9,0x1c,0xd5] | ||
// CHECK-ERROR: error: expected writable system register or pstate | ||
// CHECK-UNKNOWN: d51ca900 msr S3_4_C10_C9_0, x0 | ||
|
||
msr VMECID_A_EL2, x0 | ||
// CHECK-INST: msr VMECID_A_EL2, x0 | ||
// CHECK-ENCODING: encoding: [0x20,0xa9,0x1c,0xd5] | ||
// CHECK-ERROR: error: expected writable system register or pstate | ||
// CHECK-UNKNOWN: d51ca920 msr S3_4_C10_C9_1, x0 | ||
|
||
msr MECID_RL_A_EL3, x0 | ||
// CHECK-INST: msr MECID_RL_A_EL3, x0 | ||
// CHECK-ENCODING: encoding: [0x20,0xaa,0x1e,0xd5] | ||
// CHECK-ERROR: error: expected writable system register or pstate | ||
// CHECK-UNKNOWN: d51eaa20 msr S3_6_C10_C10_1, x0 | ||
|
||
dc cigdpae, x0 | ||
// CHECK-INST: dc cigdpae, x0 | ||
// CHECK-ENCODING: encoding: [0xe0,0x7e,0x0c,0xd5] | ||
// CHECK-ERROR: :[[@LINE-3]]:4: error: DC CIGDPAE requires: mec | ||
// CHECK-UNKNOWN: d50c7ee0 sys #4, c7, c14, #7, x0 | ||
// CHECK-NO-MEC: sys #4, c7, c14, #7, x0 | ||
|
||
dc cipae, x0 | ||
// CHECK-INST: dc cipae, x0 | ||
// CHECK-ENCODING: encoding: [0x00,0x7e,0x0c,0xd5] | ||
// CHECK-ERROR: :[[@LINE-3]]:4: error: DC CIPAE requires: mec | ||
// CHECK-UNKNOWN: d50c7e00 sys #4, c7, c14, #0, x0 | ||
// CHECK-NO-MEC: sys #4, c7, c14, #0, x0 | ||
|
||
sys #4, c7, c14, #7, x0 | ||
// CHECK-INST: dc cigdpae, x0 | ||
// CHECK-ENCODING: encoding: [0xe0,0x7e,0x0c,0xd5] | ||
// CHECK-UNKNOWN: d50c7ee0 sys #4, c7, c14, #7, x0 | ||
|
||
sys #4, c7, c14, #0, x0 | ||
// CHECK-INST: dc cipae, x0 | ||
// CHECK-ENCODING: encoding: [0x00,0x7e,0x0c,0xd5] | ||
// CHECK-UNKNOWN: d50c7e00 sys #4, c7, c14, #0, x0 |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are also missing the test that
CHECK-NO-MEC
was doing, that they disassemble to a cleansys
without+mec
.We should probably also be checking that the
sys
instructions correctly assemble somewhere.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, both fixed.