diff --git a/llvm/lib/Target/RISCV/RISCVFeatures.td b/llvm/lib/Target/RISCV/RISCVFeatures.td index aed5018855744..8a031316b6fad 100644 --- a/llvm/lib/Target/RISCV/RISCVFeatures.td +++ b/llvm/lib/Target/RISCV/RISCVFeatures.td @@ -1400,6 +1400,10 @@ def NotPureCapABI def FeatureVendorXCheriot : RISCVExtension<1, 0, "Implements XCheriot extension">; +def HasCheriot + : Predicate<"Subtarget->hasVendorXCheriot()">, + AssemblerPredicate<(all_of FeatureVendorXCheriot), "CHERIoT Extension">; + def FeatureRelax : SubtargetFeature<"relax", "EnableLinkerRelax", "true", "Enable Linker relaxation.">; diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoXCheri.td b/llvm/lib/Target/RISCV/RISCVInstrInfoXCheri.td index a7e9175948be9..0b0cf06d16d44 100644 --- a/llvm/lib/Target/RISCV/RISCVInstrInfoXCheri.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfoXCheri.td @@ -389,6 +389,17 @@ def PseudoCGetAddr : Pseudo<(outs GPR:$rd), (ins GPCR:$cs1), [], "cgetaddr", "$rd, $cs1">; } +let Predicates = [HasCheriot] in { + def : InstAlias<"ct.cgetperm $rd, $rs1", (CGetPerm GPR:$rd, GPCR:$rs1)>; + def : InstAlias<"ct.cgettype $rd, $rs1", (CGetType GPR:$rd, GPCR:$rs1)>; + def : InstAlias<"ct.cgetbase $rd, $rs1", (CGetBase GPR:$rd, GPCR:$rs1)>; + def : InstAlias<"ct.cgetlen $rd, $rs1", (CGetLen GPR:$rd, GPCR:$rs1)>; + def : InstAlias<"ct.cgettag $rd, $rs1", (CGetTag GPR:$rd, GPCR:$rs1)>; + def : InstAlias<"ct.cgethigh $rd, $rs1", (CGetHigh GPR:$rd, GPCR:$rs1)>; + def : InstAlias<"ct.cgettop $rd, $rs1", (CGetTop GPR:$rd, GPCR:$rs1)>; + def : InstAlias<"ct.cgetaddr $rd, $rs1", (PseudoCGetAddr GPR:$rd, GPCR:$rs1)>; +} + //===----------------------------------------------------------------------===// // Capability-Modification Instructions //===----------------------------------------------------------------------===// @@ -434,6 +445,43 @@ def : InstAlias<"csetboundsimm $cd, $cs1, $imm", (CSetBoundsImm GPCR:$cd, GPCR:$cs1, uimm12:$imm), 0>; } +let Predicates = [HasCheriot] in { + def : InstAlias<"ct.cseal $rd, $rs1, $rs2", (CSeal GPCR:$rd, GPCR:$rs1, + GPCR:$rs2)>; + def : InstAlias<"ct.cunseal $rd, $rs1, $rs2", (CUnseal GPCR:$rd, GPCR:$rs1, + GPCR:$rs2)>; + def : InstAlias<"ct.candperm $rd, $rs1, $rs2", (CAndPerm GPCR:$rd, GPCR:$rs1, + GPR:$rs2)>; + def : InstAlias<"ct.csetaddr $rd, $rs1, $rs2", (CSetAddr GPCR:$rd, GPCR:$rs1, + GPR:$rs2)>; + def : InstAlias<"ct.csethigh $rd, $rs1, $rs2", (CSetHigh GPCR:$rd, GPCR:$rs1, + GPR:$rs2)>; + def : InstAlias<"ct.cincaddr $rd, $rs1, $rs2", + (CIncOffset GPCR:$rd, GPCR:$rs1, GPR:$rs2), 0>; + def : InstAlias<"ct.cincoffset $rd, $rs1, $rs2", (CIncOffset GPCR:$rd, + GPCR:$rs1, GPR:$rs2)>; + def : InstAlias<"ct.cincaddr $rd, $rs1, $rs2", + (CIncOffsetImm GPCR:$rd, GPCR:$rs1, simm12:$rs2), 0>; + def : InstAlias<"ct.cincoffset $rd, $rs1, $rs2", (CIncOffsetImm GPCR:$rd, + GPCR:$rs1, simm12:$rs2)>; + def : InstAlias<"ct.csetbounds $rd, $rs1, $rs2", (CSetBounds GPCR:$rd, + GPCR:$rs1, GPR:$rs2)>; + def : InstAlias<"ct.csetboundsexact $rd, $rs1, $rs2", + (CSetBoundsExact GPCR:$rd, GPCR:$rs1, GPR:$rs2)>; + def : InstAlias<"ct.csetbounds $rd, $rs1, $rs2", (CSetBoundsImm GPCR:$rd, + GPCR:$rs1, uimm12:$rs2)>; + def : InstAlias<"ct.csetboundsrounddown $rd, $rs1, $rs2", + (CSetBoundsRoundDown GPCR:$rd, GPCR:$rs1, GPR:$rs2)>; + def : InstAlias<"ct.ccleartag $rd, $rs1", (CClearTag GPCR:$rd, GPCR:$rs1)>; + + def : InstAlias<"ct.cincaddrimm $cd, $cs1, $imm", + (CIncOffsetImm GPCR:$cd, GPCR:$cs1, simm12:$imm), 0>; + def : InstAlias<"ct.cincoffsetimm $cd, $cs1, $imm", + (CIncOffsetImm GPCR:$cd, GPCR:$cs1, simm12:$imm), 0>; + def : InstAlias<"ct.csetboundsimm $cd, $cs1, $imm", + (CSetBoundsImm GPCR:$cd, GPCR:$cs1, uimm12:$imm), 0>; +} + //===----------------------------------------------------------------------===// // Pointer-Arithmetic Instructions //===----------------------------------------------------------------------===// @@ -452,6 +500,12 @@ let isMoveReg = 1, isReMaterializable = 1, isAsCheapAsAMove = 1, def CMove : Cheri_r<0xa, "cmove", GPCR>; } +let Predicates = [HasCheriot] in { + def : InstAlias<"ct.cmove $rd, $rs1", (CMove GPCR:$rd, GPCR:$rs1)>; + def : InstAlias<"ct.csub $rd, $rs1, $rs2", (PseudoCSub GPR:$rd, GPCR:$rs1, + GPCR:$rs2)>; +} + //===----------------------------------------------------------------------===// // Control-Flow Instructions //===----------------------------------------------------------------------===// @@ -490,6 +544,15 @@ def CSEQX : Cheri_rr<0x21, "csetequalexact", GPR, GPCR, GPCR>; def : InstAlias<"cseqx $rd, $cs1, $cs2", (CSEQX GPR:$rd, GPCR:$cs1, GPCR:$cs2)>; } +let Predicates = [HasCheriot] in { + def : InstAlias<"ct.ctestsubset $rd, $rs1, $rs2", + (CTestSubset GPR:$rd, GPCRC0IsDDC:$rs1, GPCR:$rs2)>; + def : InstAlias<"ct.csetequalexact $rd, $rs1, $rs2", + (CSEQX GPR:$rd, GPCR:$rs1, GPCR:$rs2), 0>; + def : InstAlias<"ct.cseqx $rd, $cs1, $cs2", + (CSEQX GPR:$rd, GPCR:$cs1, GPCR:$cs2), 2>; +} + //===----------------------------------------------------------------------===// // Special Capabilty Register Access Instructions //===----------------------------------------------------------------------===// @@ -506,6 +569,15 @@ def : InstAlias<"cspecialw $scr, $cs", (CSpecialRW C0, special_capreg:$scr, GPCRNoC0:$cs)>; } +let Predicates = [HasCheriot] in { + def : InstAlias<"ct.cspecialrw $rd, $imm5, $rs1", + (CSpecialRW GPCR:$rd, special_capreg:$imm5, GPCR:$rs1)>; + def : InstAlias<"ct.cspecialr $cd, $scr", + (CSpecialRW GPCR:$cd, special_capreg:$scr, C0), 2>; + def : InstAlias<"ct.cspecialw $scr, $cs", + (CSpecialRW C0, special_capreg:$scr, GPCRNoC0:$cs), 2>; +} + //===----------------------------------------------------------------------===// // Fast Register-Clearing Instructions //===----------------------------------------------------------------------===// @@ -527,6 +599,16 @@ def : InstAlias<"crrl $rd, $rs1", (CRRL GPR:$rd, GPR:$rs1)>; def : InstAlias<"cram $rd, $rs1", (CRAM GPR:$rd, GPR:$rs1)>; } +let Predicates = [HasCheriot] in { + def : InstAlias<"ct.croundrepresentablelength $rd, $rs1", (CRRL GPR:$rd, + GPR:$rs1)>; + def : InstAlias<"ct.crepresentablealignmentmask $rd, $rs1", (CRAM GPR:$rd, + GPR:$rs1)>; + + def : InstAlias<"ct.crrl $rd, $rs1", (CRRL GPR:$rd, GPR:$rs1), 2>; + def : InstAlias<"ct.cram $rd, $rs1", (CRAM GPR:$rd, GPR:$rs1), 2>; +} + //===----------------------------------------------------------------------===// // Tag-Memory Access Instructions //===----------------------------------------------------------------------===// @@ -786,6 +868,36 @@ def : InstAlias<"cjalr $rs, $offset", (CJALR C1, GPCR:$rs, simm12:$of def : InstAlias<"cjalr $rd, $rs, $offset", (CJALR GPCR:$rd, GPCR:$rs, simm12:$offset), 0>; } // Predicates = [HasCheri, IsCapMode] +let Predicates = [HasCheriot] in { + def : InstAlias<"ct.auipcc $rd, $imm20", (AUIPCC GPCR:$rd, + uimm20_auipc:$imm20)>; + def : InstAlias<"ct.auicgp $rd, $imm20", (AUICGP GPCR:$rd, + uimm20_auigp:$imm20)>; + def : InstAlias<"ct.cjal $rd, $imm20", (CJAL GPCR:$rd, + simm21_lsb0_jal:$imm20)>; + def : InstAlias<"ct.cjalr $rd, ${imm12}(${rs1})", (CJALR GPCR:$rd, GPCR:$rs1, + simm12:$imm12)>; + + def : InstAlias<"ct.cjal $offset", (CJAL C1, simm21_lsb0_jal:$offset), 2>; + def : InstAlias<"ct.cj $offset", (CJAL C0, simm21_lsb0_jal:$offset), 0>; + + def : InstAlias<"ct.cjr $rs", (CJALR C0, GPCR:$rs, 0), 8>; + def : InstAlias<"ct.cjr ${offset}(${rs})", + (CJALR C0, GPCR:$rs, simm12:$offset), 5>; + def : InstAlias<"ct.cjalr $rs", (CJALR C1, GPCR:$rs, 0), 8>; + def : InstAlias<"ct.cjalr ${offset}(${rs})", + (CJALR C1, GPCR:$rs, simm12:$offset), 5>; + def : InstAlias<"ct.cjalr $rd, $rs", (CJALR GPCR:$rd, GPCR:$rs, 0), 7>; + def : InstAlias<"ct.cret", (CJALR C0, C1, 0), 9>; + + def : InstAlias<"ct.cjr $rs, $offset", (CJALR C0, GPCR:$rs, simm12:$offset), + 0>; + def : InstAlias<"ct.cjalr $rs, $offset", (CJALR C1, GPCR:$rs, simm12:$offset), + 0>; + def : InstAlias<"ct.cjalr $rd, $rs, $offset", + (CJALR GPCR:$rd, GPCR:$rs, simm12:$offset), 0>; +} + // Expands to an instruction alias with and without a c prefix for loads/stores multiclass CPrefixedInstAlias { def : InstAlias<"c" # Asm, Result, 0>; @@ -805,6 +917,26 @@ defm CSH : CheriStore_ri<0b001, "sh">; defm CSW : CheriStore_ri<0b010, "sw">; } // Predicates = [HasCheri, IsCapMode] +let Predicates = [HasCheriot] in { + def : InstAlias<"ct.clb $rd, ${imm12}(${rs1})", (CLB GPR:$rd, GPCR:$rs1, + simm12:$imm12)>; + def : InstAlias<"ct.clh $rd, ${imm12}(${rs1})", (CLH GPR:$rd, GPCR:$rs1, + simm12:$imm12)>; + def : InstAlias<"ct.clw $rd, ${imm12}(${rs1})", (CLW GPR:$rd, GPCR:$rs1, + simm12:$imm12)>; + def : InstAlias<"ct.clbu $rd, ${imm12}(${rs1})", (CLBU GPR:$rd, GPCR:$rs1, + simm12:$imm12)>; + def : InstAlias<"ct.clhu $rd, ${imm12}(${rs1})", (CLHU GPR:$rd, GPCR:$rs1, + simm12:$imm12)>; + + def : InstAlias<"ct.csb $rs2, ${imm12}(${rs1})", (CSB GPR:$rs2, GPCR:$rs1, + simm12:$imm12)>; + def : InstAlias<"ct.csh $rs2, ${imm12}(${rs1})", (CSH GPR:$rs2, GPCR:$rs1, + simm12:$imm12)>; + def : InstAlias<"ct.csw $rs2, ${imm12}(${rs1})", (CSW GPR:$rs2, GPCR:$rs1, + simm12:$imm12)>; +} + let Predicates = [HasCheri, IsRV64, IsCapMode] in { defm CLWU : CheriLoad_ri<0b110, "lwu">; defm CLD : CheriLoad_ri<0b011, "ld">; @@ -834,6 +966,13 @@ defm : CPrefixedInstAlias<"sc $rs2, (${rs1})", (CSC_64 GPCR:$rs2, GPCR:$rs1, 0)>; } +let Predicates = [HasCheriot] in { + def : InstAlias<"ct.clc $rd, ${imm12}(${rs1})", (CLC_64 GPCR:$rd, GPCR:$rs1, + simm12:$imm12)>; + def : InstAlias<"ct.csc $rd, ${imm12}(${rs1})", (CSC_64 GPCR:$rd, GPCR:$rs1, + simm12:$imm12)>; +} + let Predicates = [HasCheri, IsRV64, IsCapMode] in { let DecoderNamespace = "CapModeOnly_", hasSideEffects = 0, mayLoad = 1, mayStore = 0 in @@ -1884,6 +2023,12 @@ def PseudoCCALL : Pseudo<(outs), (ins cap_call_symbol:$func), []> { let AsmString = "ccall\t$func"; } +let Predicates = [HasCheriot] in { + def : InstAlias<"ct.ccall $rd, $func", (PseudoCCALLReg GPCR:$rd, + cap_call_symbol:$func)>; + def : InstAlias<"ct.ccall $func", (PseudoCCALL cap_call_symbol:$func)>; +} + // The PseudoCompartmentCall of expands to AUIPCC, CLC_64, C_CJALR (10 bytes), // but the setup to obtain the callee capability from an import table can // require up to 8 additional bytes. @@ -1932,6 +2077,10 @@ def PseudoCTAIL : Pseudo<(outs), (ins cap_call_symbol:$dst), []> { let AsmString = "ctail\t$dst"; } +let Predicates = [HasCheriot] in def : InstAlias< + "ct.ctail $dst", + (PseudoCTAIL cap_call_symbol:$dst)>; + let Predicates = [HasCheri, IsCapMode, IsPureCapABI], isCall = 1, isTerminator = 1, isReturn = 1, isBarrier = 1, Uses = [C2] in def PseudoCTAILIndirect : Pseudo<(outs), (ins GPCRNoC0C1:$rs1), @@ -1953,6 +2102,11 @@ def PseudoCJump : Pseudo<(outs GPCR:$rd), let AsmString = "cjump\t$target, $rd"; } +let Predicates = [HasCheriot] in def : InstAlias< + "ct.cjump $target, $rd", + (PseudoCJump GPCR:$rd, + pseudo_cap_jump_symbol:$target)>; + defm : CheriLdPat, Requires<[HasCheri, IsCapMode]>; defm : CheriLdPat, Requires<[HasCheri, IsCapMode]>; defm : CheriLdPat, Requires<[HasCheri, IsCapMode]>; diff --git a/llvm/test/MC/RISCV/cheri/cheriot.s b/llvm/test/MC/RISCV/cheri/cheriot.s index 56a4a381ea561..f8c7f033f4539 100644 --- a/llvm/test/MC/RISCV/cheri/cheriot.s +++ b/llvm/test/MC/RISCV/cheri/cheriot.s @@ -1,19 +1,122 @@ -# RUN: llvm-mc %s -triple=riscv32cheriot -mcpu=cheriot -mattr=+xcheri -riscv-no-aliases -show-encoding \ -# RUN: | FileCheck %s +// NOTE: Assertions have been autogenerated by utils/update_mc_test_checks.py UTC_ARGS: --version 5 +// RUN: llvm-mc %s -triple=riscv32cheriot -mcpu=cheriot -mattr=+xcheri,+xcheriot -show-encoding | FileCheck %s -check-prefixes=CHERIOT +// RUN: llvm-mc %s -triple=riscv32 -mattr=+xcheri,+cap-mode -show-encoding | FileCheck %s -check-prefixes=CHERI csetboundsrounddown cra, cra, zero -# CHECK: encoding: [0xdb,0x80,0x00,0x14] +// CHERIOT: ct.csetboundsrounddown cra, cra, zero # encoding: [0xdb,0x80,0x00,0x14] +// CHERI: csetboundsrounddown cra, cra, zero # encoding: [0xdb,0x80,0x00,0x14] csetboundsrounddown cra, ca5, zero -# CHECK: encoding: [0xdb,0x80,0x07,0x14] +// CHERIOT: ct.csetboundsrounddown cra, ca5, zero # encoding: [0xdb,0x80,0x07,0x14] +// CHERI: csetboundsrounddown cra, ca5, zero # encoding: [0xdb,0x80,0x07,0x14] csetboundsrounddown cra, cra, a5 -# CHECK: encoding: [0xdb,0x80,0xf0,0x14] +// CHERIOT: ct.csetboundsrounddown cra, cra, a5 # encoding: [0xdb,0x80,0xf0,0x14] +// CHERI: csetboundsrounddown cra, cra, a5 # encoding: [0xdb,0x80,0xf0,0x14] csetboundsrounddown cra, ca5, a5 -# CHECK: encoding: [0xdb,0x80,0xf7,0x14] +// CHERIOT: ct.csetboundsrounddown cra, ca5, a5 # encoding: [0xdb,0x80,0xf7,0x14] +// CHERI: csetboundsrounddown cra, ca5, a5 # encoding: [0xdb,0x80,0xf7,0x14] csetboundsrounddown ca5, cra, zero -# CHECK: [0xdb,0x87,0x00,0x14] +// CHERIOT: ct.csetboundsrounddown ca5, cra, zero # encoding: [0xdb,0x87,0x00,0x14] +// CHERI: csetboundsrounddown ca5, cra, zero # encoding: [0xdb,0x87,0x00,0x14] csetboundsrounddown ca5, ca5, zero -# CHECK: [0xdb,0x87,0x07,0x14] +// CHERIOT: ct.csetboundsrounddown ca5, ca5, zero # encoding: [0xdb,0x87,0x07,0x14] +// CHERI: csetboundsrounddown ca5, ca5, zero # encoding: [0xdb,0x87,0x07,0x14] csetboundsrounddown ca5, cra, a5 -# CHECK: [0xdb,0x87,0xf0,0x14] +// CHERIOT: ct.csetboundsrounddown ca5, cra, a5 # encoding: [0xdb,0x87,0xf0,0x14] +// CHERI: csetboundsrounddown ca5, cra, a5 # encoding: [0xdb,0x87,0xf0,0x14] csetboundsrounddown ca5, ca5, a5 -# CHECK: [0xdb,0x87,0xf7,0x14] +// CHERIOT: ct.csetboundsrounddown ca5, ca5, a5 # encoding: [0xdb,0x87,0xf7,0x14] +// CHERI: csetboundsrounddown ca5, ca5, a5 # encoding: [0xdb,0x87,0xf7,0x14] + +candperm ca1, ca5, x2 +// CHERIOT: ct.candperm ca1, ca5, sp # encoding: [0xdb,0x85,0x27,0x1a] +// CHERI: candperm ca1, ca5, sp # encoding: [0xdb,0x85,0x27,0x1a] +ccleartag ca1, ca5 +// CHERIOT: ct.ccleartag ca1, ca5 # encoding: [0xdb,0x85,0xb7,0xfe] +// CHERI: ccleartag ca1, ca5 # encoding: [0xdb,0x85,0xb7,0xfe] +cgetbase x2, ca5 +// CHERIOT: ct.cgetbase sp, ca5 # encoding: [0x5b,0x81,0x27,0xfe] +// CHERI: cgetbase sp, ca5 # encoding: [0x5b,0x81,0x27,0xfe] +cgethigh x2, ca5 +// CHERIOT: ct.cgethigh sp, ca5 # encoding: [0x5b,0x81,0x77,0xff] +// CHERI: cgethigh sp, ca5 # encoding: [0x5b,0x81,0x77,0xff] +cgetlen x2, ca5 +// CHERIOT: ct.cgetlen sp, ca5 # encoding: [0x5b,0x81,0x37,0xfe] +// CHERI: cgetlen sp, ca5 # encoding: [0x5b,0x81,0x37,0xfe] +cgetperm x2, ca5 +// CHERIOT: ct.cgetperm sp, ca5 # encoding: [0x5b,0x81,0x07,0xfe] +// CHERI: cgetperm sp, ca5 # encoding: [0x5b,0x81,0x07,0xfe] +cgettag x2, ca5 +// CHERIOT: ct.cgettag sp, ca5 # encoding: [0x5b,0x81,0x47,0xfe] +// CHERI: cgettag sp, ca5 # encoding: [0x5b,0x81,0x47,0xfe] +cgettype x2, ca5 +// CHERIOT: ct.cgettype sp, ca5 # encoding: [0x5b,0x81,0x17,0xfe] +// CHERI: cgettype sp, ca5 # encoding: [0x5b,0x81,0x17,0xfe] +cincoffset ca1, ca2, x2 +// CHERIOT: ct.cincoffset ca1, ca2, sp # encoding: [0xdb,0x05,0x26,0x22] +// CHERI: cincoffset ca1, ca2, sp # encoding: [0xdb,0x05,0x26,0x22] +cincoffset ca1, ca2, 3 +// CHERIOT: ct.cincoffset ca1, ca2, 3 # encoding: [0xdb,0x15,0x36,0x00] +// CHERI: cincoffset ca1, ca2, 3 # encoding: [0xdb,0x15,0x36,0x00] +cincoffsetimm ca1, ca2, 3 +// CHERIOT: ct.cincoffset ca1, ca2, 3 # encoding: [0xdb,0x15,0x36,0x00] +// CHERI: cincoffset ca1, ca2, 3 # encoding: [0xdb,0x15,0x36,0x00] +clc c1, (ca2) +// CHERIOT: ct.clc cra, 0(ca2) # encoding: [0x83,0x30,0x06,0x00] +// CHERI: clc cra, 0(ca2) # encoding: [0x83,0x30,0x06,0x00] +clc c1, 7(ca2) +// CHERIOT: ct.clc cra, 7(ca2) # encoding: [0x83,0x30,0x76,0x00] +// CHERI: clc cra, 7(ca2) # encoding: [0x83,0x30,0x76,0x00] +cmove ca1, ca2 +// CHERIOT: ct.cmove ca1, ca2 # encoding: [0xdb,0x05,0xa6,0xfe] +// CHERI: cmove ca1, ca2 # encoding: [0xdb,0x05,0xa6,0xfe] +cram x2, x5 +// CHERIOT: cram sp, t0 # encoding: [0x5b,0x81,0x92,0xfe] +// CHERI: cram sp, t0 # encoding: [0x5b,0x81,0x92,0xfe] +crepresentablealignmentmask x2, x5 +// CHERIOT: cram sp, t0 # encoding: [0x5b,0x81,0x92,0xfe] +// CHERI: cram sp, t0 # encoding: [0x5b,0x81,0x92,0xfe] +crrl x2, x5 +// CHERIOT: crrl sp, t0 # encoding: [0x5b,0x81,0x82,0xfe] +// CHERI: crrl sp, t0 # encoding: [0x5b,0x81,0x82,0xfe] +croundrepresentablelength x2, x5 +// CHERIOT: crrl sp, t0 # encoding: [0x5b,0x81,0x82,0xfe] +// CHERI: crrl sp, t0 # encoding: [0x5b,0x81,0x82,0xfe] +csc c1, (ca2) +// CHERIOT: ct.csc cra, 0(ca2) # encoding: [0x23,0x30,0x16,0x00] +// CHERI: csc cra, 0(ca2) # encoding: [0x23,0x30,0x16,0x00] +csc c1, 7(ca2) +// CHERIOT: ct.csc cra, 7(ca2) # encoding: [0xa3,0x33,0x16,0x00] +// CHERI: csc cra, 7(ca2) # encoding: [0xa3,0x33,0x16,0x00] +cseal ca1, ca2, ca3 +// CHERIOT: ct.cseal ca1, ca2, ca3 # encoding: [0xdb,0x05,0xd6,0x16] +// CHERI: cseal ca1, ca2, ca3 # encoding: [0xdb,0x05,0xd6,0x16] +csetaddr ca5, ca3, x2 +// CHERIOT: ct.csetaddr ca5, ca3, sp # encoding: [0xdb,0x87,0x26,0x20] +// CHERI: csetaddr ca5, ca3, sp # encoding: [0xdb,0x87,0x26,0x20] +csetbounds ca5, ca3, x2 +// CHERIOT: ct.csetbounds ca5, ca3, sp # encoding: [0xdb,0x87,0x26,0x10] +// CHERI: csetbounds ca5, ca3, sp # encoding: [0xdb,0x87,0x26,0x10] +csetbounds ca5, ca3, 3 +// CHERIOT: ct.csetbounds ca5, ca3, 3 # encoding: [0xdb,0xa7,0x36,0x00] +// CHERI: csetbounds ca5, ca3, 3 # encoding: [0xdb,0xa7,0x36,0x00] +csetboundsimm ca5, ca3, 3 +// CHERIOT: ct.csetbounds ca5, ca3, 3 # encoding: [0xdb,0xa7,0x36,0x00] +// CHERI: csetbounds ca5, ca3, 3 # encoding: [0xdb,0xa7,0x36,0x00] +csetboundsexact ca5, ca3, x2 +// CHERIOT: ct.csetboundsexact ca5, ca3, sp # encoding: [0xdb,0x87,0x26,0x12] +// CHERI: csetboundsexact ca5, ca3, sp # encoding: [0xdb,0x87,0x26,0x12] +csetequalexact x2, ca5, ca3 +// CHERIOT: ct.cseqx sp, ca5, ca3 # encoding: [0x5b,0x81,0xd7,0x42] +// CHERI: cseqx sp, ca5, ca3 # encoding: [0x5b,0x81,0xd7,0x42] +cseqx x2, ca5, ca3 +// CHERIOT: ct.cseqx sp, ca5, ca3 # encoding: [0x5b,0x81,0xd7,0x42] +// CHERI: cseqx sp, ca5, ca3 # encoding: [0x5b,0x81,0xd7,0x42] +csethigh ca5, ca3, x7 +// CHERIOT: ct.csethigh ca5, ca3, t2 # encoding: [0xdb,0x87,0x76,0x2c] +// CHERI: csethigh ca5, ca3, t2 # encoding: [0xdb,0x87,0x76,0x2c] +ctestsubset x7, ca5, ca3 +// CHERIOT: ct.ctestsubset t2, ca5, ca3 # encoding: [0xdb,0x83,0xd7,0x40] +// CHERI: ctestsubset t2, ca5, ca3 # encoding: [0xdb,0x83,0xd7,0x40] +cunseal ca5, ca3, ca1 +// CHERIOT: ct.cunseal ca5, ca3, ca1 # encoding: [0xdb,0x87,0xb6,0x18] +// CHERI: cunseal ca5, ca3, ca1 # encoding: [0xdb,0x87,0xb6,0x18]