Debian Codegraph @

gcc/config/rs6000/rs6000-opts.h

raw
1 /* Definitions of target machine needed for option handling for GNU compiler,
2 for IBM RS/6000.
3 Copyright (C) 2010-2025 Free Software Foundation, Inc.
4 Contributed by Michael Meissner ([email protected])
5
6 This file is part of GCC.
7
8 GCC is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published
10 by the Free Software Foundation; either version 3, or (at your
11 option) any later version.
12
13 GCC is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
16 License for more details.
17
18 Under Section 7 of GPL version 3, you are granted additional
19 permissions described in the GCC Runtime Library Exception, version
20 3.1, as published by the Free Software Foundation.
21
22 You should have received a copy of the GNU General Public License and
23 a copy of the GCC Runtime Library Exception along with this program;
24 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
25 <http://www.gnu.org/licenses/>. */
26
27 #ifndef RS6000_OPTS_H
28 #define RS6000_OPTS_H
29
30 /* Processor type. Order must match cpu attribute in MD file. */
31 enum processor_type
32 {
33 PROCESSOR_PPC601,
34 PROCESSOR_PPC603,
35 PROCESSOR_PPC604,
36 PROCESSOR_PPC604e,
37 PROCESSOR_PPC620,
38 PROCESSOR_PPC630,
39
40 PROCESSOR_PPC750,
41 PROCESSOR_PPC7400,
42 PROCESSOR_PPC7450,
43
44 PROCESSOR_PPC403,
45 PROCESSOR_PPC405,
46 PROCESSOR_PPC440,
47 PROCESSOR_PPC476,
48
49 PROCESSOR_PPC8540,
50 PROCESSOR_PPC8548,
51 PROCESSOR_PPCE300C2,
52 PROCESSOR_PPCE300C3,
53 PROCESSOR_PPCE500MC,
54 PROCESSOR_PPCE500MC64,
55 PROCESSOR_PPCE5500,
56 PROCESSOR_PPCE6500,
57
58 PROCESSOR_POWER4,
59 PROCESSOR_POWER5,
60 PROCESSOR_POWER6,
61 PROCESSOR_POWER7,
62 PROCESSOR_POWER8,
63 PROCESSOR_POWER9,
64 PROCESSOR_POWER10,
65 PROCESSOR_POWER11,
66
67 PROCESSOR_RS64A,
68 PROCESSOR_MPCCORE,
69 PROCESSOR_CELL,
70 PROCESSOR_PPCA2,
71 PROCESSOR_TITAN
72 };
73
74
75 /* Types of costly dependences. */
76 enum rs6000_dependence_cost
77 {
78 max_dep_latency = 1000,
79 no_dep_costly,
80 all_deps_costly,
81 true_store_to_load_dep_costly,
82 store_to_load_dep_costly
83 };
84
85 /* Types of nop insertion schemes in sched target hook sched_finish. */
86 enum rs6000_nop_insertion
87 {
88 sched_finish_regroup_exact = 1000,
89 sched_finish_pad_groups,
90 sched_finish_none
91 };
92
93 /* Dispatch group termination caused by an insn. */
94 enum group_termination
95 {
96 current_group,
97 previous_group
98 };
99
100 /* Enumeration to give which calling sequence to use. */
101 enum rs6000_abi {
102 ABI_NONE,
103 ABI_AIX, /* IBM's AIX, or Linux ELFv1 */
104 ABI_ELFv2, /* Linux ELFv2 ABI */
105 ABI_V4, /* System V.4/eabi */
106 ABI_DARWIN /* Apple's Darwin (OS X kernel) */
107 };
108
109 /* Small data support types. */
110 enum rs6000_sdata_type {
111 SDATA_NONE, /* No small data support. */
112 SDATA_DATA, /* Just put data in .sbss/.sdata, don't use relocs. */
113 SDATA_SYSV, /* Use r13 to point to .sdata/.sbss. */
114 SDATA_EABI /* Use r13 like above, r2 points to .sdata2/.sbss2. */
115 };
116
117 /* Type of traceback to use. */
118 enum rs6000_traceback_type {
119 traceback_default = 0,
120 traceback_none,
121 traceback_part,
122 traceback_full
123 };
124
125 /* Code model for 64-bit linux.
126 small: 16-bit toc offsets.
127 medium: 32-bit toc offsets, static data and code within 2G of TOC pointer.
128 large: 32-bit toc offsets, no limit on static data and code. */
129 enum rs6000_cmodel {
130 CMODEL_SMALL,
131 CMODEL_MEDIUM,
132 CMODEL_LARGE
133 };
134
135 /* Describe which vector unit to use for a given machine mode. The
136 VECTOR_MEM_* and VECTOR_UNIT_* macros assume that Altivec, VSX, and
137 P8_VECTOR are contiguous. */
138 enum rs6000_vector {
139 VECTOR_NONE, /* Type is not a vector or not supported */
140 VECTOR_ALTIVEC, /* Use altivec for vector processing */
141 VECTOR_VSX, /* Use VSX for vector processing */
142 VECTOR_P8_VECTOR /* Use ISA 2.07 VSX for vector processing */
143 };
144
145 /* Where to get the canary for the stack protector. */
146 enum stack_protector_guard {
147 SSP_TLS, /* per-thread canary in TLS block */
148 SSP_GLOBAL /* global canary */
149 };
150
151 /* No enumeration is defined to index the -mcpu= values (entries in
152 processor_target_table), with the type int being used instead, but
153 we need to distinguish the special "native" value. */
154 #define RS6000_CPU_OPTION_NATIVE -1
155
156 #endif