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:
Jim Shu 2021-06-14 23:47:04 +08:00 committed by Christopher Friedt
commit e3fe63a221
4 changed files with 1 additions and 6 deletions

View file

@ -51,7 +51,6 @@ struct soc_esf {
struct __esf {
ulong_t ra; /* return address */
ulong_t gp; /* global pointer */
ulong_t tp; /* thread pointer */
ulong_t t0; /* Caller-saved temporary register */