This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

SH2a port


This patch adds a few tweaks needed by the SH 2a port.  Ok to install?

Index: newlib/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	Introduce SH2a support.
	2004-03-16  Corinna Vinschen  <vinschen@redhat.com>
	* libc/include/machine/ieeefp.h: Define _DOUBLE_IS_32BITS for
	__SH2A_SINGLE_ONLY__, too.
	* libc/machine/sh/asm.h: Define DELAYED_BRANCHES for __SH2A__, too.
	2004-02-24  Corinna Vinschen  <vinschen@redhat.com>
	* libc/sys/sh/crt0.S (start_l): Support sh2a-nofpu.  Fix comments.
	2004-02-10  DJ Delorie  <dj@redhat.com>
	* libc/sys/sh/crt0.S (start_l): Support sh2a.

Index: newlib/libc/include/machine/ieeefp.h
===================================================================
RCS file: /cvs/uberbaum/./newlib/libc/include/machine/ieeefp.h,v
retrieving revision 1.22
diff -u -p -r1.22 ieeefp.h
--- newlib/libc/include/machine/ieeefp.h 22 Jun 2004 21:54:51 -0000 1.22
+++ newlib/libc/include/machine/ieeefp.h 29 Jul 2004 03:49:16 -0000
@@ -104,7 +104,7 @@
 #else
 #define __IEEE_BIG_ENDIAN
 #endif
-#if defined(__SH2E__) || defined(__SH3E__) || defined(__SH4_SINGLE_ONLY__)
+#if defined(__SH2E__) || defined(__SH3E__) || defined(__SH4_SINGLE_ONLY__) || defined(__SH2A_SINGLE_ONLY__)
 #define _DOUBLE_IS_32BITS
 #endif
 #endif
Index: newlib/libc/machine/sh/asm.h
===================================================================
RCS file: /cvs/uberbaum/./newlib/libc/machine/sh/asm.h,v
retrieving revision 1.5
diff -u -p -r1.5 asm.h
--- newlib/libc/machine/sh/asm.h 24 Jan 2003 15:46:04 -0000 1.5
+++ newlib/libc/machine/sh/asm.h 29 Jul 2004 03:49:16 -0000
@@ -24,7 +24,7 @@
 
 #if (defined (__sh2__) || defined (__SH2E__) || defined (__sh3__) || defined (__SH3E__) \
      || defined (__SH4_SINGLE__) || defined (__SH4__)) \
-     || defined (__SH4_SINGLE_ONLY__) || defined (__SH5__)
+     || defined (__SH4_SINGLE_ONLY__) || defined (__SH5__) || defined (__SH2A__)
 #define DELAYED_BRANCHES
 #define SL(branch, dest, in_slot, in_slot_arg2) \
 	branch##.s dest; in_slot, in_slot_arg2
Index: newlib/libc/sys/sh/crt0.S
===================================================================
RCS file: /cvs/uberbaum/./newlib/libc/sys/sh/crt0.S,v
retrieving revision 1.4
diff -u -p -r1.4 crt0.S
--- newlib/libc/sys/sh/crt0.S 26 Jun 2002 15:42:34 -0000 1.4
+++ newlib/libc/sys/sh/crt0.S 29 Jul 2004 03:49:17 -0000
@@ -79,12 +79,14 @@ start_l:
 	cmp/ge	r0,r1
 	bt	start_l
 
-#if defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY)
+#ifndef __SH2A_NOFPU__
+#if defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY) || defined(__SH2A__)
 	mov.l set_fpscr_k, r1
 	jsr @r1
 	mov #0,r4
 	lds r3,fpscr
-#endif /*  defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__) */
+#endif /*  defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__) || defined(__SH2A__) */
+#endif /* !__SH2A_NOFPU__ */
 
 	! call the mainline	
 	mov.l	main_k,r0
@@ -98,10 +100,12 @@ start_l:
 	or	r0,r0
 
 	.align 2
-#if defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
+#ifndef __SH2A_NOFPU__
+#if defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__) || defined(__SH2A__)
 set_fpscr_k:
 	.long	___set_fpscr
-#endif /*  defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(SH4_SINGLE_ONLY) */
+#endif /*  defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(SH4_SINGLE_ONLY) || defined(__SH2A__) */
+#endif /* !__SH2A_NOFPU__ */
 stack_k:
 	.long	_stack	
 edata_k:
-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]