OSDN Git Service

More MIPS vector cleanup work.
[pf3gnuchains/gcc-fork.git] / gcc / config / arm / linux-gas.h
1 /* Definitions of target machine for GNU compiler.
2    ARM Linux-based GNU systems version.
3    Copyright (C) 1997, 1998, 1999, 2000, 2001, 2004
4    Free Software Foundation, Inc.
5    Contributed by Russell King  <rmk92@ecs.soton.ac.uk>.
6
7    This file is part of GCC.
8
9    GCC is free software; you can redistribute it and/or modify it
10    under the terms of the GNU General Public License as published
11    by the Free Software Foundation; either version 2, or (at your
12    option) any later version.
13
14    GCC is distributed in the hope that it will be useful, but WITHOUT
15    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
17    License for more details.
18
19    You should have received a copy of the GNU General Public License
20    along with this program; see the file COPYING.  If not, write to
21    the Free Software Foundation, 59 Temple Place - Suite 330,
22    Boston, MA 02111-1307, USA.  */
23
24 /* This is how we tell the assembler that a symbol is weak.
25    GAS always supports weak symbols.  */
26
27 /* Unsigned chars produces much better code than signed.  */
28 #define DEFAULT_SIGNED_CHAR 0
29
30 #undef  SUBTARGET_CPP_SPEC
31 #define SUBTARGET_CPP_SPEC  "%{posix:-D_POSIX_SOURCE} %{fPIC|fPIE:-D__PIC__ -D__pic__} %{fpic|fpie:-D__PIC__ -D__pic__}"
32
33 #undef  SIZE_TYPE
34 #define SIZE_TYPE "unsigned int"
35
36 #undef  PTRDIFF_TYPE
37 #define PTRDIFF_TYPE "int"
38
39 #undef  WCHAR_TYPE
40 #define WCHAR_TYPE "long int"
41
42 #undef  WCHAR_TYPE_SIZE
43 #define WCHAR_TYPE_SIZE BITS_PER_WORD
44
45 /* Emit code to set up a trampoline and synchronize the caches.  */
46 #undef  INITIALIZE_TRAMPOLINE
47 #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT)                       \
48 {                                                                       \
49   emit_move_insn (gen_rtx_MEM (SImode, plus_constant ((TRAMP), 8)),     \
50                   (CXT));                                               \
51   emit_move_insn (gen_rtx_MEM (SImode, plus_constant ((TRAMP), 12)),    \
52                   (FNADDR));                                            \
53   emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"),       \
54                      0, VOIDmode, 2, TRAMP, Pmode,                      \
55                      plus_constant (TRAMP, TRAMPOLINE_SIZE), Pmode);    \
56 }
57
58 /* Clear the instruction cache from `beg' to `end'.  This makes an
59    inline system call to SYS_cacheflush.  */
60 #define CLEAR_INSN_CACHE(BEG, END)                                      \
61 {                                                                       \
62   register unsigned long _beg __asm ("a1") = (unsigned long) (BEG);     \
63   register unsigned long _end __asm ("a2") = (unsigned long) (END);     \
64   register unsigned long _flg __asm ("a3") = 0;                         \
65   __asm __volatile ("swi 0x9f0002               @ sys_cacheflush"       \
66                     : "=r" (_beg)                                       \
67                     : "0" (_beg), "r" (_end), "r" (_flg));              \
68 }