mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-15 19:09:58 +08:00
9f25eed9c9
2001-03-13 Alexandre Oliva <aoliva@redhat.com> * configure.host (newlib_cflags) [sh*-*-*]: Enable long long support in printf. 2001-01-29 Alexandre Oliva <aoliva@redhat.com> * libc/machine/sh/setjmp.S [SH5]: Switch to SHmedia mode before any labels. 2001-01-24 Alexandre Oliva <aoliva@redhat.com> * libc/sys/sh/trap.S (___trap34) [SH5]: Don't trash r2. 2000-12-16 Alexandre Oliva <aoliva@redhat.com> * libc/machine/sh/configure.in: Rework conditionals. * libc/machine/sh/Makefile.am: Likewise. * libc/machine/sh/configure, libc/machine/sh/Makefile.in: Rebuilt. 2000-12-01 Alexandre Oliva <aoliva@redhat.com> * configure.host: Match `sh*'. * libc/include/machine/setjmp.h: Define for SH5. * libc/machine/sh/configure.in: Detect SH5. * libc/machine/sh/configure: Rebuilt. * libc/machine/sh/Makefile.am: Use only setjmp.S for SH5. * libc/machine/sh/Makefile.in: Rebuilt. * libc/machine/sh/asm.h: Adjust for SH5. * libc/machine/sh/setjmp.S: Implement in SHmedia. * libc/sys/sh/crt0.S: Likewise. * libc/sys/sh/trap.S: Likewise.
44 lines
649 B
ArmAsm
44 lines
649 B
ArmAsm
#if __SH5__
|
|
.mode SHmedia
|
|
#if __SH5__ == 32 && __SHMEDIA__
|
|
.section .text..SHmedia32, "ax"
|
|
#else
|
|
.text
|
|
#endif
|
|
.global ___trap34
|
|
___trap34:
|
|
movi 34, r0
|
|
trapa r0
|
|
pt/l ret, tr1
|
|
ptabs/l r18, tr0
|
|
beqi r1, 0, tr1
|
|
#if __SH5__ == 64
|
|
movi ((_errno >> 48) & 65535), r0
|
|
shori ((_errno >> 32) & 65535), r0
|
|
shori ((_errno >> 16) & 65535), r0
|
|
#else
|
|
movi ((_errno >> 16) & 65535), r0
|
|
#endif
|
|
shori (_errno & 65535), r0
|
|
stx.l r0, r63, r1
|
|
ret:
|
|
blink tr0, r63
|
|
|
|
#else
|
|
.text
|
|
.global ___trap34
|
|
___trap34:
|
|
trapa #34
|
|
tst r1,r1 ! r1 is errno
|
|
bt ret
|
|
mov.l perrno,r2
|
|
mov.l r1,@r2
|
|
ret:
|
|
rts
|
|
nop
|
|
|
|
.align 2
|
|
perrno:
|
|
.long _errno
|
|
#endif /* ! __SH5__ */
|