-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
[AArch64] Assembly support for the Checked Pointer Arithmetic Extension #73777
Merged
Merged
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 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
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,69 @@ | ||
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve -mattr=+cpa < %s \ | ||
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST | ||
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme -mattr=+cpa < %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: not llvm-mc -triple=aarch64 -show-encoding -mattr=+cpa < %s 2>&1 \ | ||
// RUN: | FileCheck %s --check-prefix=CHECK-ERROR-NO-SVESME | ||
// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s 2>&1 \ | ||
// RUN: | FileCheck %s --check-prefix=CHECK-ERROR-NO-CPA | ||
// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sme < %s 2>&1 \ | ||
// RUN: | FileCheck %s --check-prefix=CHECK-ERROR-NO-CPA | ||
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve -mattr=+cpa < %s \ | ||
// RUN: | llvm-objdump -d --mattr=+sve --mattr=+cpa - \ | ||
// RUN: | FileCheck %s --check-prefix=CHECK-INST | ||
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve -mattr=+cpa < %s \ | ||
// RUN: | llvm-objdump -d --mattr=+sve --mattr=-cpa - \ | ||
// RUN: | FileCheck %s --check-prefix=CHECK-UNKNOWN | ||
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve -mattr=+cpa < %s \ | ||
// RUN: | llvm-objdump -d --mattr=-sve --mattr=+cpa - \ | ||
// RUN: | FileCheck %s --check-prefix=CHECK-UNKNOWN | ||
|
||
addpt z23.d, z13.d, z8.d | ||
// CHECK-INST: addpt z23.d, z13.d, z8.d | ||
// CHECK-ENCODING: [0xb7,0x09,0xe8,0x04] | ||
// CHECK-ERROR: instruction requires: cpa sve or sme | ||
// CHECK-ERROR-NO-SVESME: instruction requires: sve or sme | ||
// CHECK-ERROR-NO-CPA: instruction requires: cpa | ||
// CHECK-UNKNOWN: 04e809b7 <unknown> | ||
|
||
addpt z23.d, p3/m, z23.d, z13.d | ||
// CHECK-INST: addpt z23.d, p3/m, z23.d, z13.d | ||
// CHECK-ENCODING: [0xb7,0x0d,0xc4,0x04] | ||
// CHECK-ERROR: instruction requires: cpa sve or sme | ||
// CHECK-ERROR-NO-SVESME: instruction requires: sve or sme | ||
// CHECK-ERROR-NO-CPA: instruction requires: cpa | ||
// CHECK-UNKNOWN: 04c40db7 <unknown> | ||
|
||
subpt z23.d, z13.d, z8.d | ||
// CHECK-INST: subpt z23.d, z13.d, z8.d | ||
// CHECK-ENCODING: [0xb7,0x0d,0xe8,0x04] | ||
// CHECK-ERROR: instruction requires: cpa sve or sme | ||
// CHECK-ERROR-NO-SVESME: instruction requires: sve or sme | ||
// CHECK-ERROR-NO-CPA: instruction requires: cpa | ||
// CHECK-UNKNOWN: 04e80db7 <unknown> | ||
|
||
subpt z23.d, p3/m, z23.d, z13.d | ||
// CHECK-INST: subpt z23.d, p3/m, z23.d, z13.d | ||
// CHECK-ENCODING: [0xb7,0x0d,0xc5,0x04] | ||
// CHECK-ERROR: instruction requires: cpa sve or sme | ||
// CHECK-ERROR-NO-SVESME: instruction requires: sve or sme | ||
// CHECK-ERROR-NO-CPA: instruction requires: cpa | ||
// CHECK-UNKNOWN: 04c50db7 <unknown> | ||
|
||
madpt z0.d, z1.d, z31.d | ||
// CHECK-INST: madpt z0.d, z1.d, z31.d | ||
// CHECK-ENCODING: [0xe0,0xdb,0xc1,0x44] | ||
// CHECK-ERROR: instruction requires: cpa sve or sme | ||
// CHECK-ERROR-NO-SVESME: instruction requires: sve or sme | ||
// CHECK-ERROR-NO-CPA: instruction requires: cpa | ||
// CHECK-UNKNOWN: 44c1dbe0 <unknown> | ||
|
||
mlapt z0.d, z1.d, z31.d | ||
// CHECK-INST: mlapt z0.d, z1.d, z31.d | ||
// CHECK-ENCODING: [0x20,0xd0,0xdf,0x44] | ||
// CHECK-ERROR: instruction requires: cpa sve or sme | ||
// CHECK-ERROR-NO-SVESME: instruction requires: sve or sme | ||
// CHECK-ERROR-NO-CPA: instruction requires: cpa | ||
// CHECK-UNKNOWN: 44dfd020 <unknown> |
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.
I believe that FEAT_CPA is only [HasSVE, HasCPA] .
At least that is what I see here:
https://developer.arm.com/documentation/ddi0602/2023-09/SVE-Instructions/ADDPT--predicated---Add-checked-pointer-vectors--predicated--?lang=en
if !IsFeatureImplemented(FEAT_SVE) || !IsFeatureImplemented(FEAT_CPA) then
UNDEFINED;
And in bellow I see :
CheckNonStreamingSVEEnabled();
I believe it means that these instructions are not available in streaming mode.
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.
Good catch! Thanks @CarolineConcatto
I'll upload a fix for this soon