1 /* Definitions of target machine for GNU compiler. 2 ARM Linux-based GNU systems version. 3 Copyright (C) 1997-2021 Free Software Foundation, Inc. 4 Contributed by Russell King <rmk92@ecs.soton.ac.uk>. 5 6 This file is part of GCC. 7 8 GCC is free software; you can redistribute it and/or modify it 9 under the terms of the GNU General Public License as published 10 by the Free Software Foundation; either version 3, or (at your 11 option) any later version. 12 13 GCC is distributed in the hope that it will be useful, but WITHOUT 14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 15 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 16 License for more details. 17 18 Under Section 7 of GPL version 3, you are granted additional 19 permissions described in the GCC Runtime Library Exception, version 20 3.1, as published by the Free Software Foundation. 21 22 You should have received a copy of the GNU General Public License and 23 a copy of the GCC Runtime Library Exception along with this program; 24 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 25 <http://www.gnu.org/licenses/>. */ 26 27 /* This is how we tell the assembler that a symbol is weak. 28 GAS always supports weak symbols. */ 29 30 /* Unsigned chars produces much better code than signed. */ 31 #define DEFAULT_SIGNED_CHAR 0 32 33 #undef SUBTARGET_CPP_SPEC 34 #define SUBTARGET_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" 35 36 #undef SIZE_TYPE 37 #define SIZE_TYPE "unsigned int" 38 39 #undef PTRDIFF_TYPE 40 #define PTRDIFF_TYPE "int" 41 42 /* Use the AAPCS type for wchar_t, or the previous Linux default for 43 non-AAPCS. */ 44 #undef WCHAR_TYPE 45 #define WCHAR_TYPE (TARGET_AAPCS_BASED ? "unsigned int" : "long int") 46 47 #undef WCHAR_TYPE_SIZE 48 #define WCHAR_TYPE_SIZE BITS_PER_WORD 49 50 /* Clear the instruction cache from `beg' to `end'. This makes an 51 inline system call to SYS_cacheflush. */ 52 #define CLEAR_INSN_CACHE(BEG, END) \ 53 { \ 54 register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \ 55 register unsigned long _end __asm ("a2") = (unsigned long) (END); \ 56 register unsigned long _flg __asm ("a3") = 0; \ 57 __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \ 58 : "=r" (_beg) \ 59 : "0" (_beg), "r" (_end), "r" (_flg)); \ 60 } 61