]> gcc.gnu.org Git - gcc.git/blame - gcc/config/rs6000/aix31.h
See the ChangeLog on the branch for more details.
[gcc.git] / gcc / config / rs6000 / aix31.h
CommitLineData
66be803d
RK
1/* Definitions of target machine for GNU compiler,
2 for IBM RS/6000 running AIX version 3.1.
9ebbca7d 3 Copyright (C) 1993,1997, 2000 Free Software Foundation, Inc.
66be803d
RK
4 Contributed by Richard Kenner (kenner@nyu.edu)
5
6This file is part of GNU CC.
7
8GNU CC is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 2, or (at your option)
11any later version.
12
13GNU CC is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with GNU CC; see the file COPYING. If not, write to
c15c9075
RK
20the Free Software Foundation, 59 Temple Place - Suite 330,
21Boston, MA 02111-1307, USA. */
66be803d
RK
22
23
24#include "rs6000/rs6000.h"
9ebbca7d
GK
25#include "rs6000/aix.h"
26
27/* Output something to declare an external symbol to the assembler. Most
28 assemblers don't need this.
29
30 If we haven't already, add "[RW]" (or "[DS]" for a function) to the
31 name. Normally we write this out along with the name. In the few cases
32 where we can't, it gets stripped off. */
33
34#undef ASM_OUTPUT_EXTERNAL
35#define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \
36{ rtx _symref = XEXP (DECL_RTL (DECL), 0); \
37 if ((TREE_CODE (DECL) == VAR_DECL \
38 || TREE_CODE (DECL) == FUNCTION_DECL) \
39 && (NAME)[strlen (NAME) - 1] != ']') \
40 { \
41 char *_name = (char *) permalloc (strlen (XSTR (_symref, 0)) + 5); \
42 strcpy (_name, XSTR (_symref, 0)); \
43 strcat (_name, TREE_CODE (DECL) == FUNCTION_DECL ? "[DS]" : "[RW]"); \
44 XSTR (_symref, 0) = _name; \
45 } \
46 fputs ("\t.extern ", FILE); \
47 assemble_name (FILE, XSTR (_symref, 0)); \
48 if (TREE_CODE (DECL) == FUNCTION_DECL) \
49 { \
50 fputs ("\n\t.extern .", FILE); \
51 RS6000_OUTPUT_BASENAME (FILE, XSTR (_symref, 0)); \
52 } \
53 putc ('\n', FILE); \
54}
55
56/* Similar, but for libcall. We only have to worry about the function name,
57 not that of the descriptor. */
58
59#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
60{ fputs ("\t.extern .", FILE); \
61 assemble_name (FILE, XSTR (FUN, 0)); \
62 putc ('\n', FILE); \
63}
66be803d
RK
64
65/* AIX 3.2 defined _AIX32, but older versions do not. */
66#undef CPP_PREDEFINES
65c42379 67#define CPP_PREDEFINES "-D_IBMR2 -D_AIX -Asystem(unix) -Asystem(aix) -Acpu(rs6000) -Amachine(rs6000)"
66be803d
RK
68
69/* AIX 3.1 uses bit 15 in CROR as the magic nop. */
0da40b09
RK
70#undef RS6000_CALL_GLUE
71#define RS6000_CALL_GLUE "cror 15,15,15"
6318808c
DE
72
73/* AIX 3.1 does not prepend underscores to itrunc, uitrunc, or mcount. */
74#undef RS6000_ITRUNC
75#define RS6000_ITRUNC "itrunc"
76#undef RS6000_UITRUNC
77#define RS6000_UITRUNC "uitrunc"
78#undef RS6000_MCOUNT
79#define RS6000_MCOUNT ".mcount"
80
This page took 0.625229 seconds and 5 git commands to generate.