Skip to content

Commit f4f1dfb

Browse files
committed
[CHERI] Fix the size limit of PseudoCLGC
Because this can become a three instruction sequence of AUIPCC + CIncOffset + CSetBounds, the maximum size is 12 rather than 8.
1 parent e7b61d9 commit f4f1dfb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfoXCheri.td

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1342,9 +1342,10 @@ def : Pat<(riscv_cllc tjumptable:$in), (PseudoCLLC tjumptable:$in)>;
13421342
def : Pat<(riscv_cllc tconstpool:$in), (PseudoCLLC tconstpool:$in)>;
13431343

13441344
let hasSideEffects = 0, mayLoad = 1, mayStore = 0, isCodeGenOnly = 0,
1345-
isAsmParserOnly = 1, Size = 8 in
1346-
def PseudoCLGC : Pseudo<(outs GPCR:$dst), (ins bare_symbol:$src), [],
1347-
"clgc", "$dst, $src">;
1345+
isAsmParserOnly = 1,
1346+
Size = 12 in def PseudoCLGC
1347+
: Pseudo<(outs GPCR:$dst), (ins bare_symbol:$src), [], "clgc",
1348+
"$dst, $src">;
13481349

13491350
def : Pat<(riscv_clgc tglobaladdr:$in), (PseudoCLGC tglobaladdr:$in)>;
13501351

0 commit comments

Comments
 (0)