Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2000-09-13 20:10:50 +0400
committerJeff Johnston <jjohnstn@redhat.com>2000-09-13 20:10:50 +0400
commit242361df3660f1baab5d9c511ebb5a142b9e8cb5 (patch)
tree1332e1afef972e2aec63b1d204f1f9d6ca0293fb /newlib
parentce779ff629dd00560dc7e062e241dccb8df8a727 (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')
-rw-r--r--newlib/ChangeLog7
-rw-r--r--newlib/libc/machine/v850/setjmp.S11
2 files changed, 15 insertions, 3 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 636154ca5..e7801fd66 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,10 @@
+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.
+
2000-09-06 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/types.h (FD_ZERO): Remove call to bzero and
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]