Commit f29cab29 authored by Max Filippov's avatar Max Filippov

xtensa: get rid of stack frame in coprocessor_flush

coprocessor_flush is an ordinary function, it can use all registers.
Don't reserve stack frame for it and use a7 to preserve a0 around the
context saving call.
Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
parent e45d4bfb
...@@ -216,10 +216,8 @@ ENDPROC(fast_coprocessor) ...@@ -216,10 +216,8 @@ ENDPROC(fast_coprocessor)
ENTRY(coprocessor_flush) ENTRY(coprocessor_flush)
/* reserve 4 bytes on stack to save a0 */ abi_entry_default
abi_entry(4)
s32i a0, a1, 0
movi a4, .Lcp_regs_jump_table movi a4, .Lcp_regs_jump_table
addx8 a4, a3, a4 addx8 a4, a3, a4
addx4 a3, a3, a4 addx4 a3, a3, a4
...@@ -227,10 +225,11 @@ ENTRY(coprocessor_flush) ...@@ -227,10 +225,11 @@ ENTRY(coprocessor_flush)
beqz a4, 1f beqz a4, 1f
l32i a3, a3, CP_REGS_TAB_OFFSET l32i a3, a3, CP_REGS_TAB_OFFSET
add a2, a2, a3 add a2, a2, a3
mov a7, a0
callx0 a4 callx0 a4
1: l32i a0, a1, 0 mov a0, a7
1:
abi_ret(4) abi_ret_default
ENDPROC(coprocessor_flush) ENDPROC(coprocessor_flush)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment