@@ -2368,6 +2368,80 @@ class ClearAuth<bits<1> data, string asm>
23682368 let Inst{4-0} = Rd;
23692369}
23702370
2371+ // v9.5-A FEAT_PAuth_LR
2372+
2373+ class SignAuthFixedRegs<bits<5> opcode2, bits<6> opcode, string asm>
2374+ : I<(outs), (ins), asm, "", "", []>,
2375+ Sched<[WriteI, ReadI]> {
2376+ let Inst{31} = 0b1; // sf
2377+ let Inst{30} = 0b1;
2378+ let Inst{29} = 0b0; // S
2379+ let Inst{28-21} = 0b11010110;
2380+ let Inst{20-16} = opcode2;
2381+ let Inst{15-10} = opcode;
2382+ let Inst{9-5} = 0b11111; // Rn
2383+ let Inst{4-0} = 0b11110; // Rd
2384+ }
2385+
2386+ def PAuthPCRelLabel16Operand : PCRelLabel<16> {
2387+ let Name = "PAuthPCRelLabel16";
2388+ let PredicateMethod = "isPAuthPCRelLabel16Operand";
2389+ }
2390+ def am_pauth_pcrel : Operand<OtherVT> {
2391+ let EncoderMethod = "getPAuthPCRelOpValue";
2392+ let DecoderMethod = "DecodePCRelLabel16";
2393+ let PrintMethod = "printAlignedLabel";
2394+ let ParserMatchClass = PAuthPCRelLabel16Operand;
2395+ let OperandType = "OPERAND_PCREL";
2396+ }
2397+
2398+ class SignAuthPCRel<bits<2> opc, string asm>
2399+ : I<(outs), (ins am_pauth_pcrel:$label), asm, "\t$label", "", []>,
2400+ Sched<[]> {
2401+ bits<16> label;
2402+ let Inst{31} = 0b1; // sf
2403+ let Inst{30-23} = 0b11100111;
2404+ let Inst{22-21} = opc;
2405+ let Inst{20-5} = label; // imm
2406+ let Inst{4-0} = 0b11111; // Rd
2407+ }
2408+
2409+ class SignAuthOneReg<bits<5> opcode2, bits<6> opcode, string asm>
2410+ : I<(outs), (ins GPR64:$Rn), asm, "\t$Rn", "", []>,
2411+ Sched<[]> {
2412+ bits<5> Rn;
2413+ let Inst{31} = 0b1; // sf
2414+ let Inst{30} = 0b1;
2415+ let Inst{29} = 0b0; // S
2416+ let Inst{28-21} = 0b11010110;
2417+ let Inst{20-16} = opcode2;
2418+ let Inst{15-10} = opcode;
2419+ let Inst{9-5} = Rn;
2420+ let Inst{4-0} = 0b11110; // Rd
2421+ }
2422+
2423+ class SignAuthReturnPCRel<bits<3> opc, bits<5> op2, string asm>
2424+ : I<(outs), (ins am_pauth_pcrel:$label), asm, "\t$label", "", []>,
2425+ Sched<[WriteAtomic]> {
2426+ bits<16> label;
2427+ let Inst{31-24} = 0b01010101;
2428+ let Inst{23-21} = opc;
2429+ let Inst{20-5} = label; // imm16
2430+ let Inst{4-0} = op2;
2431+ }
2432+
2433+ class SignAuthReturnReg<bits<6> op3, string asm>
2434+ : I<(outs), (ins GPR64common:$Rm), asm, "\t$Rm", "", []>,
2435+ Sched<[WriteAtomic]> {
2436+ bits<5> Rm;
2437+ let Inst{31-25} = 0b1101011;
2438+ let Inst{24-21} = 0b0010; // opc
2439+ let Inst{20-16} = 0b11111; // op2
2440+ let Inst{15-10} = op3;
2441+ let Inst{9-5} = 0b11111; // Rn
2442+ let Inst{4-0} = Rm; // op4 (Rm)
2443+ }
2444+
23712445// Base class for the Armv8.4-A 8 and 16-bit flag manipulation instructions
23722446class BaseFlagManipulation<bit sf, bit sz, dag iops, string asm, string ops>
23732447 : I<(outs), iops, asm, ops, "", []>,
0 commit comments