sp64-elf.h revision 96263
162473Sphk/* Definitions of target machine for GNU compiler, for SPARC64, ELF. 262473Sphk Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000 362473Sphk Free Software Foundation, Inc. 462473Sphk Contributed by Doug Evans, dje@cygnus.com. 562473Sphk 662473SphkThis file is part of GNU CC. 762473Sphk 862473SphkGNU CC is free software; you can redistribute it and/or modify 962473Sphkit under the terms of the GNU General Public License as published by 1062473Sphkthe Free Software Foundation; either version 2, or (at your option) 1162473Sphkany later version. 1262473Sphk 1362473SphkGNU CC is distributed in the hope that it will be useful, 1462473Sphkbut WITHOUT ANY WARRANTY; without even the implied warranty of 1562473SphkMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1662473SphkGNU General Public License for more details. 1762473Sphk 1862473SphkYou should have received a copy of the GNU General Public License 1962473Sphkalong with GNU CC; see the file COPYING. If not, write to 2062473Sphkthe Free Software Foundation, 59 Temple Place - Suite 330, 2162473SphkBoston, MA 02111-1307, USA. */ 2262473Sphk 2362473Sphk/* ??? We're taking the scheme of including another file and then overriding 2462473Sphk the values we don't like a bit too far here. The alternative is to more or 2562473Sphk less duplicate all of svr4.h, sparc/sysv4.h, and sparc/sol2.h here 2662473Sphk (suitably cleaned up). */ 2762473Sphk 2862473Sphk#undef TARGET_VERSION 2962473Sphk#define TARGET_VERSION fprintf (stderr, " (sparc64-elf)") 3062473Sphk 3162473Sphk/* A 64 bit v9 compiler in a Medium/Anywhere code model environment. */ 3262473Sphk 3362473Sphk#undef TARGET_DEFAULT 3462473Sphk#define TARGET_DEFAULT \ 3562473Sphk(MASK_V9 + MASK_PTR64 + MASK_64BIT + MASK_HARD_QUAD \ 3662473Sphk + MASK_APP_REGS + MASK_FPU + MASK_STACK_BIAS + MASK_LONG_DOUBLE_128) 3762473Sphk 3862473Sphk#undef SPARC_DEFAULT_CMODEL 3962473Sphk#define SPARC_DEFAULT_CMODEL CM_EMBMEDANY 4062473Sphk 4162473Sphk#undef CPP_PREDEFINES 4262473Sphk#define CPP_PREDEFINES "-Dsparc -D__ELF__ -Acpu=sparc -Amachine=sparc" 4362473Sphk 4462473Sphk/* __svr4__ is used by the C library (FIXME) */ 4562473Sphk#undef CPP_SUBTARGET_SPEC 4662473Sphk#define CPP_SUBTARGET_SPEC "-D__svr4__" 4762473Sphk 4862473Sphk#undef MD_EXEC_PREFIX 49125011Sru#undef MD_STARTFILE_PREFIX 50125011Sru 5162473Sphk#undef ASM_SPEC 5262473Sphk#define ASM_SPEC "\ 5362473Sphk%{v:-V} -s %{fpic:-K PIC} %{fPIC:-K PIC} \ 5462473Sphk%{mlittle-endian:-EL} \ 5562473Sphk%(asm_cpu) %(asm_arch) \ 5662473Sphk" 5762473Sphk 5862473Sphk/* This is taken from sol2.h. */ 5962473Sphk#undef LINK_SPEC 6062473Sphk#define LINK_SPEC "\ 6163673Sarchie%{v:-V} \ 6262473Sphk%{mlittle-endian:-EL} \ 6362473Sphk" 6462473Sphk 6562473Sphk/* We need something a little simpler for the embedded environment. 6662473Sphk Profiling doesn't really work yet so we just copy the default. */ 6762473Sphk#undef STARTFILE_SPEC 6862473Sphk#define STARTFILE_SPEC "\ 6962473Sphk%{!shared:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}} \ 7062473Sphkcrtbegin.o%s \ 7162473Sphk" 7262473Sphk 7362473Sphk#undef ENDFILE_SPEC 7462473Sphk#define ENDFILE_SPEC \ 7562473Sphk "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \ 7662473Sphk crtend.o%s" 7762473Sphk 7862473Sphk/* Use the default (for now). */ 7962473Sphk#undef LIB_SPEC 8062473Sphk 8162473Sphk/* V9 chips can handle either endianness. */ 8262473Sphk#undef SUBTARGET_SWITCHES 8362473Sphk#define SUBTARGET_SWITCHES \ 8462473Sphk{"big-endian", -MASK_LITTLE_ENDIAN, N_("Generate code for big endian") }, \ 8562473Sphk{"little-endian", MASK_LITTLE_ENDIAN, N_("Generate code for little endian") }, 8662473Sphk 8762473Sphk#undef BYTES_BIG_ENDIAN 8862473Sphk#define BYTES_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN) 8962473Sphk 9062473Sphk#undef WORDS_BIG_ENDIAN 9162473Sphk#define WORDS_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN) 9262473Sphk 9362473Sphk/* ??? This should be 32 bits for v9 but what can we do? */ 9462473Sphk#undef WCHAR_TYPE 9562473Sphk#define WCHAR_TYPE "short unsigned int" 9662473Sphk 9762473Sphk#undef WCHAR_TYPE_SIZE 9862473Sphk#define WCHAR_TYPE_SIZE 16 9962473Sphk 10062473Sphk#undef LONG_DOUBLE_TYPE_SIZE 10162473Sphk#define LONG_DOUBLE_TYPE_SIZE 128 10262473Sphk 10362473Sphk/* The medium/anywhere code model practically requires us to put jump tables 10462473Sphk in the text section as gcc is unable to distinguish LABEL_REF's of jump 105 tables from other label refs (when we need to). */ 106/* But we now defer the tables to the end of the function, so we make 107 this 0 to not confuse the branch shortening code. */ 108#undef JUMP_TABLES_IN_TEXT_SECTION 109#define JUMP_TABLES_IN_TEXT_SECTION 0 110 111/* System V Release 4 uses DWARF debugging info. 112 GDB doesn't support 64 bit stabs yet and the desired debug format is DWARF 113 anyway so it is the default. */ 114 115#define DBX_DEBUGGING_INFO 116 117#undef PREFERRED_DEBUGGING_TYPE 118#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG 119