1/* Definitions of target machine GNU compiler. IA-64 version. 2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 3 Contributed by Steve Ellcey <sje@cup.hp.com> and 4 Reva Cuthbertson <reva@cup.hp.com> 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 20the Free Software Foundation, 59 Temple Place - Suite 330, 21Boston, 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#undef CPP_PREDEFINES 29#define CPP_PREDEFINES "\
| 1/* Definitions of target machine GNU compiler. IA-64 version. 2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 3 Contributed by Steve Ellcey <sje@cup.hp.com> and 4 Reva Cuthbertson <reva@cup.hp.com> 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 20the Free Software Foundation, 59 Temple Place - Suite 330, 21Boston, 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#undef CPP_PREDEFINES 29#define CPP_PREDEFINES "\
|
30 -D__IA64__ -D__ia64 -D__ia64__ -D__hpux -D__hpux__ -Dhpux -Dunix \ 31 -D__BIG_ENDIAN__ -D_LONGLONG -D__ELF__ \ 32 -Asystem=hpux -Asystem=posix -Asystem=unix -Acpu=ia64 -Amachine=ia64 \
| 30 -D__IA64__ -D__hpux -D__hpux__ -Dhpux -Dunix \ 31 -D__BIG_ENDIAN__ -D_LONGLONG \ 32 -Asystem=hpux -Asystem=posix -Asystem=unix \
|
33 -D_UINT128_T" 34 35/* -D__fpreg=long double is needed to compensate for the lack of __fpreg 36 which is a primitive type in HP C but does not exist in GNU C. Same 37 for __float80 and __float128. These types appear in HP-UX header 38 files and so must have some definition. */ 39 40#undef CPP_SPEC 41#define CPP_SPEC "\ 42 %{mcpu=itanium:-D__itanium__} \
| 33 -D_UINT128_T" 34 35/* -D__fpreg=long double is needed to compensate for the lack of __fpreg 36 which is a primitive type in HP C but does not exist in GNU C. Same 37 for __float80 and __float128. These types appear in HP-UX header 38 files and so must have some definition. */ 39 40#undef CPP_SPEC 41#define CPP_SPEC "\ 42 %{mcpu=itanium:-D__itanium__} \
|
43 %{mlp64:-D__LP64__ -D__LONG_MAX__=9223372036854775807L} \
| 43 %{mlp64:-D__LP64__ -D_LP64 -D__LONG_MAX__=9223372036854775807L} \
|
44 %{!ansi:%{!std=c*:%{!std=i*: -D_HPUX_SOURCE -D__STDC_EXT__}}} \ 45 -D__fpreg=long\\ double \ 46 -D__float80=long\\ double \ 47 -D__float128=long\\ double" 48
| 44 %{!ansi:%{!std=c*:%{!std=i*: -D_HPUX_SOURCE -D__STDC_EXT__}}} \ 45 -D__fpreg=long\\ double \ 46 -D__float80=long\\ double \ 47 -D__float128=long\\ double" 48
|
49#undef ASM_SPEC 50#define ASM_SPEC "-x %{mconstant-gp} %{mauto-pic} \ 51 %{milp32:-milp32} %{mlp64:-mlp64}"
| 49#undef ASM_EXTRA_SPEC 50#define ASM_EXTRA_SPEC "%{milp32:-milp32} %{mlp64:-mlp64}"
|
52 53#undef ENDFILE_SPEC 54 55#undef STARTFILE_SPEC 56#ifdef CROSS_COMPILE 57#define STARTFILE_SPEC "%{!shared:crt0%O%s}" 58#else 59#define STARTFILE_SPEC "/usr/ccs/lib/hpux64/crt0%O" 60#endif 61 62#undef LINK_SPEC 63#define LINK_SPEC "\ 64 +Accept TypeMismatch \ 65 %{shared:-b} \ 66 %{!shared: \ 67 -u main \ 68 %{!static: \ 69 %{rdynamic:-export-dynamic}} \ 70 %{static:-static}}" 71 72#undef LIB_SPEC 73#define LIB_SPEC "%{!shared:%{!symbolic:-lc}}" 74 75#undef SUBTARGET_SWITCHES 76#define SUBTARGET_SWITCHES \ 77 { "ilp32", MASK_ILP32, "Generate ILP32 code" }, \ 78 { "lp64", -MASK_ILP32, "Generate LP64 code" }, 79 80/* A C expression whose value is zero if pointers that need to be extended 81 from being `POINTER_SIZE' bits wide to `Pmode' are sign-extended and 82 greater then zero if they are zero-extended and less then zero if the 83 ptr_extend instruction should be used. */ 84 85#define POINTERS_EXTEND_UNSIGNED -1 86
| 51 52#undef ENDFILE_SPEC 53 54#undef STARTFILE_SPEC 55#ifdef CROSS_COMPILE 56#define STARTFILE_SPEC "%{!shared:crt0%O%s}" 57#else 58#define STARTFILE_SPEC "/usr/ccs/lib/hpux64/crt0%O" 59#endif 60 61#undef LINK_SPEC 62#define LINK_SPEC "\ 63 +Accept TypeMismatch \ 64 %{shared:-b} \ 65 %{!shared: \ 66 -u main \ 67 %{!static: \ 68 %{rdynamic:-export-dynamic}} \ 69 %{static:-static}}" 70 71#undef LIB_SPEC 72#define LIB_SPEC "%{!shared:%{!symbolic:-lc}}" 73 74#undef SUBTARGET_SWITCHES 75#define SUBTARGET_SWITCHES \ 76 { "ilp32", MASK_ILP32, "Generate ILP32 code" }, \ 77 { "lp64", -MASK_ILP32, "Generate LP64 code" }, 78 79/* A C expression whose value is zero if pointers that need to be extended 80 from being `POINTER_SIZE' bits wide to `Pmode' are sign-extended and 81 greater then zero if they are zero-extended and less then zero if the 82 ptr_extend instruction should be used. */ 83 84#define POINTERS_EXTEND_UNSIGNED -1 85
|
87#define DONT_USE_BUILTIN_SETJMP
| |
88#define JMP_BUF_SIZE (8 * 76) 89 90#undef CONST_SECTION_ASM_OP 91#define CONST_SECTION_ASM_OP "\t.section\t.rodata,\t\"a\",\t\"progbits\"" 92 93#undef BITS_BIG_ENDIAN 94#define BITS_BIG_ENDIAN 1 95 96#undef TARGET_DEFAULT 97#define TARGET_DEFAULT (MASK_DWARF2_ASM | MASK_BIG_ENDIAN) 98 99/* This needs to be set to force structure arguments with a single 100 field to be treated as structures and not as the type of their 101 field. Without this a structure with a single char will be 102 returned just like a char variable and that is wrong on HP-UX 103 IA64. TARGET_STRUCT_ARG_REG_LITTLE_ENDIAN triggers the special 104 structure handling, this macro simply ensures that single field 105 structures are always treated like structures. */ 106 107#define MEMBER_TYPE_FORCES_BLK(FIELD) 1 108 109/* Override the setting of FUNCTION_ARG_REG_LITTLE_ENDIAN in 110 defaults.h. Setting this to true means that we are not passing 111 structures in registers in the "normal" big-endian way. See 112 See section 8.5 of the "Itanium Software Conventions and Runtime 113 Architecture", specifically Table 8-1 and the explanation of Byte 0 114 alignment and LSB alignment and a description of how structures 115 are passed. */ 116 117#define FUNCTION_ARG_REG_LITTLE_ENDIAN 1 118 119#undef FUNCTION_ARG_PADDING 120#define FUNCTION_ARG_PADDING(MODE, TYPE) \ 121 ia64_hpux_function_arg_padding ((MODE), (TYPE)) 122 123#undef PAD_VARARGS_DOWN 124#define PAD_VARARGS_DOWN (!AGGREGATE_TYPE_P (type))
| 86#define JMP_BUF_SIZE (8 * 76) 87 88#undef CONST_SECTION_ASM_OP 89#define CONST_SECTION_ASM_OP "\t.section\t.rodata,\t\"a\",\t\"progbits\"" 90 91#undef BITS_BIG_ENDIAN 92#define BITS_BIG_ENDIAN 1 93 94#undef TARGET_DEFAULT 95#define TARGET_DEFAULT (MASK_DWARF2_ASM | MASK_BIG_ENDIAN) 96 97/* This needs to be set to force structure arguments with a single 98 field to be treated as structures and not as the type of their 99 field. Without this a structure with a single char will be 100 returned just like a char variable and that is wrong on HP-UX 101 IA64. TARGET_STRUCT_ARG_REG_LITTLE_ENDIAN triggers the special 102 structure handling, this macro simply ensures that single field 103 structures are always treated like structures. */ 104 105#define MEMBER_TYPE_FORCES_BLK(FIELD) 1 106 107/* Override the setting of FUNCTION_ARG_REG_LITTLE_ENDIAN in 108 defaults.h. Setting this to true means that we are not passing 109 structures in registers in the "normal" big-endian way. See 110 See section 8.5 of the "Itanium Software Conventions and Runtime 111 Architecture", specifically Table 8-1 and the explanation of Byte 0 112 alignment and LSB alignment and a description of how structures 113 are passed. */ 114 115#define FUNCTION_ARG_REG_LITTLE_ENDIAN 1 116 117#undef FUNCTION_ARG_PADDING 118#define FUNCTION_ARG_PADDING(MODE, TYPE) \ 119 ia64_hpux_function_arg_padding ((MODE), (TYPE)) 120 121#undef PAD_VARARGS_DOWN 122#define PAD_VARARGS_DOWN (!AGGREGATE_TYPE_P (type))
|