arch: riscv: remove unneeded context switch to gp register
RISC-V global pointer (GP) register is neither caller nor callee register, and it's a constant value in the single ELF file. Thus, we don't need to save/restore GP at ISR enter/exit. Remove it to optimize context switch performance. Signed-off-by: Jim Shu <cwshu@andestech.com>
This commit is contained in:
parent
e1c7333dc7
commit
e3fe63a221
4 changed files with 1 additions and 6 deletions
|
@ -122,8 +122,6 @@
|
|||
RV_OP_STOREREG temp, __z_arch_esf_t_mstatus_OFFSET(to_reg) ;\
|
||||
RV_OP_LOADREG temp, __z_arch_esf_t_ra_OFFSET(from_reg) ;\
|
||||
RV_OP_STOREREG temp, __z_arch_esf_t_ra_OFFSET(to_reg) ;\
|
||||
RV_OP_LOADREG temp, __z_arch_esf_t_gp_OFFSET(from_reg) ;\
|
||||
RV_OP_STOREREG temp, __z_arch_esf_t_gp_OFFSET(to_reg) ;\
|
||||
RV_OP_LOADREG temp, __z_arch_esf_t_tp_OFFSET(from_reg) ;\
|
||||
RV_OP_STOREREG temp, __z_arch_esf_t_tp_OFFSET(to_reg) ;\
|
||||
RV_OP_LOADREG temp, __z_arch_esf_t_t0_OFFSET(from_reg) ;\
|
||||
|
@ -179,7 +177,6 @@
|
|||
|
||||
#define DO_CALLER_SAVED(op) \
|
||||
op ra, __z_arch_esf_t_ra_OFFSET(sp) ;\
|
||||
op gp, __z_arch_esf_t_gp_OFFSET(sp) ;\
|
||||
op tp, __z_arch_esf_t_tp_OFFSET(sp) ;\
|
||||
op t0, __z_arch_esf_t_t0_OFFSET(sp) ;\
|
||||
op t1, __z_arch_esf_t_t1_OFFSET(sp) ;\
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue