@@ -36,9 +36,10 @@ mod emit_tests;
36
36
// Instructions (top level): definition
37
37
38
38
pub 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 ,
42
43
} ;
43
44
44
45
/// 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
979
980
collector. reg_use ( ret) ;
980
981
}
981
982
}
983
+ & Inst :: AuthenticatedRet { ref rets, .. } => {
984
+ for & ret in rets {
985
+ collector. reg_use ( ret) ;
986
+ }
987
+ }
982
988
& Inst :: Jump { .. } | & Inst :: EpiloguePlaceholder => { }
983
989
& Inst :: Call { ref info, .. } => {
984
990
collector. reg_uses ( & info. uses [ ..] ) ;
@@ -1025,6 +1031,7 @@ fn aarch64_get_operands<F: Fn(VReg) -> VReg>(inst: &Inst, collector: &mut Operan
1025
1031
collector. reg_def ( rd) ;
1026
1032
memarg_operands ( mem, collector) ;
1027
1033
}
1034
+ & Inst :: Pacisp { .. } => { }
1028
1035
& Inst :: VirtualSPOffsetAdj { .. } => { }
1029
1036
1030
1037
& Inst :: ElfTlsGetAddr { .. } => {
@@ -1091,7 +1098,9 @@ impl MachInst for Inst {
1091
1098
1092
1099
fn is_term ( & self ) -> MachTerminator {
1093
1100
match self {
1094
- & Inst :: Ret { .. } | & Inst :: EpiloguePlaceholder => MachTerminator :: Ret ,
1101
+ & Inst :: Ret { .. } | & Inst :: AuthenticatedRet { .. } | & Inst :: EpiloguePlaceholder => {
1102
+ MachTerminator :: Ret
1103
+ }
1095
1104
& Inst :: Jump { .. } => MachTerminator :: Uncond ,
1096
1105
& Inst :: CondBr { .. } => MachTerminator :: Cond ,
1097
1106
& Inst :: IndirectBr { .. } => MachTerminator :: Indirect ,
@@ -2532,6 +2541,18 @@ impl Inst {
2532
2541
format ! ( "blr {}" , rn)
2533
2542
}
2534
2543
& 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
+ }
2535
2556
& Inst :: EpiloguePlaceholder => "epilogue placeholder" . to_string ( ) ,
2536
2557
& Inst :: Jump { ref dest } => {
2537
2558
let dest = dest. pretty_print ( 0 , allocs) ;
@@ -2712,6 +2733,14 @@ impl Inst {
2712
2733
}
2713
2734
ret
2714
2735
}
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
+ }
2715
2744
& Inst :: VirtualSPOffsetAdj { offset } => {
2716
2745
state. virtual_sp_offset += offset;
2717
2746
format ! ( "virtual_sp_offset_adjust {}" , offset)
0 commit comments