diff options
author | Daniil Kovalev <dkovalev@accesssoftek.com> | 2024-06-27 10:02:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-27 10:02:17 +0300 |
commit | b5cc19e572855136eb4080208a9bd5ecef785aa3 (patch) | |
tree | bb04edc1d95595ae791cf6c572494025b3e2c9ec /llvm/lib/CodeGen/MachineVerifier.cpp | |
parent | ab58b6d58edf6a7c8881044fc716ca435d7a0156 (diff) | |
download | llvm-b5cc19e572855136eb4080208a9bd5ecef785aa3.zip llvm-b5cc19e572855136eb4080208a9bd5ecef785aa3.tar.gz llvm-b5cc19e572855136eb4080208a9bd5ecef785aa3.tar.bz2 |
[PAC][AArch64] Lower ptrauth constants in code (#94241)
Depends on #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 <ahmed@bougacha.org>
Diffstat (limited to 'llvm/lib/CodeGen/MachineVerifier.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineVerifier.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp index 9ea238c..0c8a0f2 100644 --- a/llvm/lib/CodeGen/MachineVerifier.cpp +++ b/llvm/lib/CodeGen/MachineVerifier.cpp @@ -2066,6 +2066,12 @@ void MachineVerifier::verifyPreISelGenericInstruction(const MachineInstr *MI) { report("Dst operand 0 must be a pointer", MI); break; } + case TargetOpcode::G_PTRAUTH_GLOBAL_VALUE: { + const MachineOperand &AddrOp = MI->getOperand(1); + if (!AddrOp.isReg() || !MRI->getType(AddrOp.getReg()).isPointer()) + report("addr operand must be a pointer", &AddrOp, 1); + break; + } default: break; } |