The patch adds the instructions in Zicfiss extension. Zicfisslp extension is
to support shadow stack for control flow integrity.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
The patch might be too early to be posted. The idea is to make people easier to develop shadow-stack/landing-pads, although it will land for long time.
clang/test/Preprocessor/riscv-target-features.c | ||
---|---|---|
75 | This needs to be renamed to remove lp | |
725 | This needs to be renamed to remove lp | |
llvm/lib/Target/RISCV/RISCVFeatures.td | ||
84 | Zicfiss | |
llvm/lib/Target/RISCV/RISCVInstrInfo.td | ||
1921 | This needs to be rebased, the files here were moved into groups. | |
llvm/lib/Target/RISCV/RISCVInstrInfoZicfiss.td | ||
1 ↗ | (On Diff #543857) | Filename doesn't match |
35 ↗ | (On Diff #543857) | Can we use RVInstI by adding let imm12 = 0b100000011100 to the body? |
66 ↗ | (On Diff #543857) | Can this use RVInstI with lets for imm12, rs1, and rd? |
75 ↗ | (On Diff #543857) | Can this use RVInstR? |
87 ↗ | (On Diff #543857) | Can this use RVInstR? |
98 ↗ | (On Diff #543857) | RVInstR |
llvm/lib/Target/RISCV/RISCVInstrInfo.td | ||
---|---|---|
233 | Is this used? | |
llvm/lib/Target/RISCV/RISCVInstrInfoZicfiss.td | ||
35 ↗ | (On Diff #544228) | Why are there ins and outs here that aren't encoded? |
56 ↗ | (On Diff #544228) | Need to be able to parse with ra instead of x1 and t0 instead of x5. I think you might need a new Operand type so the parse can parse it as a register. |
llvm/lib/Target/RISCV/RISCVInstrInfoZicfiss.td | ||
---|---|---|
56 ↗ | (On Diff #544228) |
Actually, we can parse ssload ra in llvm/test/MC/RISCV/zicfiss-valid.s, but the code indeed can not print ssload ra. I have tried to define ssload and sspopchk separately, but it caused decode conflict. |
Make asmprinter capable to print alias register name for ssload/sspopchk/c.sspush/c.sspopchk.
llvm/lib/Target/RISCV/RISCVInstrInfoZicfiss.td | ||
---|---|---|
56 ↗ | (On Diff #544228) | The problem is fixed in latest update. |
llvm/lib/Target/RISCV/RISCVInstrInfoZicfiss.td | ||
---|---|---|
88 ↗ | (On Diff #550083) | Is it compatible with Zca? |
llvm/lib/Target/RISCV/RISCVInstrInfoZicfiss.td | ||
---|---|---|
32 ↗ | (On Diff #550083) | Can you call this rs1val instead of rs1 since $rs1 is part of the ins. |
llvm/lib/Target/RISCV/RISCVInstrInfoZicfiss.td | ||
---|---|---|
88 ↗ | (On Diff #550083) | The spec does not mention it is incompatible with Zca. I think I need to enable c.push/c.popchk for Zca. |
llvm/lib/Target/RISCV/RISCVInstrInfoZicfiss.td | ||
---|---|---|
37 ↗ | (On Diff #550578) | Do we need the rs1 variable or can we use rs1val here? We usually have the rs1 field because the encoder maps ins/outs operand names to the field name. In this case we have an explicit immediate passed as rs1val. Is the encoding value coming from the operand or from the immediate? I can't tell with the name conflict. |
llvm/lib/Target/RISCV/RISCVInstrInfoZicfiss.td | ||
---|---|---|
1 ↗ | (On Diff #550987) | CFG? |
48–49 ↗ | (On Diff #550987) | This is some strange wrapping; normally we'd put RVInstI on the same line and wrap some of the arguments, but if you really want to wrap then indent by 4 spaces and put the colon on the lower line, that's what the predominant style is |
62 ↗ | (On Diff #550987) | This is how I'd expect the earlier instructions to be formatted, FWIW... please be consistent |
94 ↗ | (On Diff #550987) | Missing space |
llvm/lib/Target/RISCV/RISCVInstrInfoZicfiss.td | ||
---|---|---|
76 ↗ | (On Diff #550998) | After v0.2 SSPUSH encoding already changed from 0b1000101 to 0b1000001 |
Closed it and create a PR https://github.com/llvm/llvm-project/pull/66043 for version 0.3.1.
This needs to be renamed to remove lp