diff options
author | Rich Felker <dalias@aerifal.cx> | 2015-02-20 20:25:35 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2015-02-20 20:25:35 -0500 |
commit | f409338a9e808a09001669377c608fd2803d808d (patch) | |
tree | 2eb5478cc7177d8480ed252cc8004d1b102f5acf /src/thread/mips/syscall_cp.s | |
parent | 6bea5dc69892cd9ff0c222474e7dd468c29dfa75 (diff) | |
download | musl-f409338a9e808a09001669377c608fd2803d808d.tar.gz musl-f409338a9e808a09001669377c608fd2803d808d.tar.xz musl-f409338a9e808a09001669377c608fd2803d808d.zip |
prepare cancellation syscall asm for possibility of __cancel returning
Diffstat (limited to 'src/thread/mips/syscall_cp.s')
-rw-r--r-- | src/thread/mips/syscall_cp.s | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/thread/mips/syscall_cp.s b/src/thread/mips/syscall_cp.s index b6f30ee8..d903794d 100644 --- a/src/thread/mips/syscall_cp.s +++ b/src/thread/mips/syscall_cp.s @@ -3,19 +3,19 @@ .global __syscall_cp_asm .type __syscall_cp_asm,@function __syscall_cp_asm: + subu $sp, $sp, 32 .global __cp_begin __cp_begin: lw $4, 0($4) - bne $4, $0, 2f + bne $4, $0, __cp_cancel move $2, $5 move $4, $6 move $5, $7 - lw $6, 16($sp) - lw $7, 20($sp) - lw $8, 24($sp) - lw $9, 28($sp) - lw $10,32($sp) - subu $sp, $sp, 32 + lw $6, 48($sp) + lw $7, 52($sp) + lw $8, 56($sp) + lw $9, 60($sp) + lw $10,64($sp) sw $8, 16($sp) sw $9, 20($sp) sw $10,24($sp) @@ -29,6 +29,10 @@ __cp_end: subu $2, $0, $2 1: jr $ra nop -2: lw $25, %call16(__cancel)($gp) + +.global __cp_cancel +__cp_cancel: + addu $sp, $sp, 32 + lw $25, %call16(__cancel)($gp) jr $25 nop |