diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2004-02-02 16:59:53 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2004-02-02 16:59:53 +0000 |
commit | 94d61fcb762f88e1835fc531d20341a596b245f2 (patch) | |
tree | c3ec086dd9683bad92008cf86d2c5b232167b4f1 /newlib/libc/machine/tic4x/setjmp.S | |
parent | 8d9bbb509261c62208169c46e7437839bffaec6b (diff) | |
download | cygnal-94d61fcb762f88e1835fc531d20341a596b245f2.tar.gz cygnal-94d61fcb762f88e1835fc531d20341a596b245f2.tar.bz2 cygnal-94d61fcb762f88e1835fc531d20341a596b245f2.zip |
2004-02-02 Joel Sherrill <joel@oarcorp.com>
* configure.host: Add support for tic4x.
* libc/include/machine/ieeefp.h: Ditto.
* libc/include/machine/setjmp.h: Ditto.
* libc/machine/tic4x/Makefile.am: New file.
* libc/machine/tic4x/configure.in: Ditto.
* libc/machine/tic4x/setjmp.S: Ditto.
* libc/machine/tic4x/aclocal.m4: Generated.
* libc/machine/tic4x/configure: Ditto.
* libc/machine/tic4x/Makefile.in: Ditto.
Diffstat (limited to 'newlib/libc/machine/tic4x/setjmp.S')
-rw-r--r-- | newlib/libc/machine/tic4x/setjmp.S | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/newlib/libc/machine/tic4x/setjmp.S b/newlib/libc/machine/tic4x/setjmp.S new file mode 100644 index 000000000..d6e8d2573 --- /dev/null +++ b/newlib/libc/machine/tic4x/setjmp.S @@ -0,0 +1,75 @@ +/* setjmp/longjmp routines. + * + * Written by Michael Hayes <m.hayes@elec.canterbury.ac.nz>. + * + * The author hereby grant permission to use, copy, modify, distribute, + * and license this software and its documentation for any purpose, provided + * that existing copyright notices are retained in all copies and that this + * notice is included verbatim in any distributions. No written agreement, + * license, or royalty fee is required for any of the authorized uses. + * Modifications to this software may be copyrighted by their authors + * and need not follow the licensing terms described here, provided that + * the new terms are clearly indicated on the first page of each file where + * they apply. + */ + + .sect .text + .global setjmp + .global longjmp + +setjmp: + pop r1 + ldi sp, ar0 +#ifndef _REGPARM + ldi *ar0, ar2 +#endif + + sti r4, *ar2++ + sti r5, *ar2++ + stf r6, *ar2++ + stf r7, *ar2++ +#ifdef _TMS320C4x + sti r8, *ar2++ +#endif + sti ar3, *ar2++ + sti ar4, *ar2++ + sti ar5, *ar2++ + sti ar6, *ar2++ + sti ar7, *ar2++ + bd r1 + sti r1, *ar2++ + sti ar0, *ar2 + ldi 0, r0 + + +longjmp: +#ifndef _REGPARM + ldi sp, ar0 + ldi *-ar0(1), ar2 + ldi *-ar0(2), r0 + ldiz 1, r0 +#else + ldi r2, r0 + ldiz 1, r0 +#endif + + ldi *ar2++, r4 + ldi *ar2++, r5 + ldf *ar2++, r6 + ldf *ar2++, r7 +#ifdef _TMS320C4x + ldi *ar2++, r8 +#endif + ldi *ar2++, ar3 + ldi *ar2++, ar4 + ldi *ar2++, ar5 + ldi *ar2++, ar6 + ldi *ar2++, ar7 + ldi *ar2++, r1 + ldi *ar2, sp + + b r1 + .end + + + |