4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-16 03:19:54 +08:00
Jeff Johnston 82095e79cf 2003-05-28 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
* newlib/libc/machine/h8300/memcpy.S: Use .h8300hn and .h8300sn for
        normal mode
        * newlib/libc/machine/h8300/memset.S: Likewise
        * newlib/lib/machine/h8300/reg_memcpy.S: Likewise
        * newlib/lib/machine/h8300/reg_memset.S: Likewise
        * newlib/lib/machine/h8300/setjmp.S: Likewise
        * newlib/lib/machine/h8300/strcmp.S: Likewise
        * newlib/lib/sys/h8300hms/crt0.S: Likewise
2003-05-28 18:00:17 +00:00

72 lines
970 B
ArmAsm

.file "setjmp.S"
#ifdef __H8300H__
#ifdef __NORMAL_MODE__
.h8300hn
#else
.h8300h
#endif
#endif
#ifdef __H8300S__
#ifdef __NORMAL_MODE__
.h8300sn
#else
.h8300s
#endif
#endif
.section .text
.align 2
.global _setjmp
_setjmp:
#if defined(__H8300H__) || defined(__H8300S__)
mov.l er7,@er0
mov.l er6,@(4,er0)
mov.l er5,@(8,er0)
mov.l er4,@(12,er0)
mov.l @sp,er1
mov.l er1,@(16,er0)
sub.l er0,er0
#else
mov.w r7,@r0
mov.w r6,@(2,r0)
mov.w r5,@(4,r0)
mov.w r4,@(6,r0)
mov.w @sp,r1
mov.w r1,@(8,r0)
sub.w r0,r0
#endif
rts
.global _longjmp
_longjmp:
#if defined(__H8300H__) || defined (__H8300S__)
mov.l @er0+,er7
mov.l @er0+,er6
mov.l @er0+,er5
mov.l @er0+,er4
mov.l @er0,er2
mov.l er2,@sp
#if (__INT_MAX__ <= 32767)
mov.w r1,r0
#else
mov.l er1,er0
#endif
bne .L1
sub er0,er0
adds #1,er0
#else
mov.w @r0+,r7
mov.w @r0+,r6
mov.w @r0+,r5
mov.w @r0+,r4
mov.w @r0,r2
mov.w r2,@sp
mov.w r1,r0
bne .L1
mov.w #1,r0
#endif
.L1:
rts