Fix register sizes in h8300 crt0.S

Richard Sandiford rsandifo@redhat.com
Mon Jun 23 19:06:00 GMT 2003


This patch fixes the calls to atexit() in libc/sys/h8300hms.  At the
moment they use 32-bit moves with a 16-bit register destination.

Tested on h8300-elf.  OK to install?

Richard


	* libc/sys/h8300hms/crt0.S (_start): Fix register sizes in call
	to atexit().

Index: libc/sys/h8300hms/crt0.S
===================================================================
RCS file: /cvs/src/src/newlib/libc/sys/h8300hms/crt0.S,v
retrieving revision 1.8
diff -u -d -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.8 crt0.S
--- libc/sys/h8300hms/crt0.S	10 Jun 2003 07:44:30 -0000	1.8
+++ libc/sys/h8300hms/crt0.S	23 Jun 2003 15:24:48 -0000
@@ -50,7 +50,7 @@ _start:
 	cmp.l	er1,er0
 	blo	.Loop
 #ifdef __ELF__
-	mov.l   #__fini,r0
+	mov.l   #__fini,er0
 	jsr     @_atexit
 #ifdef __SIMULATOR__
         jsr     @0xcc
@@ -84,7 +84,7 @@ _start:
 	cmp.l	er1,er0
 	blo	.Loop
 #ifdef __ELF__
-	mov.l   #__fini,r0
+	mov.l   #__fini,er0
 	jsr     @_atexit
 #ifdef __SIMULATOR__
         jsr     @0xcc



More information about the Newlib mailing list