Skip to content

Commit 88dd10c

Browse files
kovdan01ronlieb
authored andcommitted
[PAC][AArch64] Lower ptrauth constants in code (llvm#96879)
This re-applies llvm#94241 after fixing buildbot failure, see https://lab.llvm.org/buildbot/#/builders/51/builds/570 According to standard, `constexpr` variables and `const` variables initialized with constant expressions can be used in lambdas w/o capturing - see https://en.cppreference.com/w/cpp/language/lambda. However, MSVC used on buildkite seems to ignore that rule and does not allow using such uncaptured variables in lambdas: we have "error C3493: 'Mask16' cannot be implicitly captured because no default capture mode has been specified" - see https://buildkite.com/llvm-project/github-pull-requests/builds/73238 Explicitly capturing such a variable, however, makes buildbot fail with "error: lambda capture 'Mask16' is not required to be captured for this use [-Werror,-Wunused-lambda-capture]" - see https://lab.llvm.org/buildbot/#/builders/51/builds/570. Fix both cases by using `0xffff` value directly instead of giving a name to it. Original PR description below. Depends on llvm#94240. Define the following pseudos for lowering ptrauth constants in code: - non-`extern_weak`: - no GOT load needed: `MOVaddrPAC` - similar to `MOVaddr`, with added PAC; - GOT load needed: `LOADgotPAC` - similar to `LOADgot`, with added PAC; - `extern_weak`: `LOADauthptrstatic` - similar to `LOADgot`, but use a special stub slot named `sym$auth_ptr$key$disc` filled by dynamic linker during relocation resolving instead of a GOT slot. --------- Co-authored-by: Ahmed Bougacha <[email protected]> Change-Id: Ic59980fe9466834f29d0818436149acfd1ebc1da
1 parent 723ac39 commit 88dd10c

19 files changed

+293
-141
lines changed

llvm/docs/GlobalISel/GenericOpcode.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,17 @@ The address of a global value.
6060
6161
%0(p0) = G_GLOBAL_VALUE @var_local
6262
63+
G_PTRAUTH_GLOBAL_VALUE
64+
^^^^^^^^^^^^^^^^^^^^^^
65+
66+
The signed address of a global value. Operands: address to be signed (pointer),
67+
key (32-bit imm), address for address discrimination (zero if not needed) and
68+
an extra discriminator (64-bit imm).
69+
70+
.. code-block:: none
71+
72+
%0:_(p0) = G_PTRAUTH_GLOBAL_VALUE %1:_(p0), s32, %2:_(p0), s64
73+
6374
G_BLOCK_ADDR
6475
^^^^^^^^^^^^
6576

llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,13 @@ class MachineIRBuilder {
886886
MachineInstrBuilder buildFConstant(const DstOp &Res, double Val);
887887
MachineInstrBuilder buildFConstant(const DstOp &Res, const APFloat &Val);
888888

889+
/// Build and insert G_PTRAUTH_GLOBAL_VALUE
890+
///
891+
/// \return a MachineInstrBuilder for the newly created instruction.
892+
MachineInstrBuilder buildConstantPtrAuth(const DstOp &Res,
893+
const ConstantPtrAuth *CPA,
894+
Register Addr, Register AddrDisc);
895+
889896
/// Build and insert \p Res = COPY Op
890897
///
891898
/// Register-to-register COPY sets \p Res to \p Op.

llvm/include/llvm/CodeGen/MachineModuleInfoImpls.h

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,19 @@ class MachineModuleInfoMachO : public MachineModuleInfoImpl {
7575
/// MachineModuleInfoELF - This is a MachineModuleInfoImpl implementation
7676
/// for ELF targets.
7777
class MachineModuleInfoELF : public MachineModuleInfoImpl {
78+
public:
79+
struct AuthStubInfo {
80+
const MCExpr *AuthPtrRef;
81+
};
82+
83+
private:
7884
/// GVStubs - These stubs are used to materialize global addresses in PIC
7985
/// mode.
8086
DenseMap<MCSymbol *, StubValueTy> GVStubs;
8187

8288
/// AuthPtrStubs - These stubs are used to materialize signed addresses for
8389
/// extern_weak symbols.
84-
DenseMap<MCSymbol *, const MCExpr *> AuthPtrStubs;
90+
DenseMap<MCSymbol *, AuthStubInfo> AuthPtrStubs;
8591

8692
virtual void anchor(); // Out of line virtual method.
8793

@@ -93,8 +99,7 @@ class MachineModuleInfoELF : public MachineModuleInfoImpl {
9399
return GVStubs[Sym];
94100
}
95101

96-
97-
const MCExpr *&getAuthPtrStubEntry(MCSymbol *Sym) {
102+
AuthStubInfo &getAuthPtrStubEntry(MCSymbol *Sym) {
98103
assert(Sym && "Key cannot be null");
99104
return AuthPtrStubs[Sym];
100105
}
@@ -103,9 +108,10 @@ class MachineModuleInfoELF : public MachineModuleInfoImpl {
103108

104109
SymbolListTy GetGVStubList() { return getSortedStubs(GVStubs); }
105110

106-
ExprStubListTy getAuthGVStubList() {
107-
return getSortedExprStubs(AuthPtrStubs);
108-
}
111+
using AuthStubPairTy = std::pair<MCSymbol *, AuthStubInfo>;
112+
typedef std::vector<AuthStubPairTy> AuthStubListTy;
113+
114+
AuthStubListTy getAuthGVStubList();
109115
};
110116

111117
/// MachineModuleInfoCOFF - This is a MachineModuleInfoImpl implementation

llvm/include/llvm/Support/TargetOpcodes.def

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,9 @@ HANDLE_TARGET_OPCODE(G_FRAME_INDEX)
308308
/// Generic reference to global value.
309309
HANDLE_TARGET_OPCODE(G_GLOBAL_VALUE)
310310

311+
/// Generic ptrauth-signed reference to global value.
312+
HANDLE_TARGET_OPCODE(G_PTRAUTH_GLOBAL_VALUE)
313+
311314
/// Generic instruction to materialize the address of an object in the constant
312315
/// pool.
313316
HANDLE_TARGET_OPCODE(G_CONSTANT_POOL)

llvm/include/llvm/Target/GenericOpcodes.td

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ def G_GLOBAL_VALUE : GenericInstruction {
110110
let hasSideEffects = false;
111111
}
112112

113+
def G_PTRAUTH_GLOBAL_VALUE : GenericInstruction {
114+
let OutOperandList = (outs type0:$dst);
115+
let InOperandList = (ins unknown:$addr, i32imm:$key, type1:$addrdisc, i64imm:$disc);
116+
let hasSideEffects = 0;
117+
}
118+
113119
def G_CONSTANT_POOL : GenericInstruction {
114120
let OutOperandList = (outs type0:$dst);
115121
let InOperandList = (ins unknown:$src);

llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3549,7 +3549,11 @@ bool IRTranslator::translate(const Constant &C, Register Reg) {
35493549
EntryBuilder->buildConstant(Reg, 0);
35503550
else if (auto GV = dyn_cast<GlobalValue>(&C))
35513551
EntryBuilder->buildGlobalValue(Reg, GV);
3552-
else if (auto CAZ = dyn_cast<ConstantAggregateZero>(&C)) {
3552+
else if (auto CPA = dyn_cast<ConstantPtrAuth>(&C)) {
3553+
Register Addr = getOrCreateVReg(*CPA->getPointer());
3554+
Register AddrDisc = getOrCreateVReg(*CPA->getAddrDiscriminator());
3555+
EntryBuilder->buildConstantPtrAuth(Reg, CPA, Addr, AddrDisc);
3556+
} else if (auto CAZ = dyn_cast<ConstantAggregateZero>(&C)) {
35533557
if (!isa<FixedVectorType>(CAZ->getType()))
35543558
return false;
35553559
// Return the scalar if it is a <1 x Ty> vector.

llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,19 @@ MachineInstrBuilder MachineIRBuilder::buildFConstant(const DstOp &Res,
397397
return buildFConstant(Res, *CFP);
398398
}
399399

400+
MachineInstrBuilder
401+
MachineIRBuilder::buildConstantPtrAuth(const DstOp &Res,
402+
const ConstantPtrAuth *CPA,
403+
Register Addr, Register AddrDisc) {
404+
auto MIB = buildInstr(TargetOpcode::G_PTRAUTH_GLOBAL_VALUE);
405+
Res.addDefToMIB(*getMRI(), MIB);
406+
MIB.addUse(Addr);
407+
MIB.addImm(CPA->getKey()->getZExtValue());
408+
MIB.addUse(AddrDisc);
409+
MIB.addImm(CPA->getDiscriminator()->getZExtValue());
410+
return MIB;
411+
}
412+
400413
MachineInstrBuilder MachineIRBuilder::buildBrCond(const SrcOp &Tst,
401414
MachineBasicBlock &Dest) {
402415
assert(Tst.getLLTTy(*getMRI()).isScalar() && "invalid operand type");

llvm/lib/CodeGen/MachineModuleInfoImpls.cpp

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
#include "llvm/CodeGen/MachineModuleInfoImpls.h"
1515
#include "llvm/ADT/DenseMap.h"
16+
#include "llvm/ADT/STLExtras.h"
1617
#include "llvm/MC/MCSymbol.h"
1718

1819
using namespace llvm;
@@ -42,19 +43,24 @@ MachineModuleInfoImpl::SymbolListTy MachineModuleInfoImpl::getSortedStubs(
4243
return List;
4344
}
4445

45-
using ExprStubPairTy = std::pair<MCSymbol *, const MCExpr *>;
46-
static int SortAuthStubPair(const ExprStubPairTy *LHS,
47-
const ExprStubPairTy *RHS) {
48-
return LHS->first->getName().compare(RHS->first->getName());
49-
}
50-
51-
MachineModuleInfoImpl::ExprStubListTy MachineModuleInfoImpl::getSortedExprStubs(
52-
DenseMap<MCSymbol *, const MCExpr *> &ExprStubs) {
53-
MachineModuleInfoImpl::ExprStubListTy List(ExprStubs.begin(),
54-
ExprStubs.end());
46+
template <typename MachineModuleInfoTarget>
47+
static typename MachineModuleInfoTarget::AuthStubListTy getAuthGVStubListHelper(
48+
DenseMap<MCSymbol *, typename MachineModuleInfoTarget::AuthStubInfo>
49+
&AuthPtrStubs) {
50+
typename MachineModuleInfoTarget::AuthStubListTy List(AuthPtrStubs.begin(),
51+
AuthPtrStubs.end());
5552

56-
array_pod_sort(List.begin(), List.end(), SortAuthStubPair);
53+
if (!List.empty())
54+
llvm::sort(List.begin(), List.end(),
55+
[](const typename MachineModuleInfoTarget::AuthStubPairTy &LHS,
56+
const typename MachineModuleInfoTarget::AuthStubPairTy &RHS) {
57+
return LHS.first->getName() < RHS.first->getName();
58+
});
5759

58-
ExprStubs.clear();
60+
AuthPtrStubs.clear();
5961
return List;
6062
}
63+
64+
MachineModuleInfoELF::AuthStubListTy MachineModuleInfoELF::getAuthGVStubList() {
65+
return getAuthGVStubListHelper<MachineModuleInfoELF>(AuthPtrStubs);
66+
}

llvm/lib/CodeGen/MachineVerifier.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2140,6 +2140,12 @@ void MachineVerifier::verifyPreISelGenericInstruction(const MachineInstr *MI) {
21402140
report("Dst operand 0 must be a pointer", MI);
21412141
break;
21422142
}
2143+
case TargetOpcode::G_PTRAUTH_GLOBAL_VALUE: {
2144+
const MachineOperand &AddrOp = MI->getOperand(1);
2145+
if (!AddrOp.isReg() || !MRI->getType(AddrOp.getReg()).isPointer())
2146+
report("addr operand must be a pointer", &AddrOp, 1);
2147+
break;
2148+
}
21432149
default:
21442150
break;
21452151
}

llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1802,6 +1802,13 @@ SDValue SelectionDAGBuilder::getValueImpl(const Value *V) {
18021802
if (const GlobalValue *GV = dyn_cast<GlobalValue>(C))
18031803
return DAG.getGlobalAddress(GV, getCurSDLoc(), VT);
18041804

1805+
if (const ConstantPtrAuth *CPA = dyn_cast<ConstantPtrAuth>(C)) {
1806+
return DAG.getNode(ISD::PtrAuthGlobalAddress, getCurSDLoc(), VT,
1807+
getValue(CPA->getPointer()), getValue(CPA->getKey()),
1808+
getValue(CPA->getAddrDiscriminator()),
1809+
getValue(CPA->getDiscriminator()));
1810+
}
1811+
18051812
if (isa<ConstantPointerNull>(C)) {
18061813
unsigned AS = V->getType()->getPointerAddressSpace();
18071814
return DAG.getConstant(0, getCurSDLoc(),

llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp

Lines changed: 16 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -867,12 +867,13 @@ void AArch64AsmPrinter::emitHwasanMemaccessSymbols(Module &M) {
867867
}
868868
}
869869

870-
static void emitAuthenticatedPointer(MCStreamer &OutStreamer,
871-
MCSymbol *StubLabel,
872-
const MCExpr *StubAuthPtrRef) {
870+
template <typename MachineModuleInfoTarget>
871+
static void emitAuthenticatedPointer(
872+
MCStreamer &OutStreamer, MCSymbol *StubLabel,
873+
const typename MachineModuleInfoTarget::AuthStubInfo &StubInfo) {
873874
// sym$auth_ptr$key$disc:
874875
OutStreamer.emitLabel(StubLabel);
875-
OutStreamer.emitValue(StubAuthPtrRef, /*size=*/8);
876+
OutStreamer.emitValue(StubInfo.AuthPtrRef, /*size=*/8);
876877
}
877878

878879
void AArch64AsmPrinter::emitEndOfAsmFile(Module &M) {
@@ -919,7 +920,8 @@ void AArch64AsmPrinter::emitEndOfAsmFile(Module &M) {
919920
emitAlignment(Align(8));
920921

921922
for (const auto &Stub : Stubs)
922-
emitAuthenticatedPointer(*OutStreamer, Stub.first, Stub.second);
923+
emitAuthenticatedPointer<MachineModuleInfoELF>(*OutStreamer, Stub.first,
924+
Stub.second);
923925

924926
OutStreamer->addBlankLine();
925927
}
@@ -2119,27 +2121,16 @@ void AArch64AsmPrinter::LowerLOADauthptrstatic(const MachineInstr &MI) {
21192121
//
21202122
// Where the $auth_ptr$ symbol is the stub slot containing the signed pointer
21212123
// to symbol.
2122-
MCSymbol *AuthPtrStubSym;
2123-
if (TM.getTargetTriple().isOSBinFormatELF()) {
2124-
const auto &TLOF =
2125-
static_cast<const AArch64_ELFTargetObjectFile &>(getObjFileLowering());
2126-
2127-
assert(GAOp.getOffset() == 0 &&
2128-
"non-zero offset for $auth_ptr$ stub slots is not supported");
2129-
const MCSymbol *GASym = TM.getSymbol(GAOp.getGlobal());
2130-
AuthPtrStubSym = TLOF.getAuthPtrSlotSymbol(TM, MMI, GASym, Key, Disc);
2131-
} else {
2132-
assert(TM.getTargetTriple().isOSBinFormatMachO() &&
2133-
"LOADauthptrstatic is implemented only for MachO/ELF");
2134-
2135-
const auto &TLOF = static_cast<const AArch64_MachoTargetObjectFile &>(
2136-
getObjFileLowering());
2124+
assert(TM.getTargetTriple().isOSBinFormatELF() &&
2125+
"LOADauthptrstatic is implemented only for ELF");
2126+
const auto &TLOF =
2127+
static_cast<const AArch64_ELFTargetObjectFile &>(getObjFileLowering());
21372128

2138-
assert(GAOp.getOffset() == 0 &&
2139-
"non-zero offset for $auth_ptr$ stub slots is not supported");
2140-
const MCSymbol *GASym = TM.getSymbol(GAOp.getGlobal());
2141-
AuthPtrStubSym = TLOF.getAuthPtrSlotSymbol(TM, MMI, GASym, Key, Disc);
2142-
}
2129+
assert(GAOp.getOffset() == 0 &&
2130+
"non-zero offset for $auth_ptr$ stub slots is not supported");
2131+
const MCSymbol *GASym = TM.getSymbol(GAOp.getGlobal());
2132+
MCSymbol *AuthPtrStubSym =
2133+
TLOF.getAuthPtrSlotSymbol(TM, &MF->getMMI(), GASym, Key, Disc);
21432134

21442135
MachineOperand StubMOHi =
21452136
MachineOperand::CreateMCSymbol(AuthPtrStubSym, AArch64II::MO_PAGE);
@@ -2320,19 +2311,6 @@ void AArch64AsmPrinter::LowerMOVaddrPAC(const MachineInstr &MI) {
23202311
assert(STI->getInstrInfo()->getInstSizeInBytes(MI) >= InstsEmitted * 4);
23212312
}
23222313

2323-
const MCExpr *
2324-
AArch64AsmPrinter::lowerBlockAddressConstant(const BlockAddress &BA) {
2325-
const MCExpr *BAE = AsmPrinter::lowerBlockAddressConstant(BA);
2326-
const Function &Fn = *BA.getFunction();
2327-
2328-
if (std::optional<uint16_t> BADisc =
2329-
STI->getPtrAuthBlockAddressDiscriminatorIfEnabled(Fn))
2330-
return AArch64AuthMCExpr::create(BAE, *BADisc, AArch64PACKey::IA,
2331-
/*HasAddressDiversity=*/false, OutContext);
2332-
2333-
return BAE;
2334-
}
2335-
23362314
// Simple pseudo-instructions have their lowering (with expansion to real
23372315
// instructions) auto-generated.
23382316
#include "AArch64GenMCPseudoLowering.inc"
@@ -2470,11 +2448,6 @@ void AArch64AsmPrinter::emitInstruction(const MachineInstr *MI) {
24702448
return;
24712449
}
24722450

2473-
case AArch64::AUT:
2474-
case AArch64::AUTPAC:
2475-
emitPtrauthAuthResign(MI);
2476-
return;
2477-
24782451
case AArch64::LOADauthptrstatic:
24792452
LowerLOADauthptrstatic(*MI);
24802453
return;
@@ -2484,7 +2457,6 @@ void AArch64AsmPrinter::emitInstruction(const MachineInstr *MI) {
24842457
LowerMOVaddrPAC(*MI);
24852458
return;
24862459

2487-
case AArch64::BRA:
24882460
case AArch64::BLRA:
24892461
emitPtrauthBranch(MI);
24902462
return;

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,8 @@ AArch64TargetLowering::AArch64TargetLowering(const TargetMachine &TM,
513513
setOperationAction(ISD::BRIND, MVT::Other, Custom);
514514
setOperationAction(ISD::SETCCCARRY, MVT::i64, Custom);
515515

516+
setOperationAction(ISD::PtrAuthGlobalAddress, MVT::i64, Custom);
517+
516518
setOperationAction(ISD::SHL_PARTS, MVT::i64, Custom);
517519
setOperationAction(ISD::SRA_PARTS, MVT::i64, Custom);
518520
setOperationAction(ISD::SRL_PARTS, MVT::i64, Custom);
@@ -6949,10 +6951,6 @@ SDValue AArch64TargetLowering::LowerOperation(SDValue Op,
69496951
return LowerGlobalTLSAddress(Op, DAG);
69506952
case ISD::PtrAuthGlobalAddress:
69516953
return LowerPtrAuthGlobalAddress(Op, DAG);
6952-
case ISD::ADJUST_TRAMPOLINE:
6953-
return LowerADJUST_TRAMPOLINE(Op, DAG);
6954-
case ISD::INIT_TRAMPOLINE:
6955-
return LowerINIT_TRAMPOLINE(Op, DAG);
69566954
case ISD::SETCC:
69576955
case ISD::STRICT_FSETCC:
69586956
case ISD::STRICT_FSETCCS:
@@ -9849,7 +9847,6 @@ SDValue AArch64TargetLowering::LowerGlobalTLSAddress(SDValue Op,
98499847
llvm_unreachable("Unexpected platform trying to use TLS");
98509848
}
98519849

9852-
98539850
//===----------------------------------------------------------------------===//
98549851
// PtrAuthGlobalAddress lowering
98559852
//
@@ -9869,7 +9866,8 @@ SDValue AArch64TargetLowering::LowerGlobalTLSAddress(SDValue Op,
98699866
// Load a signed pointer for symbol 'sym' from a stub slot named
98709867
// 'sym$auth_ptr$key$disc' filled by dynamic linker during relocation
98719868
// resolving. This usually lowers to adrp+ldr, but also emits an entry into
9872-
// .data with an @AUTH relocation. See LowerLOADauthptrstatic.
9869+
// .data with an
9870+
// @AUTH relocation. See LowerLOADauthptrstatic.
98739871
//
98749872
// All 3 are pseudos that are expand late to longer sequences: this lets us
98759873
// provide integrity guarantees on the to-be-signed intermediate values.
@@ -9922,8 +9920,8 @@ AArch64TargetLowering::LowerPtrAuthGlobalAddress(SDValue Op,
99229920
"constant discriminator in ptrauth global out of range [0, 0xffff]");
99239921

99249922
// Choosing between 3 lowering alternatives is target-specific.
9925-
if (!Subtarget->isTargetELF() && !Subtarget->isTargetMachO())
9926-
report_fatal_error("ptrauth global lowering only supported on MachO/ELF");
9923+
if (!Subtarget->isTargetELF())
9924+
report_fatal_error("ptrauth global lowering is only implemented for ELF");
99279925

99289926
int64_t PtrOffsetC = 0;
99299927
if (Ptr.getOpcode() == ISD::ADD) {

llvm/lib/Target/AArch64/AArch64InstrInfo.td

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1836,37 +1836,6 @@ let Predicates = [HasPAuth] in {
18361836
defm LDRAA : AuthLoad<0, "ldraa", simm10Scaled>;
18371837
defm LDRAB : AuthLoad<1, "ldrab", simm10Scaled>;
18381838

1839-
// AUT pseudo.
1840-
// This directly manipulates x16/x17, which are the only registers the OS
1841-
// guarantees are safe to use for sensitive operations.
1842-
def AUT : Pseudo<(outs), (ins i32imm:$Key, i64imm:$Disc, GPR64noip:$AddrDisc),
1843-
[]>, Sched<[WriteI, ReadI]> {
1844-
let isCodeGenOnly = 1;
1845-
let hasSideEffects = 1;
1846-
let mayStore = 0;
1847-
let mayLoad = 0;
1848-
let Size = 32;
1849-
let Defs = [X16,X17,NZCV];
1850-
let Uses = [X16];
1851-
}
1852-
1853-
// AUT and re-PAC a value, using different keys/data.
1854-
// This directly manipulates x16/x17, which are the only registers the OS
1855-
// guarantees are safe to use for sensitive operations.
1856-
def AUTPAC
1857-
: Pseudo<(outs),
1858-
(ins i32imm:$AUTKey, i64imm:$AUTDisc, GPR64noip:$AUTAddrDisc,
1859-
i32imm:$PACKey, i64imm:$PACDisc, GPR64noip:$PACAddrDisc),
1860-
[]>, Sched<[WriteI, ReadI]> {
1861-
let isCodeGenOnly = 1;
1862-
let hasSideEffects = 1;
1863-
let mayStore = 0;
1864-
let mayLoad = 0;
1865-
let Size = 48;
1866-
let Defs = [X16,X17,NZCV];
1867-
let Uses = [X16];
1868-
}
1869-
18701839
// Materialize a signed global address, with adrp+add and PAC.
18711840
def MOVaddrPAC : Pseudo<(outs),
18721841
(ins i64imm:$Addr, i32imm:$Key,

0 commit comments

Comments
 (0)