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 | |
| 726 | This needs to be renamed to remove lp | |
| llvm/lib/Target/RISCV/RISCVFeatures.td | ||
| 84 | Zicfiss | |
| llvm/lib/Target/RISCV/RISCVInstrInfo.td | ||
| 1967 | This needs to be rebased, the files here were moved into groups. | |
| llvm/lib/Target/RISCV/RISCVInstrInfoZicfiss.td | ||
| 2 | Filename doesn't match | |
| 36 | Can we use RVInstI by adding let imm12 = 0b100000011100 to the body? | |
| 67 | Can this use RVInstI with lets for imm12, rs1, and rd? | |
| 76 | Can this use RVInstR? | |
| 88 | Can this use RVInstR? | |
| 99 | RVInstR | |
| llvm/lib/Target/RISCV/RISCVInstrInfo.td | ||
|---|---|---|
| 233 | Is this used? | |
| llvm/lib/Target/RISCV/RISCVInstrInfoZicfiss.td | ||
| 36 | Why are there ins and outs here that aren't encoded? | |
| 57 | 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 | ||
|---|---|---|
| 57 |
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 | ||
|---|---|---|
| 57 | The problem is fixed in latest update. | |
| llvm/lib/Target/RISCV/RISCVInstrInfoZicfiss.td | ||
|---|---|---|
| 89 | Is it compatible with Zca? | |
| llvm/lib/Target/RISCV/RISCVInstrInfoZicfiss.td | ||
|---|---|---|
| 33 | Can you call this rs1val instead of rs1 since $rs1 is part of the ins. | |
| llvm/lib/Target/RISCV/RISCVInstrInfoZicfiss.td | ||
|---|---|---|
| 89 | 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 | ||
|---|---|---|
| 38 | 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 | ||
|---|---|---|
| 2 | CFG? | |
| 49–50 | 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 | |
| 63 | This is how I'd expect the earlier instructions to be formatted, FWIW... please be consistent | |
| 95 | Missing space | |
| llvm/lib/Target/RISCV/RISCVInstrInfoZicfiss.td | ||
|---|---|---|
| 77 | 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