home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Source / GNU / gcc / config / rs6000 / eabi.h < prev    next >
C/C++ Source or Header  |  1995-09-22  |  4KB  |  126 lines

  1. /* Core target definitions for GNU compiler
  2.    for IBM RS/6000 PowerPC targeted to embedded ELF systems.
  3.    Copyright (C) 1995 Free Software Foundation, Inc.
  4.    Contributed by Cygnus Support.
  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. #include "rs6000/sysv4.h"
  24.  
  25. /* For now, make stabs the default debugging type, not dwarf. */
  26. #undef    PREFERRED_DEBUGGING_TYPE
  27. #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
  28.  
  29. /* Make int foo : 8 not cause structures to be aligned to an int boundary */
  30.  
  31. #undef    PCC_BITFIELD_TYPE_MATTERS
  32. #define    PCC_BITFIELD_TYPE_MATTERS (TARGET_BITFIELD_TYPE)
  33.  
  34. /* Define this macro to be the value 1 if instructions will fail to
  35.    work if given data not on the nominal alignment.  If instructions
  36.    will merely go slower in that case, define this macro as 0.
  37.  
  38.    Note, little endian systems trap on unaligned addresses, so never
  39.    turn off strict alignment in that case. */
  40. #undef    STRICT_ALIGNMENT
  41. #define    STRICT_ALIGNMENT (TARGET_STRICT_ALIGN || TARGET_LITTLE_ENDIAN)
  42.  
  43. /* Align stack to 8 byte boundaries, rather than 16 bytes Sys V.4 uses */
  44. #undef    STACK_BOUNDARY
  45. #define    STACK_BOUNDARY    64
  46.  
  47. /* No data type wants to be aligned rounder than this.  */
  48. #undef    BIGGEST_ALIGNMENT
  49. #define BIGGEST_ALIGNMENT 64
  50.  
  51. /* Put PC relative got entries in .got2 */
  52. #undef    MINIMAL_TOC_SECTION_ASM_OP
  53. #define MINIMAL_TOC_SECTION_ASM_OP \
  54.   ((TARGET_RELOCATABLE) ? "\t.section\t\".got2\",\"aw\"" : "\t.section\t\".got1\",\"aw\"")
  55.  
  56. /* Put relocatable data in .data, not .rodata so initialized pointers can be updated */
  57. #undef    CONST_SECTION_ASM_OP
  58. #define CONST_SECTION_ASM_OP \
  59.   ((TARGET_RELOCATABLE) ? "\t.section\t\".data\"\t# .rodata" : "\t.section\t\".rodata\"")
  60.  
  61. /* Invoke an initializer function to set up the GOT */
  62. #define NAME__MAIN "__eabi"
  63. #define INVOKE__main 1
  64.  
  65. #undef TARGET_VERSION
  66. #define TARGET_VERSION fprintf (stderr, " (PowerPC Embedded)");
  67.  
  68. #undef CPP_PREDEFINES
  69. #define CPP_PREDEFINES \
  70.   "-DPPC -D__embedded__ -Asystem(embedded) -Acpu(powerpc) -Amachine(powerpc)"
  71.  
  72. /* Don't use startfiles or libraries except for libgcc.a */
  73. #undef  STARTFILE_SPEC
  74. #define    STARTFILE_SPEC ""
  75.  
  76. #undef    LIB_SPEC
  77. #define    LIB_SPEC ""
  78.  
  79. #undef    LIBGCC_SPEC
  80. #define    LIBGCC_SPEC "libgcc.a%s"
  81.  
  82. #undef    ENDFILE_SPEC
  83. #define    ENDFILE_SPEC ""
  84.  
  85. /* This is how to output an assembler line defining an `int' constant.
  86.    For -mrelocatable, we mark all addresses that need to be fixed up
  87.    in the .fixup section.  */
  88. #undef    ASM_OUTPUT_INT
  89. #define ASM_OUTPUT_INT(FILE,VALUE)                    \
  90. do {                                    \
  91.   static int recurse = 0;                        \
  92.   if (TARGET_RELOCATABLE                        \
  93.       && in_section != in_toc                        \
  94.       && in_section != in_text                        \
  95.       && in_section != in_ctors                        \
  96.       && in_section != in_dtors                        \
  97.       && !recurse                            \
  98.       && GET_CODE (VALUE) != CONST_INT                    \
  99.       && GET_CODE (VALUE) != CONST_DOUBLE                \
  100.       && CONSTANT_P (VALUE))                        \
  101.     {                                    \
  102.       static int labelno = 0;                        \
  103.       char buf[256], *p;                        \
  104.                                     \
  105.       recurse = 1;                            \
  106.       ASM_GENERATE_INTERNAL_LABEL (buf, "LCP", labelno++);        \
  107.       STRIP_NAME_ENCODING (p, buf);                    \
  108.       fprintf (FILE, "%s:\n", p);                    \
  109.       fprintf (FILE, "\t.long (");                    \
  110.       output_addr_const (FILE, (VALUE));                \
  111.       fprintf (FILE, ")@fixup\n");                    \
  112.       fprintf (FILE, "\t.section\t\".fixup\",\"aw\"\n");        \
  113.       ASM_OUTPUT_ALIGN (FILE, 2);                    \
  114.       fprintf (FILE, "\t.long\t%s\n", p);                \
  115.       fprintf (FILE, "\t.previous\n");                    \
  116.       recurse = 0;                            \
  117.     }                                    \
  118.   else                                    \
  119.     {                                    \
  120.       fprintf (FILE, "\t.long ");                    \
  121.       output_addr_const (FILE, (VALUE));                \
  122.       fprintf (FILE, "\n");                        \
  123.     }                                    \
  124. } while (0)
  125.  
  126.