aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1996-03-04 18:44:17 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1996-03-04 18:44:17 -0500
commitad8445f4da7d66d29890560c441b6ec6ec6222dc (patch)
tree83d39e0cf0acf39391cb14efa4ecf8c95df21a43 /gcc
parent1e6869a54e6d237a870ba343044758fb98a11c33 (diff)
downloadgcc-ad8445f4da7d66d29890560c441b6ec6ec6222dc.zip
gcc-ad8445f4da7d66d29890560c441b6ec6ec6222dc.tar.gz
gcc-ad8445f4da7d66d29890560c441b6ec6ec6222dc.tar.bz2
Initial revision
From-SVN: r11429
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/m68k/mot3300-crt0.S109
-rw-r--r--gcc/config/m68k/mot3300Mcrt0.S155
-rw-r--r--gcc/config/m68k/t-mot330010
-rw-r--r--gcc/config/m68k/t-mot3300-gald13
-rw-r--r--gcc/config/m68k/t-mot3300-gas13
-rw-r--r--gcc/config/m68k/t-mot3300-gld12
-rw-r--r--gcc/config/m68k/x-mot3300-gas12
7 files changed, 324 insertions, 0 deletions
diff --git a/gcc/config/m68k/mot3300-crt0.S b/gcc/config/m68k/mot3300-crt0.S
new file mode 100644
index 0000000..c86e56b
--- /dev/null
+++ b/gcc/config/m68k/mot3300-crt0.S
@@ -0,0 +1,109 @@
+/* The start module crt0.s for the SysV68 Motorola 3300 Delta Series.
+ Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by Manfred Hollstein (manfred@lts.sel.alcatel.de).
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#ifdef MOTOROLA
+# define COMM comm
+# define DATA data
+# define EVEN even
+# define FILE(n) file n
+# define GLOBAL_SYM(s) global s
+# define LOCAL_LABEL(l) L%##l
+# define SECTION(n) section n
+# define TEXT text
+#else /* Assume we are using GNU as. */
+# define COMM .comm
+# define DATA .data
+# define EVEN .even
+# define FILE(name) .file name
+# define GLOBAL_SYM(s) .globl s
+# define LOCAL_LABEL(l) .L.##l
+# define SECTION(n) .section n
+# define STRING(s) .asciz s
+# define TEXT .text
+#endif
+
+ FILE ("crt0.s")
+ TEXT
+ GLOBAL_SYM (_start)
+_start: mov.l %d0,splimit%
+ subq.w &8,%sp
+ mov.l 8(%sp),(%sp)
+ lea 12(%sp),%a0
+ mov.l %a0,4(%sp)
+ mov.l %a0,%a1
+LOCAL_LABEL(0):
+ tst.l (%a0)+
+ bne.b LOCAL_LABEL(0)
+#ifdef SGS_CMP_ORDER
+ cmpa.l %a0,(%a1)
+#else
+ cmpa.l (%a1),%a0
+#endif
+ blt.b LOCAL_LABEL(1)
+ subq.w &4,%a0
+LOCAL_LABEL(1):
+ mov.l %a0,8(%sp)
+ mov.l %a0,environ
+ jsr initfpu
+
+ subq.w &8,%sp
+ clr.l %d0 /* if (! isatty (fileno (stderr))) */
+ mov.b _iob+27,%d0
+ mov.l %d0,-(%sp)
+ jsr isatty
+ addq.w &4,%sp
+ tst.l %d0
+ bne.b LOCAL_LABEL(isatty)
+ clr.l -(%sp) /* setbuf (stderr, NULL) */
+ pea _iob+28
+ jsr setbuf
+ addq.w &8,%sp
+LOCAL_LABEL(isatty):
+ addq.w &8,%sp
+
+ jsr main
+ mov.l %d0,(%sp)
+ jsr exit
+ moveq.l &1,%d0
+ trap &0
+ nop
+
+ EVEN
+
+ COMM splimit%,4
+ COMM environ,4
+
+ COMM mcount,4
+ COMM mcount%,4
+ COMM monitor,4
+
+#ifdef STRING
+ SECTION (.comment)
+ STRING ("$Id: crt0.S,v 1.6 1995/12/07 17:17:47 manfred Exp $\n")
+ STRING ("Contributed by manfred@lts.sel.alcatel.de (Manfred Hollstein, Germany)\n")
+#else
+ byte 'C,'o,'n,'t,'r,'i,'b,'u,'t,'e,'d,' ,'b,'y
+ byte ' ,'m,'a,'n,'f,'r,'e,'d,'@,'l,'t,'s,'.,'s
+ byte 'e,'l,'.,'a,'l,'c,'a,'t,'e,'l,'.,'d,'e,'
+ byte '(,'M,'a,'n,'f,'r,'e,'d,' ,'H,'o,'l,'l,'s
+ byte 't,'e,'i,'n,',,' ,'G,'e,'r,'m,'a,'n,'y,')
+ byte 10,0
+#endif
diff --git a/gcc/config/m68k/mot3300Mcrt0.S b/gcc/config/m68k/mot3300Mcrt0.S
new file mode 100644
index 0000000..52561e6
--- /dev/null
+++ b/gcc/config/m68k/mot3300Mcrt0.S
@@ -0,0 +1,155 @@
+/* The start module mcrt0.s for the SysV68 Motorola 3300 Delta Series.
+ Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by Manfred Hollstein (manfred@lts.sel.alcatel.de).
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#ifdef MOTOROLA
+# define COMM comm
+# define DATA data
+# define EVEN even
+# define FILE(n) file n
+# define GLOBAL_SYM(s) global s
+# define LOCAL_LABEL(l) L%##l
+# define SECTION(n) section n
+# define TEXT text
+#else /* Assume we are using GNU as. */
+# define COMM .comm
+# define DATA .data
+# define EVEN .even
+# define FILE(name) .file name
+# define GLOBAL_SYM(s) .globl s
+# define LOCAL_LABEL(l) .L.##l
+# define SECTION(n) .section n
+# define STRING(s) .asciz s
+# define TEXT .text
+#endif
+
+ FILE ("mcrt0.s")
+ TEXT
+ GLOBAL_SYM (_start)
+_start: mov.l %d0,splimit%
+ subq.w &8,%sp
+ mov.l 8(%sp),(%sp)
+ lea 12(%sp),%a0
+ mov.l %a0,___Argv
+ mov.l %a0,4(%sp)
+ mov.l %a0,%a1
+LOCAL_LABEL(0):
+ tst.l (%a0)+
+ bne.b LOCAL_LABEL(0)
+#ifdef SGS_CMP_ORDER
+ cmpa.l %a0,(%a1)
+#else
+ cmpa.l (%a1),%a0
+#endif
+ blt.b LOCAL_LABEL(1)
+ subq.w &4,%a0
+LOCAL_LABEL(1):
+ mov.l %a0,8(%sp)
+ mov.l %a0,environ
+ jsr initfpu
+
+ sub &8,%sp
+ clr.l %d0 /* if (! isatty (fileno (stderr))) */
+ mov.b _iob+27,%d0
+ mov.l %d0,-(%sp)
+ jsr isatty
+ addq.w &4,%sp
+ tst.l %d0
+ bne.b LOCAL_LABEL(isatty)
+ clr.l -(%sp) /* setbuf (stderr, NULL) */
+ pea _iob+28
+ jsr setbuf
+ addq.w &8,%sp
+LOCAL_LABEL(isatty):
+ addq.w &8,%sp
+
+ mov.l &600,-(%sp)
+ mov.l &etext,%d1
+ subi.l &LOCAL_LABEL(endofstart),%d1
+ addq.l &1,%d1
+ bclr &0,%d1
+ addi.l &4812,%d1
+ asr.l &1,%d1
+ mov.l %d1,-(%sp)
+ add.l %d1,%d1
+ mov.l %d1,-(%sp)
+ jsr sbrk
+ addq.w &4,%sp
+#ifdef SGS_CMP_ORDER
+ cmpa.l %a0,&-1
+#else
+ cmpa.l &-1,%a0
+#endif
+ beq.b LOCAL_LABEL(3)
+ mov.l %a0,-(%sp)
+ add.l &12,%a0
+ mov.l %a0,_countbase
+ mov.l &etext,-(%sp)
+ mov.l &LOCAL_LABEL(endofstart),-(%sp)
+ jsr monitor
+ lea 20(%sp),%sp
+ jsr main
+ mov.l %d0,(%sp)
+ jsr exit
+_exit: moveq &1,%d0
+ trap &0
+
+ GLOBAL_SYM (mcount)
+
+ EVEN
+mcount: bra mcount%
+
+LOCAL_LABEL(errtxt):
+#ifdef STRING
+ STRING ("No space for monitor buffer\n")
+#else
+ byte 'N,'o,' ,'s,'p,'a,'c,'e,' ,'f,'o,'r,' ,'m,'o,'n
+ byte 'i,'t,'o,'r,' ,'b,'u,'f,'f,'e,'r,'\n,0
+#endif
+
+ EVEN
+LOCAL_LABEL(3):
+ mov.l &28,-(%sp)
+ mov.l &LOCAL_LABEL(errtxt),-(%sp)
+ moveq &2,%d0
+ mov.l %d0,-(%sp)
+ jsr write
+ bra.b _exit
+LOCAL_LABEL(endofstart):
+ nop
+
+ EVEN
+
+ COMM splimit%,4
+ COMM environ,4
+ COMM _countbase,4
+
+#ifdef STRING
+ SECTION (.comment)
+ STRING ("$Id: mcrt0.S,v 1.5 1995/12/07 17:23:39 manfred Exp $\n")
+ STRING ("Contributed by manfred@lts.sel.alcatel.de (Manfred Hollstein, Germany)\n")
+#else
+ byte 'C,'o,'n,'t,'r,'i,'b,'u,'t,'e,'d,' ,'b,'y
+ byte ' ,'m,'a,'n,'f,'r,'e,'d,'@,'l,'t,'s,'.,'s
+ byte 'e,'l,'.,'a,'l,'c,'a,'t,'e,'l,'.,'d,'e,'
+ byte '(,'M,'a,'n,'f,'r,'e,'d,' ,'H,'o,'l,'l,'s
+ byte 't,'e,'i,'n,',,' ,'G,'e,'r,'m,'a,'n,'y,')
+ byte 10,0
+#endif
diff --git a/gcc/config/m68k/t-mot3300 b/gcc/config/m68k/t-mot3300
new file mode 100644
index 0000000..2fc1185
--- /dev/null
+++ b/gcc/config/m68k/t-mot3300
@@ -0,0 +1,10 @@
+MULTILIB_OPTIONS=m68000/m68020 msoft-float
+MULTILIB_DIRNAMES=
+MULTILIB_MATCHES=m68000=mc68000 m68000=m68302 m68000=m68332 m68020=mc68020 m68020=m68040
+
+LIBGCC = stmp-multilib
+INSTALL_LIBGCC = install-multilib
+
+CRT0_S = $(srcdir)/config/m68k/mot3300-crt0.S
+MCRT0_S = $(srcdir)/config/m68k/mot3300Mcrt0.S
+CRT0STUFF_T_CFLAGS = -DMOTOROLA -DSGS_CMP_ORDER
diff --git a/gcc/config/m68k/t-mot3300-gald b/gcc/config/m68k/t-mot3300-gald
new file mode 100644
index 0000000..435afc4
--- /dev/null
+++ b/gcc/config/m68k/t-mot3300-gald
@@ -0,0 +1,13 @@
+T_CPPFLAGS = -DUSE_GAS -DUSE_GLD
+TARGET_LIBGCC2_CFLAGS = -DUSE_GAS
+
+MULTILIB_OPTIONS=m68000/m68020 msoft-float
+MULTILIB_DIRNAMES=
+MULTILIB_MATCHES=m68000=mc68000 m68000=m68302 m68000=m68332 m68020=mc68020 m68020=m68040
+
+LIBGCC = stmp-multilib
+INSTALL_LIBGCC = install-multilib
+
+CRT0_S = $(srcdir)/config/m68k/mot3300-crt0.S
+MCRT0_S = $(srcdir)/config/m68k/mot3300Mcrt0.S
+CRT0STUFF_T_CFLAGS =
diff --git a/gcc/config/m68k/t-mot3300-gas b/gcc/config/m68k/t-mot3300-gas
new file mode 100644
index 0000000..5256674
--- /dev/null
+++ b/gcc/config/m68k/t-mot3300-gas
@@ -0,0 +1,13 @@
+T_CPPFLAGS = -DUSE_GAS
+TARGET_LIBGCC2_CFLAGS = -DUSE_GAS
+
+MULTILIB_OPTIONS=m68000/m68020 msoft-float
+MULTILIB_DIRNAMES=
+MULTILIB_MATCHES=m68000=mc68000 m68000=m68302 m68000=m68332 m68020=mc68020 m68020=m68040
+
+LIBGCC = stmp-multilib
+INSTALL_LIBGCC = install-multilib
+
+CRT0_S = $(srcdir)/config/m68k/mot3300-crt0.S
+MCRT0_S = $(srcdir)/config/m68k/mot3300Mcrt0.S
+CRT0STUFF_T_CFLAGS =
diff --git a/gcc/config/m68k/t-mot3300-gld b/gcc/config/m68k/t-mot3300-gld
new file mode 100644
index 0000000..8cc3ed6
--- /dev/null
+++ b/gcc/config/m68k/t-mot3300-gld
@@ -0,0 +1,12 @@
+T_CPPFLAGS = -DUSE_GLD
+
+MULTILIB_OPTIONS=m68000/m68020 msoft-float
+MULTILIB_DIRNAMES=
+MULTILIB_MATCHES=m68000=mc68000 m68000=m68302 m68000=m68332 m68020=mc68020 m68020=m68040
+
+LIBGCC = stmp-multilib
+INSTALL_LIBGCC = install-multilib
+
+CRT0_S = $(srcdir)/config/m68k/mot3300-crt0.S
+MCRT0_S = $(srcdir)/config/m68k/mot3300Mcrt0.S
+CRT0STUFF_T_CFLAGS = -DMOTOROLA -DSGS_CMP_ORDER
diff --git a/gcc/config/m68k/x-mot3300-gas b/gcc/config/m68k/x-mot3300-gas
new file mode 100644
index 0000000..cf27977
--- /dev/null
+++ b/gcc/config/m68k/x-mot3300-gas
@@ -0,0 +1,12 @@
+ALLOCA=alloca.o
+
+# This disables the long/short jump optimization.
+# I use sysV68 R3V7.1 RM04 (phdm@info.ucl.ac.be)
+# Since ss-950318, with jump optimization enabled, "as" issues a warning
+# when assembling combine.s :
+# aline nnnnn : Warning: Table overflow: some optimizations lost (SDIs)
+# but later "ld" complains with
+# ld: relocation entry found for non-relocatable symbol in combine.o
+# and the produced "cc1" fails with SIGSEGV
+# Another possible fix would be to split combine.c.
+XCFLAGS=`if [ x$@ = xcombine.o -a "${CC}" = "${OLDCC}" ]; then echo -Wa,-j; fi`