]>
Commit | Line | Data |
---|---|---|
188fc5b5 | 1 | /* Definitions of target machine for GCC for IA-32. |
83ffe9cd | 2 | Copyright (C) 2002-2023 Free Software Foundation, Inc. |
a5381466 | 3 | |
188fc5b5 | 4 | This file is part of GCC. |
a5381466 | 5 | |
188fc5b5 | 6 | GCC is free software; you can redistribute it and/or modify |
a5381466 | 7 | it under the terms of the GNU General Public License as published by |
2f83c7d6 | 8 | the Free Software Foundation; either version 3, or (at your option) |
a5381466 ZW |
9 | any later version. |
10 | ||
188fc5b5 | 11 | GCC is distributed in the hope that it will be useful, |
a5381466 ZW |
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 | |
2f83c7d6 NC |
17 | along with GCC; see the file COPYING3. If not see |
18 | <http://www.gnu.org/licenses/>. */ | |
a5381466 | 19 | |
968a7562 | 20 | /* The x86_64 ABI specifies both XF and TF modes. |
f8a1ebc6 | 21 | XFmode is __float80 is IEEE extended; TFmode is __float128 |
968a7562 | 22 | is IEEE quad. */ |
f8a1ebc6 | 23 | |
968a7562 ZW |
24 | FRACTIONAL_FLOAT_MODE (XF, 80, 12, ieee_extended_intel_96_format); |
25 | FLOAT_MODE (TF, 16, ieee_quad_format); | |
7cbc870c | 26 | FLOAT_MODE (HF, 2, ieee_half_format); |
6624ad73 | 27 | FLOAT_MODE (BF, 2, 0); |
28 | ADJUST_FLOAT_FORMAT (BF, &arm_bfloat_half_format); | |
94134f42 | 29 | |
968a7562 ZW |
30 | /* In ILP32 mode, XFmode has size 12 and alignment 4. |
31 | In LP64 mode, XFmode has size and alignment 16. */ | |
ac3ef3f5 JH |
32 | ADJUST_FLOAT_FORMAT (XF, (TARGET_128BIT_LONG_DOUBLE |
33 | ? &ieee_extended_intel_128_format | |
cc69336f RH |
34 | : TARGET_96_ROUND_53_LONG_DOUBLE |
35 | ? &ieee_extended_intel_96_round_53_format | |
ac3ef3f5 | 36 | : &ieee_extended_intel_96_format)); |
f8a1ebc6 JH |
37 | ADJUST_BYTESIZE (XF, TARGET_128BIT_LONG_DOUBLE ? 16 : 12); |
38 | ADJUST_ALIGNMENT (XF, TARGET_128BIT_LONG_DOUBLE ? 16 : 4); | |
94134f42 | 39 | |
a5381466 ZW |
40 | /* Add any extra modes needed to represent the condition code. |
41 | ||
42 | For the i386, we need separate modes when floating-point | |
43 | equality comparisons are being done. | |
44 | ||
fe944402 | 45 | Add CCNO to indicate comparisons against zero that require |
a5381466 ZW |
46 | Overflow flag to be unset. Sign bit test is used instead and |
47 | thus can be used to form "a&b>0" type of tests. | |
48 | ||
fe944402 | 49 | Add CCGC to indicate comparisons against zero that allow |
a5381466 ZW |
50 | unspecified garbage in the Carry flag. This mode is used |
51 | by inc/dec instructions. | |
52 | ||
fe944402 | 53 | Add CCGOC to indicate comparisons against zero that allow |
a5381466 ZW |
54 | unspecified garbage in the Carry and Overflow flag. This |
55 | mode is used to simulate comparisons of (a-b) and (a+b) | |
56 | against zero using sub/cmp/add operations. | |
57 | ||
fe944402 UB |
58 | Add CCGZ to indicate comparisons that allow unspecified garbage |
59 | in the Zero flag. This mode is used in double-word comparisons. | |
60 | ||
06f4e35d L |
61 | Add CCA to indicate that only the Above flag is valid. |
62 | Add CCC to indicate that only the Carry flag is valid. | |
63 | Add CCO to indicate that only the Overflow flag is valid. | |
afc1c5fa | 64 | Add CCP to indicate that only the Parity flag is valid. |
06f4e35d | 65 | Add CCS to indicate that only the Sign flag is valid. |
a5381466 ZW |
66 | Add CCZ to indicate that only the Zero flag is valid. */ |
67 | ||
94134f42 ZW |
68 | CC_MODE (CCGC); |
69 | CC_MODE (CCGOC); | |
70 | CC_MODE (CCNO); | |
fe944402 | 71 | CC_MODE (CCGZ); |
06f4e35d L |
72 | CC_MODE (CCA); |
73 | CC_MODE (CCC); | |
74 | CC_MODE (CCO); | |
afc1c5fa | 75 | CC_MODE (CCP); |
06f4e35d | 76 | CC_MODE (CCS); |
94134f42 | 77 | CC_MODE (CCZ); |
3f563e0b | 78 | |
94134f42 | 79 | CC_MODE (CCFP); |
49e76be8 | 80 | |
0fac5151 RH |
81 | /* Vector modes. Note that VEC_CONCAT patterns require vector |
82 | sizes twice as big as implemented in hardware. */ | |
83 | VECTOR_MODES (INT, 4); /* V4QI V2HI */ | |
84 | VECTOR_MODES (INT, 8); /* V8QI V4HI V2SI */ | |
85 | VECTOR_MODES (INT, 16); /* V16QI V8HI V4SI V2DI */ | |
86 | VECTOR_MODES (INT, 32); /* V32QI V16HI V8SI V4DI */ | |
87 | VECTOR_MODES (INT, 64); /* V64QI V32HI V16SI V8DI */ | |
3f97cb0b | 88 | VECTOR_MODES (INT, 128); /* V128QI V64HI V32SI V16DI */ |
9e2a82e1 | 89 | VECTOR_MODES (FLOAT, 8); /* V4HF V2SF */ |
90 | VECTOR_MODES (FLOAT, 16); /* V8HF V4SF V2DF */ | |
91 | VECTOR_MODES (FLOAT, 32); /* V16HF V8SF V4DF V2TF */ | |
92 | VECTOR_MODES (FLOAT, 64); /* V32HF V16SF V8DF V4TF */ | |
93 | VECTOR_MODES (FLOAT, 128); /* V64HF V32SF V16DF V8TF */ | |
94 | VECTOR_MODES (FLOAT, 256); /* V128HF V64SF V32DF V16TF */ | |
be0e4c32 | 95 | VECTOR_MODE (FLOAT, HF, 2); /* V2HF */ |
6913cad2 | 96 | VECTOR_MODE (FLOAT, BF, 2); /* V2BF */ |
be0e4c32 | 97 | VECTOR_MODE (FLOAT, HF, 6); /* V6HF */ |
fe6ae2da | 98 | VECTOR_MODE (INT, TI, 1); /* V1TI */ |
0fac5151 RH |
99 | VECTOR_MODE (INT, DI, 1); /* V1DI */ |
100 | VECTOR_MODE (INT, SI, 1); /* V1SI */ | |
101 | VECTOR_MODE (INT, QI, 2); /* V2QI */ | |
4a90ee35 AI |
102 | VECTOR_MODE (INT, QI, 12); /* V12QI */ |
103 | VECTOR_MODE (INT, QI, 14); /* V14QI */ | |
104 | VECTOR_MODE (INT, HI, 6); /* V6HI */ | |
5fbb13a7 | 105 | VECTOR_MODE (INT, SI, 64); /* V64SI */ |
95879c72 L |
106 | |
107 | INT_MODE (OI, 32); | |
3f97cb0b | 108 | INT_MODE (XI, 64); |
49e76be8 | 109 | |
e21b52af HL |
110 | /* Modes needs a consecutive register pair. |
111 | Note that Using PARTIAL_INT_MODE but not INT_MODE is to avoid mode promotion | |
112 | issues. */ | |
113 | PARTIAL_INT_MODE (HI, 16, P2QI); | |
114 | PARTIAL_INT_MODE (SI, 32, P2HI); | |
115 | ||
782e57f2 L |
116 | /* Mode used for signed overflow checking of TImode. For the overflow |
117 | checking we actually need just 1 or 2 bits beyond TImode precision. | |
118 | Use 160 bits to have a multiple of 32. */ | |
c124b345 JJ |
119 | PARTIAL_INT_MODE (OI, 160, POI); |
120 | ||
49e76be8 PB |
121 | /* The symbol Pmode stands for one of the above machine modes (usually SImode). |
122 | The tm.h file specifies which one. It is not a distinct mode. */ |