4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-16 03:19:54 +08:00
Alexandre Oliva 9a6831be86 2003-07-02 Richard Sandiford <rsandifo@redhat.com>
* libc/machine/h8300/Makefile.am (lib_a_SOURCES): Add h8sx_strcpy.S.
* libc/machine/h8300/defines.h (LEN): New macro.
* libc/machine/h8300/memcpy.S: Add h8sx version.
* libc/machine/h8300/memset.S: Likewise.
* libc/machine/h8300/strcmp.S: Likewise.
* libc/machine/h8300/setjmp.S: Use h8sx move instructions.
* libc/machine/h8300/h8sx_strcpy.S: New file.
2003-06-30  Richard Sandiford  <rsandifo@redhat.com>
* libc/include/machine/ieeefp.h: Extend __H8300S__ handling to
__H8300SX__.
* libc/include/machine/setjmp.h: Likewise.
* libc/include/sys/config.h: Likewise.
* libc/machine/h8300/defines.h: Likewise.
* libc/machine/h8300/setjmp.S: Likewise.
* libc/machine/h8300/strcmp.S: Likewise.
* libc/sys/h8300hms/close.S: Likewise.
* libc/sys/h8300hms/fstat.S: Likewise.
* libc/sys/h8300hms/lseek.S: Likewise.
* libc/sys/h8300hms/read.S: Likewise.
* libc/sys/h8300hms/write.S: Likewise.
* libc/sys/h8300hms/crt0.S: Likewise.
* libc/machine/h8300/setarch.h: Use .h8300sx or .h8300sxn if
__H8300SX__ is defined.
* libc/sys/h8300hms/setarch.h: Likewise.
2004-06-22 21:54:52 +00:00

106 lines
1.6 KiB
ArmAsm

; h8/300 and h8/300h start up file.
#include "setarch.h"
#ifdef __H8300__
.section .text
.global _start
_start:
mov.w #_stack,sp
mov.w #_edata,r0
mov.w #_end,r1
sub.w r2,r2
.Loop: mov.w r2,@r0
adds #2,r0
cmp r1,r0
blo .Loop
#ifdef __ELF__
mov.l #__fini,r0
jsr @_atexit
#ifdef __SIMULATOR__
jsr @0xcc
#endif
jsr @__init
#else
#ifdef __SIMULATOR__
jsr @0xcc
#endif
jsr @___main
#endif
jsr @_main
jsr @_exit
.section .stack
_stack: .word 1
#endif
#ifdef __H8300H__
.section .text
.global _start
_start:
mov.l #_stack,sp
mov.l #_edata,er0
mov.l #_end,er1
sub.w r2,r2 ; not sure about alignment requirements
.Loop: mov.w r2,@er0 ; playing it safe for now
adds #2,er0
cmp.l er1,er0
blo .Loop
#ifdef __ELF__
mov.l #__fini,er0
jsr @_atexit
#ifdef __SIMULATOR__
jsr @0xcc
#endif
jsr @__init
#else
#ifdef __SIMULATOR__
jsr @0xcc
#endif
jsr @___main
#endif
jsr @_main
jsr @_exit
.section .stack
_stack: .long 1
#endif
#if defined (__H8300S__) || defined (__H8300SX__)
.section .text
.global _start
_start:
mov.l #_stack,sp
mov.l #_edata,er0
mov.l #_end,er1
sub.w r2,r2 ; not sure about alignment requirements
.Loop: mov.w r2,@er0 ; playing it safe for now
adds #2,er0
cmp.l er1,er0
blo .Loop
#ifdef __ELF__
mov.l #__fini,er0
jsr @_atexit
#ifdef __SIMULATOR__
jsr @0xcc
#endif
jsr @__init
#else
#ifdef __SIMULATOR__
jsr @0xcc
#endif
jsr @___main
#endif
jsr @_main
jsr @_exit
.section .stack
_stack: .long 1
#endif