Cranelift AArch64: Harden the Spectre mitigations (#4555)

Use the `CSDB` instruction following Arm's recommendation.

Copyright (c) 2022, Arm Limited.
This commit is contained in:
Anton Kirilov
2022-08-01 18:20:48 +01:00
committed by GitHub
parent 893fadb485
commit a47a82d2e5
8 changed files with 42 additions and 20 deletions

View File

@@ -375,6 +375,10 @@ pub(crate) fn lower_insn_to_regs<C: LowerCtx<I = Inst>>(
op, ty
)));
}
if op == Opcode::SelectifSpectreGuard {
ctx.emit(Inst::Csdb);
}
}
Opcode::Bitselect | Opcode::Vselect => implemented_in_isle(ctx),