gcc: Use register r31 to call routines instead of r10
This commit is contained in:
parent
73651a0a1b
commit
6a790fc1e4
10
gcc/call.h
10
gcc/call.h
|
@ -4,13 +4,13 @@
|
||||||
#define STR(x) STR2(x)
|
#define STR(x) STR2(x)
|
||||||
|
|
||||||
#define _call2(c, jt_addr) \
|
#define _call2(c, jt_addr) \
|
||||||
asm("li a0,ret_" #c "\n" \
|
asm("li t6,ret_" #c "\n" \
|
||||||
"addi sp,sp,-4\n" \
|
"addi sp,sp,-4\n" \
|
||||||
"sw a0,0(sp)\n" \
|
"sw t6,0(sp)\n" \
|
||||||
"li a0,[" STR(jt_addr) "]\n" \
|
"li t6,[" STR(jt_addr) "]\n" \
|
||||||
"jr a0\n" \
|
"jr t6\n" \
|
||||||
"ret_" #c ":" \
|
"ret_" #c ":" \
|
||||||
::: "a0" \
|
::: "t6" \
|
||||||
);
|
);
|
||||||
#define _call(c, jt_addr) _call2(c, jt_addr)
|
#define _call(c, jt_addr) _call2(c, jt_addr)
|
||||||
#define call(jt_addr) _call(__COUNTER__, jt_addr)
|
#define call(jt_addr) _call(__COUNTER__, jt_addr)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user