mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-07 04:09:21 +00:00
[MIPS] Fix register handling in syscalls when debugging.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
parent
ecd5a73904
commit
04a7052c83
4 changed files with 12 additions and 4 deletions
|
@ -94,11 +94,13 @@ syscall_trace_entry:
|
|||
li a1, 0
|
||||
jal do_syscall_trace
|
||||
|
||||
move t0, s0
|
||||
RESTORE_STATIC
|
||||
lw a0, PT_R4(sp) # Restore argument registers
|
||||
lw a1, PT_R5(sp)
|
||||
lw a2, PT_R6(sp)
|
||||
lw a3, PT_R7(sp)
|
||||
jalr s0
|
||||
jalr t0
|
||||
|
||||
li t0, -EMAXERRNO - 1 # error?
|
||||
sltu t0, t0, v0
|
||||
|
|
|
@ -93,13 +93,15 @@ syscall_trace_entry:
|
|||
li a1, 0
|
||||
jal do_syscall_trace
|
||||
|
||||
move t0, s0
|
||||
RESTORE_STATIC
|
||||
ld a0, PT_R4(sp) # Restore argument registers
|
||||
ld a1, PT_R5(sp)
|
||||
ld a2, PT_R6(sp)
|
||||
ld a3, PT_R7(sp)
|
||||
ld a4, PT_R8(sp)
|
||||
ld a5, PT_R9(sp)
|
||||
jalr s0
|
||||
jalr t0
|
||||
|
||||
li t0, -EMAXERRNO - 1 # error?
|
||||
sltu t0, t0, v0
|
||||
|
|
|
@ -90,13 +90,15 @@ n32_syscall_trace_entry:
|
|||
li a1, 0
|
||||
jal do_syscall_trace
|
||||
|
||||
move t0, s0
|
||||
RESTORE_STATIC
|
||||
ld a0, PT_R4(sp) # Restore argument registers
|
||||
ld a1, PT_R5(sp)
|
||||
ld a2, PT_R6(sp)
|
||||
ld a3, PT_R7(sp)
|
||||
ld a4, PT_R8(sp)
|
||||
ld a5, PT_R9(sp)
|
||||
jalr s0
|
||||
jalr t0
|
||||
|
||||
li t0, -EMAXERRNO - 1 # error?
|
||||
sltu t0, t0, v0
|
||||
|
|
|
@ -124,6 +124,8 @@ trace_a_syscall:
|
|||
li a1, 0
|
||||
jal do_syscall_trace
|
||||
|
||||
move t0, s0
|
||||
RESTORE_STATIC
|
||||
ld a0, PT_R4(sp) # Restore argument registers
|
||||
ld a1, PT_R5(sp)
|
||||
ld a2, PT_R6(sp)
|
||||
|
@ -132,7 +134,7 @@ trace_a_syscall:
|
|||
ld a5, PT_R9(sp)
|
||||
ld a6, PT_R10(sp)
|
||||
ld a7, PT_R11(sp) # For indirect syscalls
|
||||
jalr s0
|
||||
jalr t0
|
||||
|
||||
li t0, -EMAXERRNO - 1 # error?
|
||||
sltu t0, t0, v0
|
||||
|
|
Loading…
Reference in a new issue