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.
This commit is contained in:
Alexandre Oliva 2003-07-10 19:04:43 +00:00
parent 1e6a9a8cce
commit 18072a4fe5
3 changed files with 50 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2003-07-10 Alexandre Oliva <aoliva@redhat.com>
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.
2003-07-10 J"orn Rennecke <joern.rennecke@superh.com>
* libc/include/sys/unistd.h (ftruncate, truncate): Also declare

View File

@ -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

View File

@ -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