annotate gcc/config/rs6000/linux64.h @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents f6334be47118
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 /* Definitions of target machine for GNU compiler,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 for 64 bit PowerPC linux.
111
kono
parents: 67
diff changeset
3 Copyright (C) 2000-2017 Free Software Foundation, Inc.
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 This file is part of GCC.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 GCC is free software; you can redistribute it and/or modify it
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 under the terms of the GNU General Public License as published
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 by the Free Software Foundation; either version 3, or (at your
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 option) any later version.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 GCC is distributed in the hope that it will be useful, but WITHOUT
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 License for more details.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 Under Section 7 of GPL version 3, you are granted additional
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 permissions described in the GCC Runtime Library Exception, version
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 3.1, as published by the Free Software Foundation.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 You should have received a copy of the GNU General Public License and
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 a copy of the GCC Runtime Library Exception along with this program;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 <http://www.gnu.org/licenses/>. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 #ifndef RS6000_BI_ARCH
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 #undef TARGET_64BIT
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 #define TARGET_64BIT 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
30
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 #define DEFAULT_ARCH64_P 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 #define RS6000_BI_ARCH_P 0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
33
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 #else
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
35
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 #define DEFAULT_ARCH64_P (TARGET_DEFAULT & MASK_64BIT)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 #define RS6000_BI_ARCH_P 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
38
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
40
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 #ifdef IN_LIBGCC2
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 #undef TARGET_64BIT
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 #ifdef __powerpc64__
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 #define TARGET_64BIT 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 #else
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 #define TARGET_64BIT 0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
49
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 #undef TARGET_AIX
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 #define TARGET_AIX TARGET_64BIT
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
52
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 #ifdef HAVE_LD_NO_DOT_SYMS
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 /* New ABI uses a local sym for the function entry point. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 extern int dot_symbols;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 #undef DOT_SYMBOLS
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 #define DOT_SYMBOLS dot_symbols
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
59
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
60 #define TARGET_PROFILE_KERNEL profile_kernel
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
61
111
kono
parents: 67
diff changeset
62 #undef TARGET_KEEP_LEAF_WHEN_PROFILED
kono
parents: 67
diff changeset
63 #define TARGET_KEEP_LEAF_WHEN_PROFILED rs6000_keep_leaf_when_profiled
kono
parents: 67
diff changeset
64
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
65 #define TARGET_USES_LINUX64_OPT 1
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
66 #ifdef HAVE_LD_LARGE_TOC
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
67 #undef TARGET_CMODEL
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
68 #define TARGET_CMODEL rs6000_current_cmodel
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
69 #define SET_CMODEL(opt) rs6000_current_cmodel = opt
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
70 #else
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
71 #define SET_CMODEL(opt) do {} while (0)
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
72 #endif
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
73
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 #undef PROCESSOR_DEFAULT
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
75 #define PROCESSOR_DEFAULT PROCESSOR_POWER7
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 #undef PROCESSOR_DEFAULT64
111
kono
parents: 67
diff changeset
77 #define PROCESSOR_DEFAULT64 PROCESSOR_POWER8
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
78
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
79 /* We don't need to generate entries in .fixup, except when
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
80 -mrelocatable or -mrelocatable-lib is given. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
81 #undef RELOCATABLE_NEEDS_FIXUP
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
82 #define RELOCATABLE_NEEDS_FIXUP \
111
kono
parents: 67
diff changeset
83 (rs6000_isa_flags & rs6000_isa_flags_explicit & OPTION_MASK_RELOCATABLE)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
84
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
85 #undef RS6000_ABI_NAME
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 #define RS6000_ABI_NAME "linux"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
87
111
kono
parents: 67
diff changeset
88 #define INVALID_64BIT "%<-m%s%> not supported in this configuration"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 #define INVALID_32BIT INVALID_64BIT
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
90
111
kono
parents: 67
diff changeset
91 #ifdef LINUX64_DEFAULT_ABI_ELFv2
kono
parents: 67
diff changeset
92 #define ELFv2_ABI_CHECK (rs6000_elf_abi != 1)
kono
parents: 67
diff changeset
93 #else
kono
parents: 67
diff changeset
94 #define ELFv2_ABI_CHECK (rs6000_elf_abi == 2)
kono
parents: 67
diff changeset
95 #endif
kono
parents: 67
diff changeset
96
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
97 #undef SUBSUBTARGET_OVERRIDE_OPTIONS
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
98 #define SUBSUBTARGET_OVERRIDE_OPTIONS \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
99 do \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
100 { \
111
kono
parents: 67
diff changeset
101 if (!global_options_set.x_rs6000_alignment_flags) \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
102 rs6000_alignment_flags = MASK_ALIGN_NATURAL; \
111
kono
parents: 67
diff changeset
103 if (rs6000_isa_flags & OPTION_MASK_64BIT) \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
104 { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
105 if (DEFAULT_ABI != ABI_AIX) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
106 { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
107 rs6000_current_abi = ABI_AIX; \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
108 error (INVALID_64BIT, "call"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
109 } \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
110 dot_symbols = !strcmp (rs6000_abi_name, "aixdesc"); \
111
kono
parents: 67
diff changeset
111 if (ELFv2_ABI_CHECK) \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
112 { \
111
kono
parents: 67
diff changeset
113 rs6000_current_abi = ABI_ELFv2; \
kono
parents: 67
diff changeset
114 if (dot_symbols) \
kono
parents: 67
diff changeset
115 error ("-mcall-aixdesc incompatible with -mabi=elfv2"); \
kono
parents: 67
diff changeset
116 } \
kono
parents: 67
diff changeset
117 if (rs6000_isa_flags & OPTION_MASK_RELOCATABLE) \
kono
parents: 67
diff changeset
118 { \
kono
parents: 67
diff changeset
119 rs6000_isa_flags &= ~OPTION_MASK_RELOCATABLE; \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
120 error (INVALID_64BIT, "relocatable"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
121 } \
111
kono
parents: 67
diff changeset
122 if (rs6000_isa_flags & OPTION_MASK_EABI) \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
123 { \
111
kono
parents: 67
diff changeset
124 rs6000_isa_flags &= ~OPTION_MASK_EABI; \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
125 error (INVALID_64BIT, "eabi"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
126 } \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
127 if (TARGET_PROTOTYPE) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
128 { \
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
129 target_prototype = 0; \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
130 error (INVALID_64BIT, "prototype"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
131 } \
111
kono
parents: 67
diff changeset
132 if ((rs6000_isa_flags & OPTION_MASK_POWERPC64) == 0) \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
133 { \
111
kono
parents: 67
diff changeset
134 rs6000_isa_flags |= OPTION_MASK_POWERPC64; \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
135 error ("-m64 requires a PowerPC64 cpu"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
136 } \
111
kono
parents: 67
diff changeset
137 if ((rs6000_isa_flags_explicit \
kono
parents: 67
diff changeset
138 & OPTION_MASK_MINIMAL_TOC) != 0) \
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
139 { \
111
kono
parents: 67
diff changeset
140 if (global_options_set.x_rs6000_current_cmodel \
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
141 && rs6000_current_cmodel != CMODEL_SMALL) \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
142 error ("-mcmodel incompatible with other toc options"); \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
143 SET_CMODEL (CMODEL_SMALL); \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
144 } \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
145 else \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
146 { \
111
kono
parents: 67
diff changeset
147 if (!global_options_set.x_rs6000_current_cmodel) \
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
148 SET_CMODEL (CMODEL_MEDIUM); \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
149 if (rs6000_current_cmodel != CMODEL_SMALL) \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
150 { \
111
kono
parents: 67
diff changeset
151 if (!global_options_set.x_TARGET_NO_FP_IN_TOC) \
kono
parents: 67
diff changeset
152 TARGET_NO_FP_IN_TOC \
kono
parents: 67
diff changeset
153 = rs6000_current_cmodel == CMODEL_MEDIUM; \
kono
parents: 67
diff changeset
154 if (!global_options_set.x_TARGET_NO_SUM_IN_TOC) \
kono
parents: 67
diff changeset
155 TARGET_NO_SUM_IN_TOC = 0; \
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
156 } \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
157 } \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
158 } \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
159 else \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
160 { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
161 if (!RS6000_BI_ARCH_P) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
162 error (INVALID_32BIT, "32"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
163 if (TARGET_PROFILE_KERNEL) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
164 { \
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
165 TARGET_PROFILE_KERNEL = 0; \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
166 error (INVALID_32BIT, "profile-kernel"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
167 } \
111
kono
parents: 67
diff changeset
168 if (global_options_set.x_rs6000_current_cmodel) \
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
169 { \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
170 SET_CMODEL (CMODEL_SMALL); \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
171 error (INVALID_32BIT, "cmodel"); \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
172 } \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
173 } \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
174 } \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
175 while (0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
176
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
177 #undef ASM_DEFAULT_SPEC
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
178 #undef ASM_SPEC
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
179 #undef LINK_OS_LINUX_SPEC
111
kono
parents: 67
diff changeset
180 #undef LINK_SECURE_PLT_SPEC
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
181
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
182 #ifndef RS6000_BI_ARCH
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
183 #define ASM_DEFAULT_SPEC "-mppc64"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
184 #define ASM_SPEC "%(asm_spec64) %(asm_spec_common)"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
185 #define LINK_OS_LINUX_SPEC "%(link_os_linux_spec64)"
111
kono
parents: 67
diff changeset
186 #define LINK_SECURE_PLT_SPEC ""
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
187 #else
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
188 #if DEFAULT_ARCH64_P
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
189 #define ASM_DEFAULT_SPEC "-mppc%{!m32:64}"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
190 #define ASM_SPEC "%{m32:%(asm_spec32)}%{!m32:%(asm_spec64)} %(asm_spec_common)"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
191 #define LINK_OS_LINUX_SPEC "%{m32:%(link_os_linux_spec32)}%{!m32:%(link_os_linux_spec64)}"
111
kono
parents: 67
diff changeset
192 #define LINK_SECURE_PLT_SPEC "%{m32: " LINK_SECURE_PLT_DEFAULT_SPEC "}"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
193 #else
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
194 #define ASM_DEFAULT_SPEC "-mppc%{m64:64}"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
195 #define ASM_SPEC "%{!m64:%(asm_spec32)}%{m64:%(asm_spec64)} %(asm_spec_common)"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
196 #define LINK_OS_LINUX_SPEC "%{!m64:%(link_os_linux_spec32)}%{m64:%(link_os_linux_spec64)}"
111
kono
parents: 67
diff changeset
197 #define LINK_SECURE_PLT_SPEC "%{!m64: " LINK_SECURE_PLT_DEFAULT_SPEC "}"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
198 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
199 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
200
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
201 #define ASM_SPEC32 "-a32 \
111
kono
parents: 67
diff changeset
202 %{mrelocatable} %{mrelocatable-lib} %{" FPIE_OR_FPIC_SPEC ":-K PIC} \
kono
parents: 67
diff changeset
203 %{memb|msdata=eabi: -memb}"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
204
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
205 #define ASM_SPEC64 "-a64"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
206
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
207 #define ASM_SPEC_COMMON "%(asm_cpu) \
111
kono
parents: 67
diff changeset
208 %{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}}" \
kono
parents: 67
diff changeset
209 ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
210
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
211 #undef SUBSUBTARGET_EXTRA_SPECS
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
212 #define SUBSUBTARGET_EXTRA_SPECS \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
213 { "asm_spec_common", ASM_SPEC_COMMON }, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
214 { "asm_spec32", ASM_SPEC32 }, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
215 { "asm_spec64", ASM_SPEC64 }, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
216 { "link_os_linux_spec32", LINK_OS_LINUX_SPEC32 }, \
111
kono
parents: 67
diff changeset
217 { "link_os_linux_spec64", LINK_OS_LINUX_SPEC64 }, \
kono
parents: 67
diff changeset
218 { "link_os_extra_spec32", LINK_OS_EXTRA_SPEC32 }, \
kono
parents: 67
diff changeset
219 { "link_os_extra_spec64", LINK_OS_EXTRA_SPEC64 }, \
kono
parents: 67
diff changeset
220 { "link_os_new_dtags", LINK_OS_NEW_DTAGS_SPEC }, \
kono
parents: 67
diff changeset
221 { "include_extra", INCLUDE_EXTRA_SPEC }, \
kono
parents: 67
diff changeset
222 { "dynamic_linker_prefix", DYNAMIC_LINKER_PREFIX },
kono
parents: 67
diff changeset
223
kono
parents: 67
diff changeset
224 /* Optional specs used for overriding the system include directory, default
kono
parents: 67
diff changeset
225 -rpath links, and prefix for the dynamic linker. Normally, there are not
kono
parents: 67
diff changeset
226 defined, but if the user configure with the --with-advance-toolchain=<xxx>
kono
parents: 67
diff changeset
227 option, the advance-toolchain.h file will override these. */
kono
parents: 67
diff changeset
228 #ifndef INCLUDE_EXTRA_SPEC
kono
parents: 67
diff changeset
229 #define INCLUDE_EXTRA_SPEC ""
kono
parents: 67
diff changeset
230 #endif
kono
parents: 67
diff changeset
231
kono
parents: 67
diff changeset
232 #ifndef LINK_OS_EXTRA_SPEC32
kono
parents: 67
diff changeset
233 #define LINK_OS_EXTRA_SPEC32 ""
kono
parents: 67
diff changeset
234 #endif
kono
parents: 67
diff changeset
235
kono
parents: 67
diff changeset
236 #ifndef LINK_OS_EXTRA_SPEC64
kono
parents: 67
diff changeset
237 #define LINK_OS_EXTRA_SPEC64 ""
kono
parents: 67
diff changeset
238 #endif
kono
parents: 67
diff changeset
239
kono
parents: 67
diff changeset
240 #ifndef LINK_OS_NEW_DTAGS_SPEC
kono
parents: 67
diff changeset
241 #define LINK_OS_NEW_DTAGS_SPEC ""
kono
parents: 67
diff changeset
242 #endif
kono
parents: 67
diff changeset
243
kono
parents: 67
diff changeset
244 #ifndef DYNAMIC_LINKER_PREFIX
kono
parents: 67
diff changeset
245 #define DYNAMIC_LINKER_PREFIX ""
kono
parents: 67
diff changeset
246 #endif
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
247
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
248 #undef MULTILIB_DEFAULTS
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
249 #if DEFAULT_ARCH64_P
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
250 #define MULTILIB_DEFAULTS { "m64" }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
251 #else
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
252 #define MULTILIB_DEFAULTS { "m32" }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
253 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
254
111
kono
parents: 67
diff changeset
255 /* Split stack is only supported for 64 bit, and requires glibc >= 2.18. */
kono
parents: 67
diff changeset
256 #if TARGET_GLIBC_MAJOR * 1000 + TARGET_GLIBC_MINOR >= 2018
kono
parents: 67
diff changeset
257 # ifndef RS6000_BI_ARCH
kono
parents: 67
diff changeset
258 # define TARGET_CAN_SPLIT_STACK
kono
parents: 67
diff changeset
259 # else
kono
parents: 67
diff changeset
260 # if DEFAULT_ARCH64_P
kono
parents: 67
diff changeset
261 /* Supported, and the default is -m64 */
kono
parents: 67
diff changeset
262 # define TARGET_CAN_SPLIT_STACK_64BIT 1
kono
parents: 67
diff changeset
263 # else
kono
parents: 67
diff changeset
264 /* Supported, and the default is -m32 */
kono
parents: 67
diff changeset
265 # define TARGET_CAN_SPLIT_STACK_64BIT 0
kono
parents: 67
diff changeset
266 # endif
kono
parents: 67
diff changeset
267 # endif
kono
parents: 67
diff changeset
268 #endif
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
269
111
kono
parents: 67
diff changeset
270 #ifndef RS6000_BI_ARCH
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
271
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
272 /* 64-bit PowerPC Linux always has a TOC. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
273 #undef TARGET_TOC
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
274 #define TARGET_TOC 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
275
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
276 /* Some things from sysv4.h we don't do when 64 bit. */
111
kono
parents: 67
diff changeset
277 #undef OPTION_RELOCATABLE
kono
parents: 67
diff changeset
278 #define OPTION_RELOCATABLE 0
kono
parents: 67
diff changeset
279 #undef OPTION_EABI
kono
parents: 67
diff changeset
280 #define OPTION_EABI 0
kono
parents: 67
diff changeset
281 #undef OPTION_PROTOTYPE
kono
parents: 67
diff changeset
282 #define OPTION_PROTOTYPE 0
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
283 #undef RELOCATABLE_NEEDS_FIXUP
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
284 #define RELOCATABLE_NEEDS_FIXUP 0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
285
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
286 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
287
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
288 /* We use glibc _mcount for profiling. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
289 #define NO_PROFILE_COUNTERS 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
290 #define PROFILE_HOOK(LABEL) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
291 do { if (TARGET_64BIT) output_profile_hook (LABEL); } while (0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
292
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
293 /* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
294 #undef ADJUST_FIELD_ALIGN
111
kono
parents: 67
diff changeset
295 #define ADJUST_FIELD_ALIGN(FIELD, TYPE, COMPUTED) \
kono
parents: 67
diff changeset
296 (rs6000_special_adjust_field_align_p ((TYPE), (COMPUTED)) \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
297 ? 128 \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
298 : (TARGET_64BIT \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
299 && TARGET_ALIGN_NATURAL == 0 \
111
kono
parents: 67
diff changeset
300 && TYPE_MODE (strip_array_types (TYPE)) == DFmode) \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
301 ? MIN ((COMPUTED), 32) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
302 : (COMPUTED))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
303
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
304 /* PowerPC64 Linux increases natural record alignment to doubleword if
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
305 the first field is an FP double, only if in power alignment mode. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
306 #undef ROUND_TYPE_ALIGN
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
307 #define ROUND_TYPE_ALIGN(STRUCT, COMPUTED, SPECIFIED) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
308 ((TARGET_64BIT \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
309 && (TREE_CODE (STRUCT) == RECORD_TYPE \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
310 || TREE_CODE (STRUCT) == UNION_TYPE \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
311 || TREE_CODE (STRUCT) == QUAL_UNION_TYPE) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
312 && TARGET_ALIGN_NATURAL == 0) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
313 ? rs6000_special_round_type_align (STRUCT, COMPUTED, SPECIFIED) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
314 : MAX ((COMPUTED), (SPECIFIED)))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
315
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
316 /* Use the default for compiling target libs. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
317 #ifdef IN_TARGET_LIBS
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
318 #undef TARGET_ALIGN_NATURAL
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
319 #define TARGET_ALIGN_NATURAL 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
320 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
321
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
322 /* Indicate that jump tables go in the text section. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
323 #undef JUMP_TABLES_IN_TEXT_SECTION
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
324 #define JUMP_TABLES_IN_TEXT_SECTION TARGET_64BIT
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
325
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
326 /* The linux ppc64 ABI isn't explicit on whether aggregates smaller
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
327 than a doubleword should be padded upward or downward. You could
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
328 reasonably assume that they follow the normal rules for structure
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
329 layout treating the parameter area as any other block of memory,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
330 then map the reg param area to registers. i.e. pad upward.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
331 Setting both of the following defines results in this behavior.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
332 Setting just the first one will result in aggregates that fit in a
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
333 doubleword being padded downward, and others being padded upward.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
334 Not a bad idea as this results in struct { int x; } being passed
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
335 the same way as an int. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
336 #define AGGREGATE_PADDING_FIXED TARGET_64BIT
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
337 #define AGGREGATES_PAD_UPWARD_ALWAYS 0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
338
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
339 /* Specify padding for the last element of a block move between
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
340 registers and memory. FIRST is nonzero if this is the only
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
341 element. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
342 #define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \
111
kono
parents: 67
diff changeset
343 (!(FIRST) ? PAD_UPWARD : targetm.calls.function_arg_padding (MODE, TYPE))
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
344
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
345 /* Linux doesn't support saving and restoring 64-bit regs in a 32-bit
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
346 process. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
347 #define OS_MISSING_POWERPC64 !TARGET_64BIT
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
348
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
349 #ifdef SINGLE_LIBC
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
350 #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
111
kono
parents: 67
diff changeset
351 #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
kono
parents: 67
diff changeset
352 #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
kono
parents: 67
diff changeset
353 #undef OPTION_MUSL
kono
parents: 67
diff changeset
354 #define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
355 #else
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
356 #define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
111
kono
parents: 67
diff changeset
357 #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
kono
parents: 67
diff changeset
358 #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
kono
parents: 67
diff changeset
359 #undef OPTION_MUSL
kono
parents: 67
diff changeset
360 #define OPTION_MUSL (linux_libc == LIBC_MUSL)
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
361 #endif
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
362
111
kono
parents: 67
diff changeset
363 /* Determine what functions are present at the runtime;
kono
parents: 67
diff changeset
364 this includes full c99 runtime and sincos. */
kono
parents: 67
diff changeset
365 #undef TARGET_LIBC_HAS_FUNCTION
kono
parents: 67
diff changeset
366 #define TARGET_LIBC_HAS_FUNCTION linux_libc_has_function
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
367
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
368 #undef TARGET_OS_CPP_BUILTINS
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
369 #define TARGET_OS_CPP_BUILTINS() \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
370 do \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
371 { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
372 if (TARGET_64BIT) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
373 { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
374 builtin_define ("__PPC__"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
375 builtin_define ("__PPC64__"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
376 builtin_define ("__powerpc__"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
377 builtin_define ("__powerpc64__"); \
111
kono
parents: 67
diff changeset
378 if (!DOT_SYMBOLS) \
kono
parents: 67
diff changeset
379 builtin_define ("_CALL_LINUX"); \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
380 builtin_assert ("cpu=powerpc64"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
381 builtin_assert ("machine=powerpc64"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
382 } \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
383 else \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
384 { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
385 builtin_define_std ("PPC"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
386 builtin_define_std ("powerpc"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
387 builtin_assert ("cpu=powerpc"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
388 builtin_assert ("machine=powerpc"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
389 TARGET_OS_SYSV_CPP_BUILTINS (); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
390 } \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
391 } \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
392 while (0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
393
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
394 #undef CPP_OS_DEFAULT_SPEC
111
kono
parents: 67
diff changeset
395 #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux) %(include_extra)"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
396
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
397 #undef LINK_SHLIB_SPEC
111
kono
parents: 67
diff changeset
398 #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}} \
kono
parents: 67
diff changeset
399 %{static-pie:-static -pie --no-dynamic-linker -z text}"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
400
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
401 #undef LIB_DEFAULT_SPEC
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
402 #define LIB_DEFAULT_SPEC "%(lib_linux)"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
403
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
404 #undef STARTFILE_DEFAULT_SPEC
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
405 #define STARTFILE_DEFAULT_SPEC "%(startfile_linux)"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
406
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
407 #undef ENDFILE_DEFAULT_SPEC
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
408 #define ENDFILE_DEFAULT_SPEC "%(endfile_linux)"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
409
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
410 #undef LINK_START_DEFAULT_SPEC
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
411 #define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
412
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
413 #undef LINK_OS_DEFAULT_SPEC
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
414 #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
415
111
kono
parents: 67
diff changeset
416 #define GLIBC_DYNAMIC_LINKER32 "%(dynamic_linker_prefix)/lib/ld.so.1"
kono
parents: 67
diff changeset
417
kono
parents: 67
diff changeset
418 #ifdef LINUX64_DEFAULT_ABI_ELFv2
kono
parents: 67
diff changeset
419 #define GLIBC_DYNAMIC_LINKER64 \
kono
parents: 67
diff changeset
420 "%{mabi=elfv1:%(dynamic_linker_prefix)/lib64/ld64.so.1;" \
kono
parents: 67
diff changeset
421 ":%(dynamic_linker_prefix)/lib64/ld64.so.2}"
kono
parents: 67
diff changeset
422 #else
kono
parents: 67
diff changeset
423 #define GLIBC_DYNAMIC_LINKER64 \
kono
parents: 67
diff changeset
424 "%{mabi=elfv2:%(dynamic_linker_prefix)/lib64/ld64.so.2;" \
kono
parents: 67
diff changeset
425 ":%(dynamic_linker_prefix)/lib64/ld64.so.1}"
kono
parents: 67
diff changeset
426 #endif
kono
parents: 67
diff changeset
427
kono
parents: 67
diff changeset
428 #define MUSL_DYNAMIC_LINKER32 \
kono
parents: 67
diff changeset
429 "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
kono
parents: 67
diff changeset
430 #define MUSL_DYNAMIC_LINKER64 \
kono
parents: 67
diff changeset
431 "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
kono
parents: 67
diff changeset
432
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
433 #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
434 #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
435 #if DEFAULT_LIBC == LIBC_UCLIBC
111
kono
parents: 67
diff changeset
436 #define CHOOSE_DYNAMIC_LINKER(G, U, M) \
kono
parents: 67
diff changeset
437 "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
438 #elif DEFAULT_LIBC == LIBC_GLIBC
111
kono
parents: 67
diff changeset
439 #define CHOOSE_DYNAMIC_LINKER(G, U, M) \
kono
parents: 67
diff changeset
440 "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
kono
parents: 67
diff changeset
441 #elif DEFAULT_LIBC == LIBC_MUSL
kono
parents: 67
diff changeset
442 #define CHOOSE_DYNAMIC_LINKER(G, U, M) \
kono
parents: 67
diff changeset
443 "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
444 #else
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
445 #error "Unsupported DEFAULT_LIBC"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
446 #endif
111
kono
parents: 67
diff changeset
447 #define GNU_USER_DYNAMIC_LINKER32 \
kono
parents: 67
diff changeset
448 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \
kono
parents: 67
diff changeset
449 MUSL_DYNAMIC_LINKER32)
kono
parents: 67
diff changeset
450 #define GNU_USER_DYNAMIC_LINKER64 \
kono
parents: 67
diff changeset
451 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \
kono
parents: 67
diff changeset
452 MUSL_DYNAMIC_LINKER64)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
453
111
kono
parents: 67
diff changeset
454 #undef DEFAULT_ASM_ENDIAN
kono
parents: 67
diff changeset
455 #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN)
kono
parents: 67
diff changeset
456 #define DEFAULT_ASM_ENDIAN " -mlittle"
kono
parents: 67
diff changeset
457 #define LINK_OS_LINUX_EMUL32 ENDIAN_SELECT(" -m elf32ppclinux", \
kono
parents: 67
diff changeset
458 " -m elf32lppclinux", \
kono
parents: 67
diff changeset
459 " -m elf32lppclinux")
kono
parents: 67
diff changeset
460 #define LINK_OS_LINUX_EMUL64 ENDIAN_SELECT(" -m elf64ppc", \
kono
parents: 67
diff changeset
461 " -m elf64lppc", \
kono
parents: 67
diff changeset
462 " -m elf64lppc")
kono
parents: 67
diff changeset
463 #else
kono
parents: 67
diff changeset
464 #define DEFAULT_ASM_ENDIAN " -mbig"
kono
parents: 67
diff changeset
465 #define LINK_OS_LINUX_EMUL32 ENDIAN_SELECT(" -m elf32ppclinux", \
kono
parents: 67
diff changeset
466 " -m elf32lppclinux", \
kono
parents: 67
diff changeset
467 " -m elf32ppclinux")
kono
parents: 67
diff changeset
468 #define LINK_OS_LINUX_EMUL64 ENDIAN_SELECT(" -m elf64ppc", \
kono
parents: 67
diff changeset
469 " -m elf64lppc", \
kono
parents: 67
diff changeset
470 " -m elf64ppc")
kono
parents: 67
diff changeset
471 #endif
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
472
111
kono
parents: 67
diff changeset
473 #define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " %{!shared: %{!static: \
kono
parents: 67
diff changeset
474 %{!static-pie: \
kono
parents: 67
diff changeset
475 %{rdynamic:-export-dynamic} \
kono
parents: 67
diff changeset
476 -dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "}}} \
kono
parents: 67
diff changeset
477 %(link_os_extra_spec32)"
kono
parents: 67
diff changeset
478
kono
parents: 67
diff changeset
479 #define LINK_OS_LINUX_SPEC64 LINK_OS_LINUX_EMUL64 " %{!shared: %{!static: \
kono
parents: 67
diff changeset
480 %{!static-pie: \
kono
parents: 67
diff changeset
481 %{rdynamic:-export-dynamic} \
kono
parents: 67
diff changeset
482 -dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "}}} \
kono
parents: 67
diff changeset
483 %(link_os_extra_spec64)"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
484
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
485 #undef TOC_SECTION_ASM_OP
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
486 #define TOC_SECTION_ASM_OP \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
487 (TARGET_64BIT \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
488 ? "\t.section\t\".toc\",\"aw\"" \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
489 : "\t.section\t\".got\",\"aw\"")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
490
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
491 #undef MINIMAL_TOC_SECTION_ASM_OP
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
492 #define MINIMAL_TOC_SECTION_ASM_OP \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
493 (TARGET_64BIT \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
494 ? "\t.section\t\".toc1\",\"aw\"" \
111
kono
parents: 67
diff changeset
495 : (flag_pic \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
496 ? "\t.section\t\".got2\",\"aw\"" \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
497 : "\t.section\t\".got1\",\"aw\""))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
498
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
499 /* Must be at least as big as our pointer type. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
500 #undef SIZE_TYPE
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
501 #define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
502
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
503 #undef PTRDIFF_TYPE
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
504 #define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
505
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
506 #undef WCHAR_TYPE
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
507 #define WCHAR_TYPE (TARGET_64BIT ? "int" : "long int")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
508 #undef WCHAR_TYPE_SIZE
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
509 #define WCHAR_TYPE_SIZE 32
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
510
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
511 #undef RS6000_MCOUNT
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
512 #define RS6000_MCOUNT "_mcount"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
513
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
514 #ifdef __powerpc64__
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
515 /* _init and _fini functions are built from bits spread across many
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
516 object files, each potentially with a different TOC pointer. For
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
517 that reason, place a nop after the call so that the linker can
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
518 restore the TOC pointer if a TOC adjusting call stub is needed. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
519 #if DOT_SYMBOLS
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
520 #define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
521 asm (SECTION_OP "\n" \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
522 " bl ." #FUNC "\n" \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
523 " nop\n" \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
524 " .previous");
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
525 #else
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
526 #define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
527 asm (SECTION_OP "\n" \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
528 " bl " #FUNC "\n" \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
529 " nop\n" \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
530 " .previous");
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
531 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
532 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
533
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
534 /* FP save and restore routines. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
535 #undef SAVE_FP_PREFIX
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
536 #define SAVE_FP_PREFIX (TARGET_64BIT ? "._savef" : "_savefpr_")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
537 #undef SAVE_FP_SUFFIX
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
538 #define SAVE_FP_SUFFIX ""
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
539 #undef RESTORE_FP_PREFIX
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
540 #define RESTORE_FP_PREFIX (TARGET_64BIT ? "._restf" : "_restfpr_")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
541 #undef RESTORE_FP_SUFFIX
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
542 #define RESTORE_FP_SUFFIX ""
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
543
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
544 /* Dwarf2 debugging. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
545 #undef PREFERRED_DEBUGGING_TYPE
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
546 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
547
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
548 /* This is how to declare the size of a function. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
549 #undef ASM_DECLARE_FUNCTION_SIZE
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
550 #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
551 do \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
552 { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
553 if (!flag_inhibit_size_directive) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
554 { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
555 fputs ("\t.size\t", (FILE)); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
556 if (TARGET_64BIT && DOT_SYMBOLS) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
557 putc ('.', (FILE)); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
558 assemble_name ((FILE), (FNAME)); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
559 fputs (",.-", (FILE)); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
560 rs6000_output_function_entry (FILE, FNAME); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
561 putc ('\n', (FILE)); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
562 } \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
563 } \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
564 while (0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
565
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
566 /* Return nonzero if this entry is to be written into the constant
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
567 pool in a special way. We do so if this is a SYMBOL_REF, LABEL_REF
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
568 or a CONST containing one of them. If -mfp-in-toc (the default),
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
569 we also do this for floating-point constants. We actually can only
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
570 do this if the FP formats of the target and host machines are the
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
571 same, but we can't check that since not every file that uses
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
572 the macros includes real.h. We also do this when we can write the
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
573 entry into the TOC and the entry is not larger than a TOC entry. */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
574
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
575 #undef ASM_OUTPUT_SPECIAL_POOL_ENTRY_P
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
576 #define ASM_OUTPUT_SPECIAL_POOL_ENTRY_P(X, MODE) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
577 (TARGET_TOC \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
578 && (GET_CODE (X) == SYMBOL_REF \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
579 || (GET_CODE (X) == CONST && GET_CODE (XEXP (X, 0)) == PLUS \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
580 && GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
581 || GET_CODE (X) == LABEL_REF \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
582 || (GET_CODE (X) == CONST_INT \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
583 && GET_MODE_BITSIZE (MODE) <= GET_MODE_BITSIZE (Pmode)) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
584 || (GET_CODE (X) == CONST_DOUBLE \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
585 && ((TARGET_64BIT \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
586 && (TARGET_MINIMAL_TOC \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
587 || (SCALAR_FLOAT_MODE_P (GET_MODE (X)) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
588 && ! TARGET_NO_FP_IN_TOC))) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
589 || (!TARGET_64BIT \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
590 && !TARGET_NO_FP_IN_TOC \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
591 && SCALAR_FLOAT_MODE_P (GET_MODE (X)) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
592 && BITS_PER_WORD == HOST_BITS_PER_INT)))))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
593
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
594 /* Select a format to encode pointers in exception handling data. CODE
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
595 is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
596 true if the symbol may be affected by dynamic relocations. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
597 #undef ASM_PREFERRED_EH_DATA_FORMAT
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
598 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \
111
kono
parents: 67
diff changeset
599 (TARGET_64BIT || flag_pic \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
600 ? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
601 | (TARGET_64BIT ? DW_EH_PE_udata8 : DW_EH_PE_sdata4)) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
602 : DW_EH_PE_absptr)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
603
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
604 /* For backward compatibility, we must continue to use the AIX
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
605 structure return convention. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
606 #undef DRAFT_V4_STRUCT_RET
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
607 #define DRAFT_V4_STRUCT_RET (!TARGET_64BIT)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
608
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
609 #ifdef TARGET_LIBC_PROVIDES_SSP
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
610 /* ppc32 glibc provides __stack_chk_guard in -0x7008(2),
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
611 ppc64 glibc provides it at -0x7010(13). */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
612 #define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? -0x7010 : -0x7008)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
613 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
614
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
615 #define POWERPC_LINUX
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
616
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
617 /* ppc{32,64} linux has 128-bit long double support in glibc 2.4 and later. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
618 #ifdef TARGET_DEFAULT_LONG_DOUBLE_128
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
619 #define RS6000_DEFAULT_LONG_DOUBLE_SIZE 128
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
620 #endif
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
621
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
622 /* Static stack checking is supported by means of probes. */
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
623 #define STACK_CHECK_STATIC_BUILTIN 1
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
624
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
625 /* The default value isn't sufficient in 64-bit mode. */
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
626 #define STACK_CHECK_PROTECT (TARGET_64BIT ? 16 * 1024 : 12 * 1024)
111
kono
parents: 67
diff changeset
627
kono
parents: 67
diff changeset
628 /* Software floating point support for exceptions and rounding modes
kono
parents: 67
diff changeset
629 depends on the C library in use. */
kono
parents: 67
diff changeset
630 #undef TARGET_FLOAT_EXCEPTIONS_ROUNDING_SUPPORTED_P
kono
parents: 67
diff changeset
631 #define TARGET_FLOAT_EXCEPTIONS_ROUNDING_SUPPORTED_P \
kono
parents: 67
diff changeset
632 rs6000_linux_float_exceptions_rounding_supported_p
kono
parents: 67
diff changeset
633
kono
parents: 67
diff changeset
634 /* Support for TARGET_ATOMIC_ASSIGN_EXPAND_FENV without FPRs depends
kono
parents: 67
diff changeset
635 on glibc 2.19 or greater. */
kono
parents: 67
diff changeset
636 #if TARGET_GLIBC_MAJOR > 2 \
kono
parents: 67
diff changeset
637 || (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 19)
kono
parents: 67
diff changeset
638 #define RS6000_GLIBC_ATOMIC_FENV 1
kono
parents: 67
diff changeset
639 #endif
kono
parents: 67
diff changeset
640
kono
parents: 67
diff changeset
641 /* The IEEE 128-bit emulator is only built on Linux systems. Flag that we
kono
parents: 67
diff changeset
642 should enable the type handling for KFmode on VSX systems even if we are not
kono
parents: 67
diff changeset
643 enabling the __float128 keyword. */
kono
parents: 67
diff changeset
644 #undef TARGET_FLOAT128_ENABLE_TYPE
kono
parents: 67
diff changeset
645 #define TARGET_FLOAT128_ENABLE_TYPE 1