diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2000-09-13 20:10:50 +0400 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2000-09-13 20:10:50 +0400 |
commit | 242361df3660f1baab5d9c511ebb5a142b9e8cb5 (patch) | |
tree | 1332e1afef972e2aec63b1d204f1f9d6ca0293fb /newlib/libc | |
parent | ce779ff629dd00560dc7e062e241dccb8df8a727 (diff) |
2000-09-13 Will Cohen <wcohen@redhat.com>
* libc/machine/v850/setjmp.S (_setjmp): Save r1 rather than r0.
Added return value 0.
(_longjmp): Allow longjmp to return value of second argument
passed to it.
Diffstat (limited to 'newlib/libc')
-rw-r--r-- | newlib/libc/machine/v850/setjmp.S | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/newlib/libc/machine/v850/setjmp.S b/newlib/libc/machine/v850/setjmp.S index b0da8e88f..fb1570177 100644 --- a/newlib/libc/machine/v850/setjmp.S +++ b/newlib/libc/machine/v850/setjmp.S @@ -4,7 +4,7 @@ .align 1 .global _setjmp _setjmp: - st.w r0,0[r6] + st.w r1,0[r6] st.w r3,4[r6] st.w r4,8[r6] st.w r20,12[r6] @@ -19,11 +19,12 @@ _setjmp: st.w r29,48[r6] st.w r30,52[r6] st.w r31,56[r6] + mov r0, r10 jmp [r31] .global _longjmp _longjmp: - ld.w 0[r6],r0 + ld.w 0[r6],r1 ld.w 4[r6],r3 ld.w 8[r6],r4 ld.w 12[r6],r20 @@ -38,5 +39,9 @@ _longjmp: ld.w 48[r6],r29 ld.w 52[r6],r30 ld.w 56[r6],r31 - mov 1,r10 + cmp r7, r0 + jne 1f + mov 1,r7 +1: + mov r7, r10 jmp [r31] |