1 /* Definitions of target machine for GNU compiler. Vxworks Aarch 64bit 2 version. 3 Copyright (C) 2018-2021 Free Software Foundation, Inc. 4 Contributed by Douglas B Rupp 5 6 This file is part of GCC. 7 8 GCC is free software; you can redistribute it and/or modify it under 9 the terms of the GNU General Public License as published by the Free 10 Software Foundation; either version 3, or (at your option) any later 11 version. 12 13 GCC is distributed in the hope that it will be useful, but WITHOUT ANY 14 WARRANTY; without even the implied warranty of MERCHANTABILITY or 15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 16 for more details. 17 18 You should have received a copy of the GNU General Public License 19 along with GCC; see the file COPYING3. If not see 20 <http://www.gnu.org/licenses/>. */ 21 22 #undef SUBTARGET_OVERRIDE_OPTIONS 23 #define SUBTARGET_OVERRIDE_OPTIONS VXWORKS_OVERRIDE_OPTIONS 24 25 #undef LINK_SPEC 26 #define LINK_SPEC VXWORKS_LINK_SPEC 27 28 #undef LIB_SPEC 29 #define LIB_SPEC VXWORKS_LIB_SPEC 30 31 #undef STARTFILE_SPEC 32 #define STARTFILE_SPEC VXWORKS_STARTFILE_SPEC 33 34 #undef ENDFILE_SPEC 35 #define ENDFILE_SPEC VXWORKS_ENDFILE_SPEC 36 37 #undef CPP_SPEC 38 #define CPP_SPEC VXWORKS_ADDITIONAL_CPP_SPEC 39 40 #undef CC1_SPEC 41 #define CC1_SPEC VXWORKS_CC1_SPEC 42 43 #undef FUNCTION_PROFILER 44 #define FUNCTION_PROFILER VXWORKS_FUNCTION_PROFILER 45 46 #undef TARGET_OS_CPP_BUILTINS 47 #define TARGET_OS_CPP_BUILTINS() \ 48 do { \ 49 if (TARGET_BIG_END) \ 50 builtin_define ("ARMEB"); \ 51 else \ 52 builtin_define ("ARMEL"); \ 53 builtin_define ("_VX_CPU=ARMARCH8A"); \ 54 VXWORKS_OS_CPP_BUILTINS (); \ 55 } while (0) 56 57 /* Static stack checking is supported. */ 58 #define STACK_CHECK_STATIC_BUILTIN 1 59 60 #undef STACK_CHECK_PROTECT 61 #define STACK_CHECK_PROTECT 16384 62 63 /* The VxWorks environment on aarch64 is llvm-based. */ 64 #undef VXWORKS_PERSONALITY 65 #define VXWORKS_PERSONALITY "llvm" 66 67 /* VxWorks uses R18 as a TCB pointer. We must pick something else as 68 the static chain and R18 needs to be claimed "fixed". Until we 69 arrange to override the common parts of the port family to 70 acknowledge the latter, configure --with-specs="-ffixed-r18". */ 71 #undef STATIC_CHAIN_REGNUM 72 #define STATIC_CHAIN_REGNUM 9 73 74