190075Sobrien/* Definitions of target machine for GNU compiler.
290075Sobrien   ARM Linux-based GNU systems version.
3169689Skan   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2004
4169689Skan   Free Software Foundation, Inc.
590075Sobrien   Contributed by Russell King  <rmk92@ecs.soton.ac.uk>.
690075Sobrien
7132718Skan   This file is part of GCC.
890075Sobrien
9132718Skan   GCC is free software; you can redistribute it and/or modify it
10132718Skan   under the terms of the GNU General Public License as published
11132718Skan   by the Free Software Foundation; either version 2, or (at your
12132718Skan   option) any later version.
1390075Sobrien
14132718Skan   GCC is distributed in the hope that it will be useful, but WITHOUT
15132718Skan   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16132718Skan   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
17132718Skan   License for more details.
1890075Sobrien
19132718Skan   You should have received a copy of the GNU General Public License
20132718Skan   along with this program; see the file COPYING.  If not, write to
21169689Skan   the Free Software Foundation, 51 Franklin Street, Fifth Floor,
22169689Skan   Boston, MA 02110-1301, USA.  */
2390075Sobrien
2490075Sobrien/* This is how we tell the assembler that a symbol is weak.
2590075Sobrien   GAS always supports weak symbols.  */
2690075Sobrien
2790075Sobrien/* Unsigned chars produces much better code than signed.  */
2890075Sobrien#define DEFAULT_SIGNED_CHAR 0
2990075Sobrien
3090075Sobrien#undef  SUBTARGET_CPP_SPEC
31169689Skan#define SUBTARGET_CPP_SPEC  "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
3290075Sobrien
3390075Sobrien#undef  SIZE_TYPE
3490075Sobrien#define SIZE_TYPE "unsigned int"
3590075Sobrien
3690075Sobrien#undef  PTRDIFF_TYPE
3790075Sobrien#define PTRDIFF_TYPE "int"
3890075Sobrien
3990075Sobrien#undef  WCHAR_TYPE
4090075Sobrien#define WCHAR_TYPE "long int"
4190075Sobrien
4290075Sobrien#undef  WCHAR_TYPE_SIZE
4390075Sobrien#define WCHAR_TYPE_SIZE BITS_PER_WORD
4490075Sobrien
4590075Sobrien/* Clear the instruction cache from `beg' to `end'.  This makes an
4690075Sobrien   inline system call to SYS_cacheflush.  */
4790075Sobrien#define CLEAR_INSN_CACHE(BEG, END)					\
4890075Sobrien{									\
4990075Sobrien  register unsigned long _beg __asm ("a1") = (unsigned long) (BEG);	\
5090075Sobrien  register unsigned long _end __asm ("a2") = (unsigned long) (END);	\
5190075Sobrien  register unsigned long _flg __asm ("a3") = 0;				\
5290075Sobrien  __asm __volatile ("swi 0x9f0002		@ sys_cacheflush"	\
5390075Sobrien		    : "=r" (_beg)					\
5490075Sobrien		    : "0" (_beg), "r" (_end), "r" (_flg));		\
5590075Sobrien}
56