home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Source / GNU / gcc / config / rs6000 / powerpc.h < prev    next >
C/C++ Source or Header  |  1995-07-21  |  3KB  |  98 lines

  1. /* Definitions of target machine for GNU compiler,
  2.    for IBM RS/6000 PowerPC running AIX version 3.2.
  3.    Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
  4.    Contributed by David Edelsohn (edelsohn@npac.syr.edu).
  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.  
  24. #include "rs6000/rs6000.h"
  25.  
  26. #undef ASM_SPEC
  27. #define ASM_SPEC "-u \
  28. %{!mcpu*: \
  29.   %{mpower2: -mpwrx} \
  30.   %{mpowerpc*: %{!mpower: -mppc}} \
  31.   %{mno-powerpc: %{!mpower: %{!mpower2: -mcom}}} \
  32.   %{mno-powerpc: %{mpower: %{!mpower2: -mpwr}}} \
  33.   %{!mno-powerpc: %{mpower: -m601}} \
  34.   %{!mno-powerpc: %{!mpower: -mppc}}} \
  35. %{mcpu=common: -mcom} \
  36. %{mcpu=power: -mpwr} \
  37. %{mcpu=powerpc: -mppc} \
  38. %{mcpu=rios: -mpwr} \
  39. %{mcpu=rios1: -mpwr} \
  40. %{mcpu=rios2: -mpwrx} \
  41. %{mcpu=rsc: -mpwr} \
  42. %{mcpu=rsc1: -mpwr} \
  43. %{mcpu=403: -mppc} \
  44. %{mcpu=601: -m601} \
  45. %{mcpu=603: -mppc} \
  46. %{mcpu=604: -mppc}"
  47.  
  48. #undef CPP_PREDEFINES
  49. #define CPP_PREDEFINES "-D_IBMR2 -D_POWER -D_AIX -D_AIX32 \
  50. -Asystem(unix) -Asystem(aix) -Acpu(powerpc) -Amachine(powerpc)"
  51.  
  52. #undef CPP_SPEC
  53. #define CPP_SPEC "\
  54. %{posix: -D_POSIX_SOURCE} \
  55. %{!mcpu*: \
  56.   %{mpower: %{!mpower2: -D_ARCH_PWR}} \
  57.   %{mpower2: -D_ARCH_PWR2} \
  58.   %{mpowerpc*: -D_ARCH_PPC} \
  59.   %{mno-powerpc: %{!mpower: %{!mpower2: -D_ARCH_COM}}} \
  60.   %{!mno-powerpc: -D_ARCH_PPC}} \
  61. %{mcpu=common: -D_ARCH_COM} \
  62. %{mcpu=power: -D_ARCH_PWR} \
  63. %{mcpu=powerpc: -D_ARCH_PPC} \
  64. %{mcpu=rios: -D_ARCH_PWR} \
  65. %{mcpu=rios1: -D_ARCH_PWR} \
  66. %{mcpu=rios2: -D_ARCH_PWR2} \
  67. %{mcpu=rsc: -D_ARCH_PWR} \
  68. %{mcpu=rsc1: -D_ARCH_PWR} \
  69. %{mcpu=403: -D_ARCH_PPC} \
  70. %{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \
  71. %{mcpu=603: -D_ARCH_PPC} \
  72. %{mcpu=604: -D_ARCH_PPC}"
  73.  
  74. #undef TARGET_DEFAULT
  75. #define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS)
  76.  
  77. #undef PROCESSOR_DEFAULT
  78. #define PROCESSOR_DEFAULT PROCESSOR_PPC601
  79.  
  80. /* These are not necessary when we pass -u to the assembler, and undefining
  81.    them saves a great deal of space in object files.  */
  82.  
  83. #undef ASM_OUTPUT_EXTERNAL
  84. #undef ASM_OUTPUT_EXTERNAL_LIBCALL
  85. #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME)    \
  86. { rtx _symref = XEXP (DECL_RTL (DECL), 0);    \
  87.   if ((TREE_CODE (DECL) == VAR_DECL        \
  88.        || TREE_CODE (DECL) == FUNCTION_DECL)    \
  89.       && (NAME)[0] != '*'            \
  90.       && (NAME)[strlen (NAME) - 1] != ']')    \
  91.     {                        \
  92.       char *_name = (char *) permalloc (strlen (XSTR (_symref, 0)) + 5); \
  93.       strcpy (_name, XSTR (_symref, 0));    \
  94.       strcat (_name, TREE_CODE (DECL) == FUNCTION_DECL ? "[DS]" : "[RW]"); \
  95.       XSTR (_symref, 0) = _name;        \
  96.     }                        \
  97. }
  98.