1 /* Definitions of target machine for GNU compiler, for SPARC VxSim 2 Copyright 1996 Free Software Foundation, Inc. 3 4 This file is part of GNU CC. 5 6 GNU CC is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2, or (at your option) 9 any later version. 10 11 GNU CC is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with GNU CC; see the file COPYING. If not, write to 18 the Free Software Foundation, 59 Temple Place - Suite 330, 19 Boston, MA 02111-1307, USA. */ 20 21 #undef TARGET_VERSION 22 #define TARGET_VERSION fprintf (stderr, " (sparc VxSim)"); 23 24 /* Supposedly the same as vanilla sparc svr4, except for the stuff below: */ 25 26 #undef CPP_PREDEFINES 27 #define CPP_PREDEFINES \ 28 "-DCPU=SIMSPARCSOLARIS -D__vxworks -D__vxworks__ -Dsparc -D__svr4__ -D__SVR4 \ 29 -Asystem=embedded -Asystem=svr4 -Acpu=sparc -Amachine=sparc\ 30 -D__GCC_NEW_VARARGS__" 31 32 #undef CPP_SPEC 33 #define CPP_SPEC "" 34 35 #undef CC1_SPEC 36 #define CC1_SPEC "-fno-builtin %{sun4:} %{target:}" 37 38 /* The sun bundled assembler doesn't accept -Yd, (and neither does gas). 39 It's safe to pass -s always, even if -g is not used. */ 40 #undef ASM_SPEC 41 #define ASM_SPEC \ 42 "%{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s \ 43 %{fpic:-K PIC} %{fPIC:-K PIC}" 44 45 /* However it appears that Solaris 2.0 uses the same reg numbering as 46 the old BSD-style system did. */ 47 48 #undef DBX_REGISTER_NUMBER 49 /* Same as sparc.h */ 50 #define DBX_REGISTER_NUMBER(REGNO) (REGNO) 51 52 /* We use stabs-in-elf for debugging, because that is what the native 53 toolchain uses. */ 54 #undef PREFERRED_DEBUGGING_TYPE 55 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG 56 57 /* The Solaris 2 assembler uses .skip, not .zero, so put this back. */ 58 #undef ASM_OUTPUT_SKIP 59 #define ASM_OUTPUT_SKIP(FILE,SIZE) \ 60 fprintf (FILE, "\t.skip %u\n", (SIZE)) 61 62 #undef ASM_OUTPUT_ALIGNED_LOCAL 63 #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ 64 do { \ 65 fputs ("\t.local\t", (FILE)); \ 66 assemble_name ((FILE), (NAME)); \ 67 putc ('\n', (FILE)); \ 68 ASM_OUTPUT_ALIGNED_COMMON (FILE, NAME, SIZE, ALIGN); \ 69 } while (0) 70 71 #undef COMMON_ASM_OP 72 #define COMMON_ASM_OP "\t.common\t" 73 74 #undef LOCAL_LABEL_PREFIX 75 #define LOCAL_LABEL_PREFIX "." 76 77 /* This is how to output a definition of an internal numbered label where 78 PREFIX is the class of label and NUM is the number within the class. */ 79 80 #undef ASM_OUTPUT_INTERNAL_LABEL 81 #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ 82 fprintf (FILE, ".L%s%d:\n", PREFIX, NUM) 83 84 /* This is how to output a reference to an internal numbered label where 85 PREFIX is the class of label and NUM is the number within the class. */ 86 87 #undef ASM_OUTPUT_INTERNAL_LABELREF 88 #define ASM_OUTPUT_INTERNAL_LABELREF(FILE,PREFIX,NUM) \ 89 fprintf (FILE, ".L%s%d", PREFIX, NUM) 90 91 /* This is how to store into the string LABEL 92 the symbol_ref name of an internal numbered label where 93 PREFIX is the class of label and NUM is the number within the class. 94 This is suitable for output with `assemble_name'. */ 95 96 #undef ASM_GENERATE_INTERNAL_LABEL 97 #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ 98 sprintf (LABEL, "*.L%s%ld", PREFIX, (long)(NUM)) 99 100 101 102 #undef LIB_SPEC 103 #define LIB_SPEC "" 104 105 #undef STARTFILE_SPEC 106 #define STARTFILE_SPEC "" 107 108 #undef ENDFILE_SPEC 109 #define ENDFILE_SPEC "" 110 111 #undef LINK_SPEC 112 #define LINK_SPEC "-r" 113 114 /* This defines which switch letters take arguments. 115 It is as in svr4.h but with -R added. */ 116 117 #undef SWITCH_TAKES_ARG 118 #define SWITCH_TAKES_ARG(CHAR) \ 119 ( (CHAR) == 'D' \ 120 || (CHAR) == 'U' \ 121 || (CHAR) == 'o' \ 122 || (CHAR) == 'e' \ 123 || (CHAR) == 'u' \ 124 || (CHAR) == 'I' \ 125 || (CHAR) == 'm' \ 126 || (CHAR) == 'L' \ 127 || (CHAR) == 'R' \ 128 || (CHAR) == 'A' \ 129 || (CHAR) == 'h' \ 130 || (CHAR) == 'z') 131 132 /* ??? This does not work in SunOS 4.x, so it is not enabled in sparc.h. 133 Instead, it is enabled here, because it does work under Solaris. */ 134 /* Define for support of TFmode long double. 135 SPARC ABI says that long double is 4 words. */ 136 #define LONG_DOUBLE_TYPE_SIZE 64 137