OSDN Git Service

* config/m68hc11/m68hc11.c (m68hc11_initial_elimination_offset):
[pf3gnuchains/gcc-fork.git] / gcc / config / rs6000 / aix31.h
1 /* Definitions of target machine for GNU compiler,
2    for IBM RS/6000 running AIX version 3.1.
3    Copyright (C) 1993,1997, 2000, 2001 Free Software Foundation, Inc.
4    Contributed by Richard Kenner (kenner@nyu.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 /* Output something to declare an external symbol to the assembler.  Most
25    assemblers don't need this.
26
27    If we haven't already, add "[RW]" (or "[DS]" for a function) to the
28    name.  Normally we write this out along with the name.  In the few cases
29    where we can't, it gets stripped off.  */
30
31 #undef ASM_OUTPUT_EXTERNAL
32 #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME)   \
33 { rtx _symref = XEXP (DECL_RTL (DECL), 0);      \
34   if ((TREE_CODE (DECL) == VAR_DECL             \
35        || TREE_CODE (DECL) == FUNCTION_DECL)    \
36       && (NAME)[strlen (NAME) - 1] != ']')      \
37     {                                           \
38       char *_name = (char *) permalloc (strlen (XSTR (_symref, 0)) + 5); \
39       strcpy (_name, XSTR (_symref, 0));        \
40       strcat (_name, TREE_CODE (DECL) == FUNCTION_DECL ? "[DS]" : "[RW]"); \
41       XSTR (_symref, 0) = _name;                \
42     }                                           \
43   fputs ("\t.extern ", FILE);                   \
44   assemble_name (FILE, XSTR (_symref, 0));      \
45   if (TREE_CODE (DECL) == FUNCTION_DECL)        \
46     {                                           \
47       fputs ("\n\t.extern .", FILE);            \
48       RS6000_OUTPUT_BASENAME (FILE, XSTR (_symref, 0)); \
49     }                                           \
50   putc ('\n', FILE);                            \
51 }
52
53 /* Similar, but for libcall.  We only have to worry about the function name,
54    not that of the descriptor. */
55
56 #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN)  \
57 { fputs ("\t.extern .", FILE);                  \
58   assemble_name (FILE, XSTR (FUN, 0));          \
59   putc ('\n', FILE);                            \
60 }
61
62 /* AIX 3.2 defined _AIX32, but older versions do not.  */
63 #undef CPP_PREDEFINES
64 #define CPP_PREDEFINES "-D_IBMR2 -D_AIX -Asystem=unix -Asystem=aix -Acpu=rs6000 -Amachine=rs6000"
65
66 /* AIX 3.1 uses bit 15 in CROR as the magic nop.  */
67 #undef RS6000_CALL_GLUE
68 #define RS6000_CALL_GLUE "cror 15,15,15"
69
70 /* AIX 3.1 does not prepend underscores to itrunc, uitrunc, or mcount.  */
71 #undef RS6000_ITRUNC
72 #define RS6000_ITRUNC "itrunc"
73 #undef RS6000_UITRUNC
74 #define RS6000_UITRUNC "uitrunc"
75 #undef RS6000_MCOUNT
76 #define RS6000_MCOUNT ".mcount"
77