Update gcc-50 to SVN version 225979 (gcc-5-branch)
[dragonfly.git] / contrib / gcc-5.0 / gcc / config / i386 / i386-c.c
1 /* Subroutines used for macro/preprocessor support on the ia-32.
2    Copyright (C) 2008-2015 Free Software Foundation, Inc.
3
4 This file is part of GCC.
5
6 GCC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
9 any later version.
10
11 GCC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING3.  If not see
18 <http://www.gnu.org/licenses/>.  */
19
20 #include "config.h"
21 #include "system.h"
22 #include "coretypes.h"
23 #include "tm.h"
24 #include "hash-set.h"
25 #include "machmode.h"
26 #include "vec.h"
27 #include "double-int.h"
28 #include "input.h"
29 #include "alias.h"
30 #include "symtab.h"
31 #include "options.h"
32 #include "wide-int.h"
33 #include "inchash.h"
34 #include "tree.h"
35 #include "tm_p.h"
36 #include "flags.h"
37 #include "c-family/c-common.h"
38 #include "ggc.h"
39 #include "target.h"
40 #include "target-def.h"
41 #include "cpplib.h"
42 #include "c-family/c-pragma.h"
43
44 static bool ix86_pragma_target_parse (tree, tree);
45 static void ix86_target_macros_internal
46   (HOST_WIDE_INT, enum processor_type, enum processor_type, enum fpmath_unit,
47    void (*def_or_undef) (cpp_reader *, const char *));
48
49 \f
50 /* Internal function to either define or undef the appropriate system
51    macros.  */
52 static void
53 ix86_target_macros_internal (HOST_WIDE_INT isa_flag,
54                              enum processor_type arch,
55                              enum processor_type tune,
56                              enum fpmath_unit fpmath,
57                              void (*def_or_undef) (cpp_reader *,
58                                                    const char *))
59 {
60   /* For some of the k6/pentium varients there weren't separate ISA bits to
61      identify which tune/arch flag was passed, so figure it out here.  */
62   size_t arch_len = strlen (ix86_arch_string);
63   size_t tune_len = strlen (ix86_tune_string);
64   int last_arch_char = ix86_arch_string[arch_len - 1];
65   int last_tune_char = ix86_tune_string[tune_len - 1];
66
67   /* Built-ins based on -march=.  */
68   switch (arch)
69     {
70     case PROCESSOR_I386:
71       break;
72     case PROCESSOR_I486:
73       def_or_undef (parse_in, "__i486");
74       def_or_undef (parse_in, "__i486__");
75       break;
76     case PROCESSOR_PENTIUM:
77       def_or_undef (parse_in, "__i586");
78       def_or_undef (parse_in, "__i586__");
79       def_or_undef (parse_in, "__pentium");
80       def_or_undef (parse_in, "__pentium__");
81       if (isa_flag & OPTION_MASK_ISA_MMX)
82         def_or_undef (parse_in, "__pentium_mmx__");
83       break;
84     case PROCESSOR_PENTIUMPRO:
85       def_or_undef (parse_in, "__i686");
86       def_or_undef (parse_in, "__i686__");
87       def_or_undef (parse_in, "__pentiumpro");
88       def_or_undef (parse_in, "__pentiumpro__");
89       break;
90     case PROCESSOR_GEODE:
91       def_or_undef (parse_in, "__geode");
92       def_or_undef (parse_in, "__geode__");
93       break;
94     case PROCESSOR_K6:
95       def_or_undef (parse_in, "__k6");
96       def_or_undef (parse_in, "__k6__");
97       if (last_arch_char == '2')
98         def_or_undef (parse_in, "__k6_2__");
99       else if (last_arch_char == '3')
100         def_or_undef (parse_in, "__k6_3__");
101       else if (isa_flag & OPTION_MASK_ISA_3DNOW)
102         def_or_undef (parse_in, "__k6_3__");
103       break;
104     case PROCESSOR_ATHLON:
105       def_or_undef (parse_in, "__athlon");
106       def_or_undef (parse_in, "__athlon__");
107       if (isa_flag & OPTION_MASK_ISA_SSE)
108         def_or_undef (parse_in, "__athlon_sse__");
109       break;
110     case PROCESSOR_K8:
111       def_or_undef (parse_in, "__k8");
112       def_or_undef (parse_in, "__k8__");
113       break;
114     case PROCESSOR_AMDFAM10:
115       def_or_undef (parse_in, "__amdfam10");
116       def_or_undef (parse_in, "__amdfam10__");
117       break;
118     case PROCESSOR_BDVER1:
119       def_or_undef (parse_in, "__bdver1");
120       def_or_undef (parse_in, "__bdver1__");
121       break;
122     case PROCESSOR_BDVER2:
123       def_or_undef (parse_in, "__bdver2");
124       def_or_undef (parse_in, "__bdver2__");
125       break;
126     case PROCESSOR_BDVER3:
127       def_or_undef (parse_in, "__bdver3");
128       def_or_undef (parse_in, "__bdver3__");
129       break;
130     case PROCESSOR_BDVER4:
131       def_or_undef (parse_in, "__bdver4");
132       def_or_undef (parse_in, "__bdver4__");
133       break;
134     case PROCESSOR_BTVER1:
135       def_or_undef (parse_in, "__btver1");
136       def_or_undef (parse_in, "__btver1__");
137       break;
138     case PROCESSOR_BTVER2:
139       def_or_undef (parse_in, "__btver2");
140       def_or_undef (parse_in, "__btver2__");
141       break;
142     case PROCESSOR_PENTIUM4:
143       def_or_undef (parse_in, "__pentium4");
144       def_or_undef (parse_in, "__pentium4__");
145       break;
146     case PROCESSOR_NOCONA:
147       def_or_undef (parse_in, "__nocona");
148       def_or_undef (parse_in, "__nocona__");
149       break;
150     case PROCESSOR_CORE2:
151       def_or_undef (parse_in, "__core2");
152       def_or_undef (parse_in, "__core2__");
153       break;
154     case PROCESSOR_NEHALEM:
155       def_or_undef (parse_in, "__corei7");
156       def_or_undef (parse_in, "__corei7__");
157       def_or_undef (parse_in, "__nehalem");
158       def_or_undef (parse_in, "__nehalem__");
159       break;
160     case PROCESSOR_SANDYBRIDGE:
161       def_or_undef (parse_in, "__corei7_avx");
162       def_or_undef (parse_in, "__corei7_avx__");
163       def_or_undef (parse_in, "__sandybridge");
164       def_or_undef (parse_in, "__sandybridge__");
165       break;
166     case PROCESSOR_HASWELL:
167       def_or_undef (parse_in, "__core_avx2");
168       def_or_undef (parse_in, "__core_avx2__");
169       def_or_undef (parse_in, "__haswell");
170       def_or_undef (parse_in, "__haswell__");
171       break;
172     case PROCESSOR_BONNELL:
173       def_or_undef (parse_in, "__atom");
174       def_or_undef (parse_in, "__atom__");
175       def_or_undef (parse_in, "__bonnell");
176       def_or_undef (parse_in, "__bonnell__");
177       break;
178     case PROCESSOR_SILVERMONT:
179       def_or_undef (parse_in, "__slm");
180       def_or_undef (parse_in, "__slm__");
181       def_or_undef (parse_in, "__silvermont");
182       def_or_undef (parse_in, "__silvermont__");
183       break;
184     case PROCESSOR_KNL:
185       def_or_undef (parse_in, "__knl");
186       def_or_undef (parse_in, "__knl__");
187       break;
188     /* use PROCESSOR_max to not set/unset the arch macro.  */
189     case PROCESSOR_max:
190       break;
191     case PROCESSOR_INTEL:
192     case PROCESSOR_GENERIC:
193       gcc_unreachable ();
194     }
195
196   /* Built-ins based on -mtune=.  */
197   switch (tune)
198     {
199     case PROCESSOR_I386:
200       def_or_undef (parse_in, "__tune_i386__");
201       break;
202     case PROCESSOR_I486:
203       def_or_undef (parse_in, "__tune_i486__");
204       break;
205     case PROCESSOR_PENTIUM:
206       def_or_undef (parse_in, "__tune_i586__");
207       def_or_undef (parse_in, "__tune_pentium__");
208       if (last_tune_char == 'x')
209         def_or_undef (parse_in, "__tune_pentium_mmx__");
210       break;
211     case PROCESSOR_PENTIUMPRO:
212       def_or_undef (parse_in, "__tune_i686__");
213       def_or_undef (parse_in, "__tune_pentiumpro__");
214       switch (last_tune_char)
215         {
216         case '3':
217           def_or_undef (parse_in, "__tune_pentium3__");
218           /* FALLTHRU */
219         case '2':
220           def_or_undef (parse_in, "__tune_pentium2__");
221           break;
222         }
223       break;
224     case PROCESSOR_GEODE:
225       def_or_undef (parse_in, "__tune_geode__");
226       break;
227     case PROCESSOR_K6:
228       def_or_undef (parse_in, "__tune_k6__");
229       if (last_tune_char == '2')
230         def_or_undef (parse_in, "__tune_k6_2__");
231       else if (last_tune_char == '3')
232         def_or_undef (parse_in, "__tune_k6_3__");
233       else if (isa_flag & OPTION_MASK_ISA_3DNOW)
234         def_or_undef (parse_in, "__tune_k6_3__");
235       break;
236     case PROCESSOR_ATHLON:
237       def_or_undef (parse_in, "__tune_athlon__");
238       if (isa_flag & OPTION_MASK_ISA_SSE)
239         def_or_undef (parse_in, "__tune_athlon_sse__");
240       break;
241     case PROCESSOR_K8:
242       def_or_undef (parse_in, "__tune_k8__");
243       break;
244     case PROCESSOR_AMDFAM10:
245       def_or_undef (parse_in, "__tune_amdfam10__");
246       break;
247     case PROCESSOR_BDVER1:
248       def_or_undef (parse_in, "__tune_bdver1__");
249       break;
250     case PROCESSOR_BDVER2:
251       def_or_undef (parse_in, "__tune_bdver2__");
252       break;
253     case PROCESSOR_BDVER3:
254       def_or_undef (parse_in, "__tune_bdver3__");
255       break;
256     case PROCESSOR_BDVER4:
257       def_or_undef (parse_in, "__tune_bdver4__");
258       break;
259     case PROCESSOR_BTVER1:
260       def_or_undef (parse_in, "__tune_btver1__");
261       break;
262     case PROCESSOR_BTVER2:
263       def_or_undef (parse_in, "__tune_btver2__");
264        break;
265     case PROCESSOR_PENTIUM4:
266       def_or_undef (parse_in, "__tune_pentium4__");
267       break;
268     case PROCESSOR_NOCONA:
269       def_or_undef (parse_in, "__tune_nocona__");
270       break;
271     case PROCESSOR_CORE2:
272       def_or_undef (parse_in, "__tune_core2__");
273       break;
274     case PROCESSOR_NEHALEM:
275       def_or_undef (parse_in, "__tune_corei7__");
276       def_or_undef (parse_in, "__tune_nehalem__");
277       break;
278     case PROCESSOR_SANDYBRIDGE:
279       def_or_undef (parse_in, "__tune_corei7_avx__");
280       def_or_undef (parse_in, "__tune_sandybridge__");
281       break;
282     case PROCESSOR_HASWELL:
283       def_or_undef (parse_in, "__tune_core_avx2__");
284       def_or_undef (parse_in, "__tune_haswell__");
285       break;
286     case PROCESSOR_BONNELL:
287       def_or_undef (parse_in, "__tune_atom__");
288       def_or_undef (parse_in, "__tune_bonnell__");
289       break;
290     case PROCESSOR_SILVERMONT:
291       def_or_undef (parse_in, "__tune_slm__");
292       def_or_undef (parse_in, "__tune_silvermont__");
293       break;
294     case PROCESSOR_KNL:
295       def_or_undef (parse_in, "__tune_knl__");
296       break;
297     case PROCESSOR_INTEL:
298     case PROCESSOR_GENERIC:
299       break;
300     /* use PROCESSOR_max to not set/unset the tune macro.  */
301     case PROCESSOR_max:
302       break;
303     }
304
305   switch (ix86_cmodel)
306     {
307     case CM_SMALL:
308     case CM_SMALL_PIC:
309       def_or_undef (parse_in, "__code_model_small__");
310       break;
311     case CM_MEDIUM:
312     case CM_MEDIUM_PIC:
313       def_or_undef (parse_in, "__code_model_medium__");
314       break;
315     case CM_LARGE:
316     case CM_LARGE_PIC:
317       def_or_undef (parse_in, "__code_model_large__");
318       break;
319     case CM_32:
320       def_or_undef (parse_in, "__code_model_32__");
321       break;
322     case CM_KERNEL:
323       def_or_undef (parse_in, "__code_model_kernel__");
324       break;
325     default:
326       ;
327     }
328
329   if (isa_flag & OPTION_MASK_ISA_MMX)
330     def_or_undef (parse_in, "__MMX__");
331   if (isa_flag & OPTION_MASK_ISA_3DNOW)
332     def_or_undef (parse_in, "__3dNOW__");
333   if (isa_flag & OPTION_MASK_ISA_3DNOW_A)
334     def_or_undef (parse_in, "__3dNOW_A__");
335   if (isa_flag & OPTION_MASK_ISA_SSE)
336     def_or_undef (parse_in, "__SSE__");
337   if (isa_flag & OPTION_MASK_ISA_SSE2)
338     def_or_undef (parse_in, "__SSE2__");
339   if (isa_flag & OPTION_MASK_ISA_SSE3)
340     def_or_undef (parse_in, "__SSE3__");
341   if (isa_flag & OPTION_MASK_ISA_SSSE3)
342     def_or_undef (parse_in, "__SSSE3__");
343   if (isa_flag & OPTION_MASK_ISA_SSE4_1)
344     def_or_undef (parse_in, "__SSE4_1__");
345   if (isa_flag & OPTION_MASK_ISA_SSE4_2)
346     def_or_undef (parse_in, "__SSE4_2__");
347   if (isa_flag & OPTION_MASK_ISA_AES)
348     def_or_undef (parse_in, "__AES__");
349   if (isa_flag & OPTION_MASK_ISA_SHA)
350     def_or_undef (parse_in, "__SHA__");
351   if (isa_flag & OPTION_MASK_ISA_PCLMUL)
352     def_or_undef (parse_in, "__PCLMUL__");
353   if (isa_flag & OPTION_MASK_ISA_AVX)
354     def_or_undef (parse_in, "__AVX__");
355   if (isa_flag & OPTION_MASK_ISA_AVX2)
356     def_or_undef (parse_in, "__AVX2__");
357   if (isa_flag & OPTION_MASK_ISA_AVX512F)
358     def_or_undef (parse_in, "__AVX512F__");
359   if (isa_flag & OPTION_MASK_ISA_AVX512ER)
360     def_or_undef (parse_in, "__AVX512ER__");
361   if (isa_flag & OPTION_MASK_ISA_AVX512CD)
362     def_or_undef (parse_in, "__AVX512CD__");
363   if (isa_flag & OPTION_MASK_ISA_AVX512PF)
364     def_or_undef (parse_in, "__AVX512PF__");
365   if (isa_flag & OPTION_MASK_ISA_AVX512DQ)
366     def_or_undef (parse_in, "__AVX512DQ__");
367   if (isa_flag & OPTION_MASK_ISA_AVX512BW)
368     def_or_undef (parse_in, "__AVX512BW__");
369   if (isa_flag & OPTION_MASK_ISA_AVX512VL)
370     def_or_undef (parse_in, "__AVX512VL__");
371   if (isa_flag & OPTION_MASK_ISA_AVX512VBMI)
372     def_or_undef (parse_in, "__AVX512VBMI__");
373   if (isa_flag & OPTION_MASK_ISA_AVX512IFMA)
374     def_or_undef (parse_in, "__AVX512IFMA__");
375   if (isa_flag & OPTION_MASK_ISA_FMA)
376     def_or_undef (parse_in, "__FMA__");
377   if (isa_flag & OPTION_MASK_ISA_RTM)
378     def_or_undef (parse_in, "__RTM__");
379   if (isa_flag & OPTION_MASK_ISA_SSE4A)
380     def_or_undef (parse_in, "__SSE4A__");
381   if (isa_flag & OPTION_MASK_ISA_FMA4)
382     def_or_undef (parse_in, "__FMA4__");
383   if (isa_flag & OPTION_MASK_ISA_XOP)
384     def_or_undef (parse_in, "__XOP__");
385   if (isa_flag & OPTION_MASK_ISA_LWP)
386     def_or_undef (parse_in, "__LWP__");
387   if (isa_flag & OPTION_MASK_ISA_ABM)
388     def_or_undef (parse_in, "__ABM__");
389   if (isa_flag & OPTION_MASK_ISA_BMI)
390     def_or_undef (parse_in, "__BMI__");
391   if (isa_flag & OPTION_MASK_ISA_BMI2)
392     def_or_undef (parse_in, "__BMI2__");
393   if (isa_flag & OPTION_MASK_ISA_LZCNT)
394     def_or_undef (parse_in, "__LZCNT__");
395   if (isa_flag & OPTION_MASK_ISA_TBM)
396     def_or_undef (parse_in, "__TBM__");
397   if (isa_flag & OPTION_MASK_ISA_POPCNT)
398     def_or_undef (parse_in, "__POPCNT__");
399   if (isa_flag & OPTION_MASK_ISA_FSGSBASE)
400     def_or_undef (parse_in, "__FSGSBASE__");
401   if (isa_flag & OPTION_MASK_ISA_RDRND)
402     def_or_undef (parse_in, "__RDRND__");
403   if (isa_flag & OPTION_MASK_ISA_F16C)
404     def_or_undef (parse_in, "__F16C__");
405   if (isa_flag & OPTION_MASK_ISA_RDSEED)
406     def_or_undef (parse_in, "__RDSEED__");
407   if (isa_flag & OPTION_MASK_ISA_PRFCHW)
408     def_or_undef (parse_in, "__PRFCHW__");
409   if (isa_flag & OPTION_MASK_ISA_ADX)
410     def_or_undef (parse_in, "__ADX__");
411   if (isa_flag & OPTION_MASK_ISA_FXSR)
412     def_or_undef (parse_in, "__FXSR__");
413   if (isa_flag & OPTION_MASK_ISA_XSAVE)
414     def_or_undef (parse_in, "__XSAVE__");
415   if (isa_flag & OPTION_MASK_ISA_XSAVEOPT)
416     def_or_undef (parse_in, "__XSAVEOPT__");
417   if (isa_flag & OPTION_MASK_ISA_PREFETCHWT1)
418     def_or_undef (parse_in, "__PREFETCHWT1__");
419   if ((fpmath & FPMATH_SSE) && (isa_flag & OPTION_MASK_ISA_SSE))
420     def_or_undef (parse_in, "__SSE_MATH__");
421   if ((fpmath & FPMATH_SSE) && (isa_flag & OPTION_MASK_ISA_SSE2))
422     def_or_undef (parse_in, "__SSE2_MATH__");
423   if (isa_flag & OPTION_MASK_ISA_CLFLUSHOPT)
424     def_or_undef (parse_in, "__CLFLUSHOPT__");
425   if (isa_flag & OPTION_MASK_ISA_XSAVEC)
426     def_or_undef (parse_in, "__XSAVEC__");
427   if (isa_flag & OPTION_MASK_ISA_XSAVES)
428     def_or_undef (parse_in, "__XSAVES__");
429   if (isa_flag & OPTION_MASK_ISA_MPX)
430     def_or_undef (parse_in, "__MPX__");
431   if (isa_flag & OPTION_MASK_ISA_PCOMMIT)
432     def_or_undef (parse_in, "__PCOMMIT__");
433   if (isa_flag & OPTION_MASK_ISA_CLWB)
434     def_or_undef (parse_in, "__CLWB__");
435   if (isa_flag & OPTION_MASK_ISA_MWAITX)
436     def_or_undef (parse_in, "__MWAITX__");
437 }
438
439 \f
440 /* Hook to validate the current #pragma GCC target and set the state, and
441    update the macros based on what was changed.  If ARGS is NULL, then
442    POP_TARGET is used to reset the options.  */
443
444 static bool
445 ix86_pragma_target_parse (tree args, tree pop_target)
446 {
447   tree prev_tree = build_target_option_node (&global_options);
448   tree cur_tree;
449   struct cl_target_option *prev_opt;
450   struct cl_target_option *cur_opt;
451   HOST_WIDE_INT prev_isa;
452   HOST_WIDE_INT cur_isa;
453   HOST_WIDE_INT diff_isa;
454   enum processor_type prev_arch;
455   enum processor_type prev_tune;
456   enum processor_type cur_arch;
457   enum processor_type cur_tune;
458
459   if (! args)
460     {
461       cur_tree = (pop_target ? pop_target : target_option_default_node);
462       cl_target_option_restore (&global_options,
463                                 TREE_TARGET_OPTION (cur_tree));
464     }
465   else
466     {
467       cur_tree = ix86_valid_target_attribute_tree (args, &global_options,
468                                                    &global_options_set);
469       if (!cur_tree || cur_tree == error_mark_node)
470        {
471          cl_target_option_restore (&global_options,
472                                    TREE_TARGET_OPTION (prev_tree));
473          return false;
474        }
475     }
476
477   target_option_current_node = cur_tree;
478   ix86_reset_previous_fndecl ();
479
480   /* Figure out the previous/current isa, arch, tune and the differences.  */
481   prev_opt  = TREE_TARGET_OPTION (prev_tree);
482   cur_opt   = TREE_TARGET_OPTION (cur_tree);
483   prev_isa  = prev_opt->x_ix86_isa_flags;
484   cur_isa   = cur_opt->x_ix86_isa_flags;
485   diff_isa  = (prev_isa ^ cur_isa);
486   prev_arch = (enum processor_type) prev_opt->arch;
487   prev_tune = (enum processor_type) prev_opt->tune;
488   cur_arch  = (enum processor_type) cur_opt->arch;
489   cur_tune  = (enum processor_type) cur_opt->tune;
490
491   /* If the same processor is used for both previous and current options, don't
492      change the macros.  */
493   if (cur_arch == prev_arch)
494     cur_arch = prev_arch = PROCESSOR_max;
495
496   if (cur_tune == prev_tune)
497     cur_tune = prev_tune = PROCESSOR_max;
498
499   /* Undef all of the macros for that are no longer current.  */
500   ix86_target_macros_internal (prev_isa & diff_isa,
501                                prev_arch,
502                                prev_tune,
503                                (enum fpmath_unit) prev_opt->x_ix86_fpmath,
504                                cpp_undef);
505
506   /* For the definitions, ensure all newly defined macros are considered
507      as used for -Wunused-macros.  There is no point warning about the
508      compiler predefined macros.  */
509   cpp_options *cpp_opts = cpp_get_options (parse_in);
510   unsigned char saved_warn_unused_macros = cpp_opts->warn_unused_macros;
511   cpp_opts->warn_unused_macros = 0;
512
513   /* Define all of the macros for new options that were just turned on.  */
514   ix86_target_macros_internal (cur_isa & diff_isa,
515                                cur_arch,
516                                cur_tune,
517                                (enum fpmath_unit) cur_opt->x_ix86_fpmath,
518                                cpp_define);
519
520   cpp_opts->warn_unused_macros = saved_warn_unused_macros;
521
522   return true;
523 }
524 \f
525 /* Function to tell the preprocessor about the defines for the current target.  */
526
527 void
528 ix86_target_macros (void)
529 {
530   /* 32/64-bit won't change with target specific options, so do the assert and
531      builtin_define_std calls here.  */
532   if (TARGET_64BIT)
533     {
534       cpp_assert (parse_in, "cpu=x86_64");
535       cpp_assert (parse_in, "machine=x86_64");
536       cpp_define (parse_in, "__amd64");
537       cpp_define (parse_in, "__amd64__");
538       cpp_define (parse_in, "__x86_64");
539       cpp_define (parse_in, "__x86_64__");
540       if (TARGET_X32)
541         {
542           cpp_define (parse_in, "_ILP32");
543           cpp_define (parse_in, "__ILP32__");
544         }
545     }
546   else
547     {
548       cpp_assert (parse_in, "cpu=i386");
549       cpp_assert (parse_in, "machine=i386");
550       builtin_define_std ("i386");
551     }
552
553   if (!TARGET_80387)
554     cpp_define (parse_in, "_SOFT_FLOAT");
555
556   if (TARGET_LONG_DOUBLE_64)
557     cpp_define (parse_in, "__LONG_DOUBLE_64__");
558
559   if (TARGET_LONG_DOUBLE_128)
560     cpp_define (parse_in, "__LONG_DOUBLE_128__");
561
562   if (TARGET_128BIT_LONG_DOUBLE)
563     cpp_define (parse_in, "__SIZEOF_FLOAT80__=16");
564   else
565     cpp_define (parse_in, "__SIZEOF_FLOAT80__=12");
566
567   cpp_define (parse_in, "__SIZEOF_FLOAT128__=16");
568
569   cpp_define_formatted (parse_in, "__ATOMIC_HLE_ACQUIRE=%d", IX86_HLE_ACQUIRE);
570   cpp_define_formatted (parse_in, "__ATOMIC_HLE_RELEASE=%d", IX86_HLE_RELEASE);
571
572   ix86_target_macros_internal (ix86_isa_flags,
573                                ix86_arch,
574                                ix86_tune,
575                                ix86_fpmath,
576                                cpp_define);
577 }
578
579 \f
580 /* Register target pragmas.  We need to add the hook for parsing #pragma GCC
581    option here rather than in i386.c since it will pull in various preprocessor
582    functions, and those are not present in languages like fortran without a
583    preprocessor.  */
584
585 void
586 ix86_register_pragmas (void)
587 {
588   /* Update pragma hook to allow parsing #pragma GCC target.  */
589   targetm.target_option.pragma_parse = ix86_pragma_target_parse;
590
591 #ifdef REGISTER_SUBTARGET_PRAGMAS
592   REGISTER_SUBTARGET_PRAGMAS ();
593 #endif
594 }