@@ -36,9 +36,10 @@ mod emit_tests;
3636// Instructions (top level): definition
3737
3838pub use crate :: isa:: aarch64:: lower:: isle:: generated_code:: {
39- ALUOp , ALUOp3 , AtomicRMWLoopOp , AtomicRMWOp , BitOp , FPUOp1 , FPUOp2 , FPUOp3 , FpuRoundMode ,
40- FpuToIntOp , IntToFpuOp , MInst as Inst , MoveWideOp , VecALUOp , VecExtendOp , VecLanesOp , VecMisc2 ,
41- VecPairOp , VecRRLongOp , VecRRNarrowOp , VecRRPairLongOp , VecRRRLongOp , VecShiftImmOp ,
39+ ALUOp , ALUOp3 , APIKey , AtomicRMWLoopOp , AtomicRMWOp , BitOp , FPUOp1 , FPUOp2 , FPUOp3 ,
40+ FpuRoundMode , FpuToIntOp , IntToFpuOp , MInst as Inst , MoveWideOp , VecALUOp , VecExtendOp ,
41+ VecLanesOp , VecMisc2 , VecPairOp , VecRRLongOp , VecRRNarrowOp , VecRRPairLongOp , VecRRRLongOp ,
42+ VecShiftImmOp ,
4243} ;
4344
4445/// A floating-point unit (FPU) operation with two args, a register and an immediate.
@@ -982,6 +983,11 @@ fn aarch64_get_operands<F: Fn(VReg) -> VReg>(inst: &Inst, collector: &mut Operan
982983 collector. reg_use ( ret) ;
983984 }
984985 }
986+ & Inst :: AuthenticatedRet { ref rets, .. } => {
987+ for & ret in rets {
988+ collector. reg_use ( ret) ;
989+ }
990+ }
985991 & Inst :: Jump { .. } => { }
986992 & Inst :: Call { ref info, .. } => {
987993 collector. reg_uses ( & info. uses [ ..] ) ;
@@ -1030,6 +1036,7 @@ fn aarch64_get_operands<F: Fn(VReg) -> VReg>(inst: &Inst, collector: &mut Operan
10301036 collector. reg_def ( rd) ;
10311037 memarg_operands ( mem, collector) ;
10321038 }
1039+ & Inst :: Pacisp { .. } => { }
10331040 & Inst :: VirtualSPOffsetAdj { .. } => { }
10341041
10351042 & Inst :: ElfTlsGetAddr { .. } => {
@@ -1089,7 +1096,7 @@ impl MachInst for Inst {
10891096
10901097 fn is_term ( & self ) -> MachTerminator {
10911098 match self {
1092- & Inst :: Ret { .. } => MachTerminator :: Ret ,
1099+ & Inst :: Ret { .. } | & Inst :: AuthenticatedRet { .. } => MachTerminator :: Ret ,
10931100 & Inst :: Jump { .. } => MachTerminator :: Uncond ,
10941101 & Inst :: CondBr { .. } => MachTerminator :: Cond ,
10951102 & Inst :: IndirectBr { .. } => MachTerminator :: Indirect ,
@@ -2476,6 +2483,18 @@ impl Inst {
24762483 format ! ( "blr {}" , rn)
24772484 }
24782485 & Inst :: Ret { .. } => "ret" . to_string ( ) ,
2486+ & Inst :: AuthenticatedRet { key, is_hint, .. } => {
2487+ let key = match key {
2488+ APIKey :: A => "a" ,
2489+ APIKey :: B => "b" ,
2490+ } ;
2491+
2492+ if is_hint {
2493+ "auti" . to_string ( ) + key + "sp ; ret"
2494+ } else {
2495+ "reta" . to_string ( ) + key
2496+ }
2497+ }
24792498 & Inst :: Jump { ref dest } => {
24802499 let dest = dest. pretty_print ( 0 , allocs) ;
24812500 format ! ( "b {}" , dest)
@@ -2650,6 +2669,14 @@ impl Inst {
26502669 }
26512670 ret
26522671 }
2672+ & Inst :: Pacisp { key } => {
2673+ let key = match key {
2674+ APIKey :: A => "a" ,
2675+ APIKey :: B => "b" ,
2676+ } ;
2677+
2678+ "paci" . to_string ( ) + key + "sp"
2679+ }
26532680 & Inst :: VirtualSPOffsetAdj { offset } => {
26542681 state. virtual_sp_offset += offset;
26552682 format ! ( "virtual_sp_offset_adjust {}" , offset)
0 commit comments