home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Source / GNU / gcc / config / sparc / sp64-elf.h < prev    next >
C/C++ Source or Header  |  1995-06-15  |  5KB  |  154 lines

  1. /* Definitions of target machine for GNU compiler,
  2.    for Sun SPARC-V9 on a hypothetical elf format machine.
  3.    Copyright (C) 1994, 1995 Free Software Foundation, Inc.
  4.    Contributed by Doug Evans, dje@cygnus.com.
  5.  
  6. This file is part of GNU CC.
  7.  
  8. GNU CC is free software; you can redistribute it and/or modify
  9. it under the terms of the GNU General Public License as published by
  10. the Free Software Foundation; either version 2, or (at your option)
  11. any later version.
  12.  
  13. GNU CC is distributed in the hope that it will be useful,
  14. but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. GNU General Public License for more details.
  17.  
  18. You should have received a copy of the GNU General Public License
  19. along with GNU CC; see the file COPYING.  If not, write to
  20. the Free Software Foundation, 59 Temple Place - Suite 330,
  21. Boston, MA 02111-1307, USA.  */
  22.  
  23. /* This is a v9 only compiler.  -mv8 is not expected to work.  If you want
  24.    a v8/v9 compiler, this isn't the place to do it.  */
  25. /* ??? Until real v9 machines exist, all of this is subject to change.  */
  26. /* ??? This file should really be called sp64-sol2.h or some such but that
  27.    would be a bit misleading since no such machines exist yet.  The current
  28.    name is also misleading since the term "elf" is more properly applied to
  29.    embedded configurations.  */
  30.  
  31. #define SPARCV9 /* See sparc.h.  */
  32.  
  33. /* ??? We're taking the scheme of including another file and then overriding
  34.    the values we don't like a bit too far here.  The alternative is to more or
  35.    less duplicate all of svr4.h, sparc/sysv4.h, and sparc/sol2.h here
  36.    (suitably cleaned up).  Until real sparc64 machines exist, it's not clear
  37.    which is better.  */
  38.  
  39. #include "sparc/sol2.h"
  40.  
  41. #undef TARGET_VERSION
  42. #define TARGET_VERSION fprintf (stderr, " (sparc64-elf)")
  43.  
  44. /* A v9 compiler with stack-bias, 32 bit integers and 64 bit pointers,
  45.    in a Medium/Anywhere code model environment.  */
  46.  
  47. #undef TARGET_DEFAULT
  48. #define TARGET_DEFAULT \
  49.   (MASK_V9 + MASK_STACK_BIAS + MASK_MEDANY + MASK_PTR64 + MASK_HARD_QUAD + MASK_EPILOGUE + MASK_FPU)
  50.  
  51. /* __svr4__ is used by the C library */
  52. #undef CPP_PREDEFINES
  53. #define CPP_PREDEFINES "\
  54. -D__sparc__ -D__sparc_v9__ -D__svr4__ \
  55. -Acpu(sparc64) -Amachine(sparc64) \
  56. "
  57.  
  58. #undef CPP_SPEC
  59. #define CPP_SPEC "\
  60. %{mint64:-D__INT_MAX__=9223372036854775807LL -D__LONG_MAX__=9223372036854775807LL} \
  61. %{mlong64:-D__LONG_MAX__=9223372036854775807LL} \
  62. "
  63.  
  64. #undef MD_EXEC_PREFIX
  65. #undef MD_STARTFILE_PREFIX
  66.  
  67. #undef ASM_SPEC
  68. #define ASM_SPEC "\
  69. %{V} %{v:%{!V:-V}} -s %{fpic:-K PIC} %{fPIC:-K PIC} \
  70. "
  71.  
  72. /* This is taken from sol2.h.  */
  73. #undef LINK_SPEC
  74. #define LINK_SPEC "\
  75. %{V} %{v:%{!V:-V}} \
  76. "
  77.  
  78. /* We need something a little simpler for the embedded environment.
  79.    Profiling doesn't really work yet so we just copy the default.  */
  80. #undef STARTFILE_SPEC
  81. #define STARTFILE_SPEC "\
  82. %{!shared:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}} \
  83. crtbegin.o%s \
  84. "
  85.  
  86. #undef ENDFILE_SPEC
  87. #define ENDFILE_SPEC "%{!nostartfiles:crtend.o%s}"
  88.  
  89. /* Use the default (for now).  */
  90. #undef LIB_SPEC
  91.  
  92. /* Unfortunately, svr4.h redefines these so we have to restore them to
  93.    their original values in sparc.h.  */
  94. /* ??? It might be possible to eventually get svr4.h to do the right thing.  */
  95.  
  96. #undef PTRDIFF_TYPE
  97. #define PTRDIFF_TYPE "long long int"
  98.  
  99. #undef SIZE_TYPE
  100. #define SIZE_TYPE "long long unsigned int"
  101.  
  102. /* ??? This should be 32 bits for v9 but what can we do?  */
  103. #undef WCHAR_TYPE
  104. #define WCHAR_TYPE "short unsigned int"
  105.  
  106. #undef WCHAR_TYPE_SIZE
  107. #define WCHAR_TYPE_SIZE 16
  108.  
  109. /* ??? Disabled for v9 as the current implementation of the Medium/Anywhere
  110.    code model needs this in the data segment (still true?).  Let's hope the
  111.    assembler is fixed.  */
  112. #undef JUMP_TABLES_IN_TEXT_SECTION
  113.  
  114. /* System V Release 4 uses DWARF debugging info.
  115.    GDB doesn't support 64 bit stabs yet and the desired debug format is DWARF
  116.    anyway so it is the default.  */
  117.  
  118. #define DWARF_DEBUGGING_INFO
  119. #define DBX_DEBUGGING_INFO
  120.  
  121. #undef PREFERRED_DEBUGGING_TYPE
  122. #define PREFERRED_DEBUGGING_TYPE DWARF_DEBUG
  123.  
  124. /* Define the names of various pseudo-ops used by the Sparc/svr4 assembler.
  125.    ??? If ints are 64 bits then UNALIGNED_INT_ASM_OP (defined elsewhere) is
  126.    misnamed.  These should all refer to explicit sizes (half/word/xword?),
  127.    anything other than short/int/long/etc.  */
  128.  
  129. #define UNALIGNED_LONGLONG_ASM_OP    ".uaxword"
  130.  
  131. /* DWARF stuff.  */
  132.  
  133. #define ASM_OUTPUT_DWARF_ADDR(FILE, LABEL) \
  134. do {                                \
  135.   fprintf ((FILE), "\t%s\t", UNALIGNED_LONGLONG_ASM_OP);    \
  136.   assemble_name ((FILE), (LABEL));                \
  137.   fprintf ((FILE), "\n");                    \
  138. } while (0)
  139.  
  140. #define ASM_OUTPUT_DWARF_ADDR_CONST(FILE, RTX) \
  141. do {                                \
  142.   fprintf ((FILE), "\t%s\t", UNALIGNED_LONGLONG_ASM_OP);    \
  143.   output_addr_const ((FILE), (RTX));                \
  144.   fputc ('\n', (FILE));                        \
  145. } while (0)
  146.  
  147. /* ??? Not sure if this should be 4 or 8 bytes.  4 works for now.  */
  148. #define ASM_OUTPUT_DWARF_REF(FILE, LABEL) \
  149. do {                                \
  150.   fprintf ((FILE), "\t%s\t", UNALIGNED_INT_ASM_OP);        \
  151.   assemble_name ((FILE), (LABEL));                \
  152.   fprintf ((FILE), "\n");                    \
  153. } while (0)
  154.