summaryrefslogtreecommitdiff
path: root/gcc/config/ip2k/crt0.S
diff options
context:
space:
mode:
authorDenis Chertykov <denisc@overta.ru>2002-06-30 19:27:48 +0000
committerDenis Chertykov <denisc@gcc.gnu.org>2002-06-30 23:27:48 +0400
commite3223ea2938e785094c2c8c87cdb8d86fb596c6d (patch)
tree4ca44e58c240c4469feb14624166d0d8306a61ed /gcc/config/ip2k/crt0.S
parent66b8c57f68eb301eddf4ad22c96462ec452662ae (diff)
downloadgcc-e3223ea2938e785094c2c8c87cdb8d86fb596c6d.tar.gz
extend.texi: Add ip2k port to description of attribute naked.
* doc/extend.texi: Add ip2k port to description of attribute naked. * doc/install.texi (Specific): Add ip2k description. * doc/install-old.texi (Configurations): Add ip2k to possible cpu types. * doc/md.texi: Document ip2k constraints. * config/ip2k/crt0.S: New file. * config/ip2k/ip2k-protos.h: New file. * config/ip2k/ip2k.c: New file. * config/ip2k/ip2k.h: New file. * config/ip2k/ip2k.md: New file. * config/ip2k/libgcc.S: New file. * config/ip2k/t-ip2k: New file. Co-Authored-By: Alan Lehotsky <apl@alum.mit.edu> Co-Authored-By: Bernd Schmidt <bernds@redhat.com> Co-Authored-By: Dave Hudson <dave.hudson@ubicom.com> Co-Authored-By: Frank Ch. Eigler <fche@redhat.com> Co-Authored-By: Graham Stott <grahams@redhat.com> Co-Authored-By: Jeff Johnston <jjohnstn@redhat.com> Co-Authored-By: Matthew Green <mrg@redhat.com> Co-Authored-By: Richard Henderson <rth@redhat.com> From-SVN: r55122
Diffstat (limited to 'gcc/config/ip2k/crt0.S')
-rw-r--r--gcc/config/ip2k/crt0.S53
1 files changed, 53 insertions, 0 deletions
diff --git a/gcc/config/ip2k/crt0.S b/gcc/config/ip2k/crt0.S
new file mode 100644
index 00000000000..131ccb6ec6e
--- /dev/null
+++ b/gcc/config/ip2k/crt0.S
@@ -0,0 +1,53 @@
+;
+; Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+; Contributed by Red Hat, Inc.
+;
+; 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.
+;
+; In addition to the permissions in the GNU General Public License, the
+; Free Software Foundation gives you unlimited permission to link the
+; compiled version of this file with other programs, and to distribute
+; those programs without any restriction coming from the use of this
+; file. (The General Public License restrictions do apply in other
+; respects; for example, they cover modification of the file, and
+; distribution when not linked into another program.)
+;
+; 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.
+;
+
+ .file "crt0.S"
+ .text
+ .global __start
+ .func __start
+__start:
+ clr $ff ; Insure we have a zero available
+ mov w,#%hi8data(__stack) ; set up stack
+ mov sph,w ;
+ mov w,#%lo8data(__stack)
+ mov spl,w
+
+ push #0 ; Set argc/argv.
+ push #0 ; Only required for testing
+ push #0 ; purposes and "ansi" main.
+ push #0
+ page _main
+ call _main
+ push $81 ; use return value to call exit()
+ push $80
+ page _exit
+ call _exit
+ break ; Should never return
+ .endfunc