summaryrefslogtreecommitdiffstats
path: root/newlib/libc
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2003-07-10 19:04:43 +0000
committerAlexandre Oliva <aoliva@redhat.com>2003-07-10 19:04:43 +0000
commit18072a4fe5f4d2b4e39d7ddf1f599b6041a3afd0 (patch)
tree07f020a9aed722750201656d50f61a869e1caa6f /newlib/libc
parent1e6a9a8cced164fee0b5b34d2055b97ea320e0ed (diff)
downloadcygnal-18072a4fe5f4d2b4e39d7ddf1f599b6041a3afd0.tar.gz
cygnal-18072a4fe5f4d2b4e39d7ddf1f599b6041a3afd0.tar.bz2
cygnal-18072a4fe5f4d2b4e39d7ddf1f599b6041a3afd0.zip
2000-04-27 Alexandre Oliva <aoliva@cygnus.com>
* libc/include/machine/setjmp.h (_JBLEN, AM33/2.0): Set to 26. * libc/machine/mn10300/setjmp.S (setjmp, longjmp): Save and restore callee-saved FP registers.
Diffstat (limited to 'newlib/libc')
-rw-r--r--newlib/libc/include/machine/setjmp.h4
-rw-r--r--newlib/libc/machine/mn10300/setjmp.S39
2 files changed, 43 insertions, 0 deletions
diff --git a/newlib/libc/include/machine/setjmp.h b/newlib/libc/include/machine/setjmp.h
index 7f08a017a..e6d5e3944 100644
--- a/newlib/libc/include/machine/setjmp.h
+++ b/newlib/libc/include/machine/setjmp.h
@@ -135,9 +135,13 @@ typedef int jmp_buf[_JBLEN];
#endif
#if defined(__mn10300__) || defined(__mn10200__)
+#ifdef __AM33_2__
+#define _JBLEN 26
+#else
/* A guess */
#define _JBLEN 10
#endif
+#endif
#ifdef __v850
/* I think our setjmp is saving 15 regs at the moment. Gives us one word
diff --git a/newlib/libc/machine/mn10300/setjmp.S b/newlib/libc/machine/mn10300/setjmp.S
index a95f12c5a..cf42f9542 100644
--- a/newlib/libc/machine/mn10300/setjmp.S
+++ b/newlib/libc/machine/mn10300/setjmp.S
@@ -6,6 +6,9 @@
#ifdef __AM33__
.am33
#endif
+#ifdef __AM33_2__
+ .am33_2
+#endif
_setjmp:
mov d0,a0
mov d2,(0,a0)
@@ -22,6 +25,24 @@ _setjmp:
mov r5,(a0+)
mov r6,(a0+)
mov r7,(a0+)
+#ifdef __AM33_2__
+ fmov fs4,(a0+)
+ fmov fs5,(a0+)
+ fmov fs6,(a0+)
+ fmov fs7,(a0+)
+ fmov fs8,(a0+)
+ fmov fs9,(a0+)
+ fmov fs10,(a0+)
+ fmov fs11,(a0+)
+ fmov fs12,(a0+)
+ fmov fs13,(a0+)
+ fmov fs14,(a0+)
+ fmov fs15,(a0+)
+ fmov fs16,(a0+)
+ fmov fs17,(a0+)
+ fmov fs18,(a0+)
+ fmov fs19,(a0+)
+#endif
#endif
sub d0,d0
rets
@@ -43,6 +64,24 @@ _longjmp:
mov (a0+),r5
mov (a0+),r6
mov (a0+),r7
+#ifdef __AM33_2__
+ fmov (a0+),fs4
+ fmov (a0+),fs5
+ fmov (a0+),fs6
+ fmov (a0+),fs7
+ fmov (a0+),fs8
+ fmov (a0+),fs9
+ fmov (a0+),fs10
+ fmov (a0+),fs11
+ fmov (a0+),fs12
+ fmov (a0+),fs13
+ fmov (a0+),fs14
+ fmov (a0+),fs15
+ fmov (a0+),fs16
+ fmov (a0+),fs17
+ fmov (a0+),fs18
+ fmov (a0+),fs19
+#endif
#endif
cmp 0,d1
bne L1