diff options
author | Anatoly Trosinenko <atrosinenko@accesssoftek.com> | 2025-07-25 13:10:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-25 13:10:37 +0300 |
commit | 6e04e1e164636c06202cd1a68bd6a5ff7d9fa424 (patch) | |
tree | 4a0e03356b1391ba93e50ff6634ecd1341b49e8b /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | 33f4582e8d128eac6b699564ecddfef5c553288e (diff) | |
download | llvm-6e04e1e164636c06202cd1a68bd6a5ff7d9fa424.zip llvm-6e04e1e164636c06202cd1a68bd6a5ff7d9fa424.tar.gz llvm-6e04e1e164636c06202cd1a68bd6a5ff7d9fa424.tar.bz2 |
[AArch64][PAC] Introduce AArch64::PAC pseudo instruction (#146488)
Introduce a pseudo instruction carrying address and immediate modifiers
as separate operands to be selected instead of a pair of `MOVKXi` and
`PAC[ID][AB]` . The new pseudo instruction is expanded in AsmPrinter, so
that `MOVKXi` is emitted immediately before `PAC[ID][AB]`. This way, an
attacker cannot control the immediate modifier used to sign
the value, even if address modifier can be substituted.
To simplify the instruction selection, select `AArch64::PAC` pseudo
using TableGen pattern and post-process its `$AddrDisc` operand by
custom inserter hook - this eliminates duplication of the logic for
DAGISel and GlobalISel. Furthermore, this improves cross-BB analysis in
case of DAGISel.
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions