@@ -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.
@@ -979,6 +980,11 @@ fn aarch64_get_operands<F: Fn(VReg) -> VReg>(inst: &Inst, collector: &mut Operan
979980 collector. reg_use ( ret) ;
980981 }
981982 }
983+ & Inst :: AuthenticatedRet { ref rets, .. } => {
984+ for & ret in rets {
985+ collector. reg_use ( ret) ;
986+ }
987+ }
982988 & Inst :: Jump { .. } | & Inst :: EpiloguePlaceholder => { }
983989 & Inst :: Call { ref info, .. } => {
984990 collector. reg_uses ( & info. uses [ ..] ) ;
@@ -1025,6 +1031,7 @@ fn aarch64_get_operands<F: Fn(VReg) -> VReg>(inst: &Inst, collector: &mut Operan
10251031 collector. reg_def ( rd) ;
10261032 memarg_operands ( mem, collector) ;
10271033 }
1034+ & Inst :: Pacisp { .. } => { }
10281035 & Inst :: VirtualSPOffsetAdj { .. } => { }
10291036
10301037 & Inst :: ElfTlsGetAddr { .. } => {
@@ -1091,7 +1098,9 @@ impl MachInst for Inst {
10911098
10921099 fn is_term ( & self ) -> MachTerminator {
10931100 match self {
1094- & Inst :: Ret { .. } | & Inst :: EpiloguePlaceholder => MachTerminator :: Ret ,
1101+ & Inst :: Ret { .. } | & Inst :: AuthenticatedRet { .. } | & Inst :: EpiloguePlaceholder => {
1102+ MachTerminator :: Ret
1103+ }
10951104 & Inst :: Jump { .. } => MachTerminator :: Uncond ,
10961105 & Inst :: CondBr { .. } => MachTerminator :: Cond ,
10971106 & Inst :: IndirectBr { .. } => MachTerminator :: Indirect ,
@@ -2532,6 +2541,18 @@ impl Inst {
25322541 format ! ( "blr {}" , rn)
25332542 }
25342543 & Inst :: Ret { .. } => "ret" . to_string ( ) ,
2544+ & Inst :: AuthenticatedRet { key, is_hint, .. } => {
2545+ let key = match key {
2546+ APIKey :: A => "a" ,
2547+ APIKey :: B => "b" ,
2548+ } ;
2549+
2550+ if is_hint {
2551+ "auti" . to_string ( ) + key + "sp ; ret"
2552+ } else {
2553+ "reta" . to_string ( ) + key
2554+ }
2555+ }
25352556 & Inst :: EpiloguePlaceholder => "epilogue placeholder" . to_string ( ) ,
25362557 & Inst :: Jump { ref dest } => {
25372558 let dest = dest. pretty_print ( 0 , allocs) ;
@@ -2712,6 +2733,14 @@ impl Inst {
27122733 }
27132734 ret
27142735 }
2736+ & Inst :: Pacisp { key } => {
2737+ let key = match key {
2738+ APIKey :: A => "a" ,
2739+ APIKey :: B => "b" ,
2740+ } ;
2741+
2742+ "paci" . to_string ( ) + key + "sp"
2743+ }
27152744 & Inst :: VirtualSPOffsetAdj { offset } => {
27162745 state. virtual_sp_offset += offset;
27172746 format ! ( "virtual_sp_offset_adjust {}" , offset)
0 commit comments