aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2004-07-30 09:03:39 +0000
committerAlexandre Oliva <aoliva@redhat.com>2004-07-30 09:03:39 +0000
commit82045f122180d847f4686f328546e8bd860b620e (patch)
tree7bcf1fc2cf49a235b22cdfce4df7f2628368d61a /newlib/libc
parent8b7083824a61c068a8f9d5e06de67ea5dcf97311 (diff)
downloadnewlib-82045f122180d847f4686f328546e8bd860b620e.zip
newlib-82045f122180d847f4686f328546e8bd860b620e.tar.gz
newlib-82045f122180d847f4686f328546e8bd860b620e.tar.bz2
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.
Diffstat (limited to 'newlib/libc')
-rw-r--r--newlib/libc/include/machine/ieeefp.h2
-rw-r--r--newlib/libc/machine/sh/asm.h2
-rw-r--r--newlib/libc/sys/sh/crt0.S12
3 files changed, 10 insertions, 6 deletions
diff --git a/newlib/libc/include/machine/ieeefp.h b/newlib/libc/include/machine/ieeefp.h
index f09a481..fd54e50 100644
--- a/newlib/libc/include/machine/ieeefp.h
+++ b/newlib/libc/include/machine/ieeefp.h
@@ -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
diff --git a/newlib/libc/machine/sh/asm.h b/newlib/libc/machine/sh/asm.h
index 99a1866..db30b14 100644
--- a/newlib/libc/machine/sh/asm.h
+++ b/newlib/libc/machine/sh/asm.h
@@ -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
diff --git a/newlib/libc/sys/sh/crt0.S b/newlib/libc/sys/sh/crt0.S
index e9f8dde..f9473ae 100644
--- a/newlib/libc/sys/sh/crt0.S
+++ b/newlib/libc/sys/sh/crt0.S
@@ -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: