OSDN Git Service

* config/ia64/ia64.h (EXTRA_SPECS): Remove cpp_cpu.
[pf3gnuchains/gcc-fork.git] / gcc / config / ia64 / hpux.h
1 /* Definitions of target machine GNU compiler.  IA-64 version.
2    Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3    Contributed by Steve Ellcey <sje@cup.hp.com> and
4                   Reva Cuthbertson <reva@cup.hp.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 macro is a C statement to print on `stderr' a string describing the
24    particular machine description choice.  */
25
26 #define TARGET_VERSION fprintf (stderr, " (IA-64) HP-UX");
27
28 /* Target OS builtins.  */
29 /* -D__fpreg=long double is needed to compensate for
30    the lack of __fpreg which is a primative type in
31    HP C but does not exist in GNU C.  */
32 #define TARGET_OS_CPP_BUILTINS()                        \
33 do {                                                    \
34         builtin_assert("system=hpux");                  \
35         builtin_assert("system=posix");                 \
36         builtin_assert("system=unix");                  \
37         builtin_define_std("hpux");                     \
38         builtin_define_std("unix");                     \
39         builtin_define("__IA64__");                     \
40         builtin_define("_LONGLONG");                    \
41         builtin_define("_UINT128_T");                   \
42         builtin_define("__fpreg=long double");          \
43         builtin_define("__float80=long double");        \
44         builtin_define("__float128=long double");       \
45         if (c_language == clk_cplusplus || !flag_iso)   \
46           {                                             \
47             builtin_define("_HPUX_SOURCE");             \
48             builtin_define("__STDC_EXT__");             \
49           }                                             \
50 } while (0)
51
52 #undef  ASM_EXTRA_SPEC
53 #define ASM_EXTRA_SPEC "%{milp32:-milp32} %{mlp64:-mlp64}"
54
55 #undef ENDFILE_SPEC
56
57 #undef STARTFILE_SPEC
58 #ifdef CROSS_COMPILE
59 #define STARTFILE_SPEC "%{!shared:crt0%O%s}"
60 #else
61 #define STARTFILE_SPEC "/usr/ccs/lib/hpux64/crt0%O"
62 #endif
63
64 #undef LINK_SPEC
65 #define LINK_SPEC "\
66   +Accept TypeMismatch \
67   %{shared:-b} \
68   %{!shared: \
69     -u main \
70     %{!static: \
71       %{rdynamic:-export-dynamic}} \
72       %{static:-static}}"
73
74 #undef  LIB_SPEC
75 #define LIB_SPEC "%{!shared:%{!symbolic:-lc}}"
76
77 #undef SUBTARGET_SWITCHES
78 #define SUBTARGET_SWITCHES \
79   { "ilp32",    MASK_ILP32,     "Generate ILP32 code" }, \
80   { "lp64",    -MASK_ILP32,     "Generate LP64 code" },
81
82 /* A C expression whose value is zero if pointers that need to be extended
83    from being `POINTER_SIZE' bits wide to `Pmode' are sign-extended and
84    greater then zero if they are zero-extended and less then zero if the
85    ptr_extend instruction should be used.  */
86
87 #define POINTERS_EXTEND_UNSIGNED -1
88
89 #define JMP_BUF_SIZE  (8 * 76)
90
91 #undef READONLY_DATA_SECTION_ASM_OP
92 #define READONLY_DATA_SECTION_ASM_OP \
93   "\t.section\t.rodata,\t\"a\",\t\"progbits\""
94
95 #undef BITS_BIG_ENDIAN
96 #define BITS_BIG_ENDIAN 1
97
98 #undef TARGET_DEFAULT
99 #define TARGET_DEFAULT (MASK_DWARF2_ASM | MASK_BIG_ENDIAN)
100
101 /* This needs to be set to force structure arguments with a single
102    field to be treated as structures and not as the type of their
103    field.  Without this a structure with a single char will be
104    returned just like a char variable and that is wrong on HP-UX
105    IA64.  TARGET_STRUCT_ARG_REG_LITTLE_ENDIAN triggers the special
106    structure handling, this macro simply ensures that single field
107    structures are always treated like structures.  */
108
109 #define MEMBER_TYPE_FORCES_BLK(FIELD, MODE) 1
110
111 /* Override the setting of FUNCTION_ARG_REG_LITTLE_ENDIAN in
112    defaults.h.  Setting this to true means that we are not passing
113    structures in registers in the "normal" big-endian way.  See
114    See section 8.5 of the "Itanium Software Conventions and Runtime
115    Architecture", specifically Table 8-1 and the explanation of Byte 0
116    alignment and LSB alignment and a description of how structures
117    are passed.  */
118
119 #define FUNCTION_ARG_REG_LITTLE_ENDIAN 1
120
121 #undef FUNCTION_ARG_PADDING
122 #define FUNCTION_ARG_PADDING(MODE, TYPE) \
123         ia64_hpux_function_arg_padding ((MODE), (TYPE))
124
125 #undef PAD_VARARGS_DOWN
126 #define PAD_VARARGS_DOWN (!AGGREGATE_TYPE_P (type))
127
128 #define REGISTER_TARGET_PRAGMAS(PFILE) \
129   cpp_register_pragma (PFILE, 0, "builtin", ia64_hpux_handle_builtin_pragma)