2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / config / xtensa / crti.asm
blob8e5cbe23fbd30bd9b5c18b4b9a4bdf6251678ffd
1 # Start .init and .fini sections.
2 # Copyright (C) 2003 Free Software Foundation, Inc.
3 #
4 # This file is free software; you can redistribute it and/or modify it
5 # under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
7 # any later version.
8 #
9 # In addition to the permissions in the GNU General Public License, the
10 # Free Software Foundation gives you unlimited permission to link the
11 # compiled version of this file into combinations with other programs,
12 # and to distribute those combinations without any restriction coming
13 # from the use of this file. (The General Public License restrictions
14 # do apply in other respects; for example, they cover modification of
15 # the file, and distribution when not linked into a combine
16 # executable.)
18 # GCC is distributed in the hope that it will be useful, but WITHOUT ANY
19 # WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 # for more details.
23 # You should have received a copy of the GNU General Public License
24 # along with GCC; see the file COPYING. If not, write to the Free
25 # Software Foundation, 59 Temple Place - Suite 330, Boston, MA
26 # 02111-1307, USA.
28 # This file just makes a stack frame for the contents of the .fini and
29 # .init sections. Users may put any desired instructions in those
30 # sections.
32 #include "xtensa-config.h"
34 .section .init
35 .globl _init
36 .type _init,@function
37 .align 4
38 _init:
39 #if XCHAL_HAVE_WINDOWED && !__XTENSA_CALL0_ABI__
40 entry sp, 64
41 #else
42 addi sp, sp, -32
43 s32i a0, sp, 0
44 #endif
46 .section .fini
47 .globl _fini
48 .type _fini,@function
49 .align 4
50 _fini:
51 #if XCHAL_HAVE_WINDOWED && !__XTENSA_CALL0_ABI__
52 entry sp, 64
53 #else
54 addi sp, sp, -32
55 s32i a0, sp, 0
56 #endif