We add a new RegisterClass to represent CSRs and modify
storeRegToStackSlot/loadRegFromStackSlot so that we can
save/restore these CSRs.
This is an alternative of D158396
Paths
| Differential D158492
[RISCV] Add CSR RegisterClass and save/restore fcsr in interrupt Needs ReviewPublic Authored by wangpc on Aug 22 2023, 1:06 AM.
Details Summary We add a new RegisterClass to represent CSRs and modify This is an alternative of D158396
Diff Detail
Event Timeline
Comment Actions
I think it's more consistent than D158396 if consider CSRs as callee-saved register in one consistent place and infra.
Revision Contents
Diff 552252 llvm/lib/Target/RISCV/RISCVCallingConv.td
llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
llvm/lib/Target/RISCV/RISCVRegisterInfo.td
llvm/test/CodeGen/RISCV/interrupt-attr-nocall.ll
llvm/test/CodeGen/RISCV/interrupt-attr.ll
|
We should probably mention fcsr in this comment (and the one for f64 below).