-
Notifications
You must be signed in to change notification settings - Fork 14.4k
AArch64: Relax x16/x17 constraint on AUT in certain cases. #132857
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
Changes from 16 commits
1539dbb
ad26af7
ae88c31
1a66719
fbbff95
a4762d7
9a74e55
dafdc99
70502e4
04743b9
1a806a3
3f2376f
89b7aad
da82f10
52e1e60
11b6779
4eac435
f3f173c
cf30245
01161f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1938,10 +1938,11 @@ let Predicates = [HasPAuth] in { | |
defm LDRAB : AuthLoad<1, "ldrab", simm10Scaled>; | ||
|
||
// AUT pseudo. | ||
// This directly manipulates x16/x17, which are the only registers the OS | ||
// guarantees are safe to use for sensitive operations. | ||
def AUT : Pseudo<(outs), (ins i32imm:$Key, i64imm:$Disc, GPR64noip:$AddrDisc), | ||
[]>, Sched<[WriteI, ReadI]> { | ||
// This directly manipulates x16/x17, which are the only registers that | ||
// certain OSs guarantee are safe to use for sensitive operations. | ||
def AUTx16x17 : Pseudo<(outs), (ins i32imm:$Key, i64imm:$Disc, | ||
GPR64noip:$AddrDisc), | ||
[]>, Sched<[WriteI, ReadI]> { | ||
let isCodeGenOnly = 1; | ||
let hasSideEffects = 1; | ||
let mayStore = 0; | ||
|
@@ -1951,9 +1952,23 @@ let Predicates = [HasPAuth] in { | |
let Uses = [X16]; | ||
} | ||
|
||
def AUTxMxN : Pseudo<(outs GPR64:$AuthVal, GPR64common:$Scratch), | ||
(ins GPR64:$Val, i32imm:$Key, | ||
i64imm:$Disc, GPR64:$AddrDisc), | ||
[]>, Sched<[WriteI, ReadI]> { | ||
let Constraints = "$AuthVal = $Val"; | ||
atrosinenko marked this conversation as resolved.
Show resolved
Hide resolved
|
||
let isCodeGenOnly = 1; | ||
let hasSideEffects = 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reflects proposed change in #141330 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The fix for MachineLICM was sent as #145379. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we're close to an acceptable fix for the MachineLICM issue (I was going to land #147624 tomorrow after giving people a change to comment) so hopefully this won't need to change. Otherwise I'll change this to 1 when it lands. |
||
let mayStore = 0; | ||
let mayLoad = 0; | ||
let Size = 32; | ||
let Defs = [NZCV]; | ||
let Uses = []; | ||
} | ||
|
||
// AUT and re-PAC a value, using different keys/data. | ||
// This directly manipulates x16/x17, which are the only registers the OS | ||
// guarantees are safe to use for sensitive operations. | ||
// This directly manipulates x16/x17, which are the only registers that | ||
// certain OSs guarantee are safe to use for sensitive operations. | ||
def AUTPAC | ||
: Pseudo<(outs), | ||
(ins i32imm:$AUTKey, i64imm:$AUTDisc, GPR64noip:$AUTAddrDisc, | ||
|
Uh oh!
There was an error while loading. Please reload this page.