xref: /dflybsd-src/contrib/gcc-4.7/gcc/config/i386/i386-modes.def (revision 04febcfb30580676d3e95f58a16c5137ee478b32)
1*e4b17023SJohn Marino/* Definitions of target machine for GCC for IA-32.
2*e4b17023SJohn Marino   Copyright (C) 2002, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
3*e4b17023SJohn Marino
4*e4b17023SJohn MarinoThis file is part of GCC.
5*e4b17023SJohn Marino
6*e4b17023SJohn MarinoGCC is free software; you can redistribute it and/or modify
7*e4b17023SJohn Marinoit under the terms of the GNU General Public License as published by
8*e4b17023SJohn Marinothe Free Software Foundation; either version 3, or (at your option)
9*e4b17023SJohn Marinoany later version.
10*e4b17023SJohn Marino
11*e4b17023SJohn MarinoGCC is distributed in the hope that it will be useful,
12*e4b17023SJohn Marinobut WITHOUT ANY WARRANTY; without even the implied warranty of
13*e4b17023SJohn MarinoMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14*e4b17023SJohn MarinoGNU General Public License for more details.
15*e4b17023SJohn Marino
16*e4b17023SJohn MarinoYou should have received a copy of the GNU General Public License
17*e4b17023SJohn Marinoalong with GCC; see the file COPYING3.  If not see
18*e4b17023SJohn Marino<http://www.gnu.org/licenses/>.  */
19*e4b17023SJohn Marino
20*e4b17023SJohn Marino/* The x86_64 ABI specifies both XF and TF modes.
21*e4b17023SJohn Marino   XFmode is __float80 is IEEE extended; TFmode is __float128
22*e4b17023SJohn Marino   is IEEE quad.  */
23*e4b17023SJohn Marino
24*e4b17023SJohn MarinoFRACTIONAL_FLOAT_MODE (XF, 80, 12, ieee_extended_intel_96_format);
25*e4b17023SJohn MarinoFLOAT_MODE (TF, 16, ieee_quad_format);
26*e4b17023SJohn Marino
27*e4b17023SJohn Marino/* In ILP32 mode, XFmode has size 12 and alignment 4.
28*e4b17023SJohn Marino   In LP64 mode, XFmode has size and alignment 16.  */
29*e4b17023SJohn MarinoADJUST_FLOAT_FORMAT (XF, (TARGET_128BIT_LONG_DOUBLE
30*e4b17023SJohn Marino			  ? &ieee_extended_intel_128_format
31*e4b17023SJohn Marino			  : TARGET_96_ROUND_53_LONG_DOUBLE
32*e4b17023SJohn Marino			  ? &ieee_extended_intel_96_round_53_format
33*e4b17023SJohn Marino			  : &ieee_extended_intel_96_format));
34*e4b17023SJohn MarinoADJUST_BYTESIZE  (XF, TARGET_128BIT_LONG_DOUBLE ? 16 : 12);
35*e4b17023SJohn MarinoADJUST_ALIGNMENT (XF, TARGET_128BIT_LONG_DOUBLE ? 16 : 4);
36*e4b17023SJohn Marino
37*e4b17023SJohn Marino/* Add any extra modes needed to represent the condition code.
38*e4b17023SJohn Marino
39*e4b17023SJohn Marino   For the i386, we need separate modes when floating-point
40*e4b17023SJohn Marino   equality comparisons are being done.
41*e4b17023SJohn Marino
42*e4b17023SJohn Marino   Add CCNO to indicate comparisons against zero that requires
43*e4b17023SJohn Marino   Overflow flag to be unset.  Sign bit test is used instead and
44*e4b17023SJohn Marino   thus can be used to form "a&b>0" type of tests.
45*e4b17023SJohn Marino
46*e4b17023SJohn Marino   Add CCGC to indicate comparisons against zero that allows
47*e4b17023SJohn Marino   unspecified garbage in the Carry flag.  This mode is used
48*e4b17023SJohn Marino   by inc/dec instructions.
49*e4b17023SJohn Marino
50*e4b17023SJohn Marino   Add CCGOC to indicate comparisons against zero that allows
51*e4b17023SJohn Marino   unspecified garbage in the Carry and Overflow flag. This
52*e4b17023SJohn Marino   mode is used to simulate comparisons of (a-b) and (a+b)
53*e4b17023SJohn Marino   against zero using sub/cmp/add operations.
54*e4b17023SJohn Marino
55*e4b17023SJohn Marino   Add CCA to indicate that only the Above flag is valid.
56*e4b17023SJohn Marino   Add CCC to indicate that only the Carry flag is valid.
57*e4b17023SJohn Marino   Add CCO to indicate that only the Overflow flag is valid.
58*e4b17023SJohn Marino   Add CCS to indicate that only the Sign flag is valid.
59*e4b17023SJohn Marino   Add CCZ to indicate that only the Zero flag is valid.  */
60*e4b17023SJohn Marino
61*e4b17023SJohn MarinoCC_MODE (CCGC);
62*e4b17023SJohn MarinoCC_MODE (CCGOC);
63*e4b17023SJohn MarinoCC_MODE (CCNO);
64*e4b17023SJohn MarinoCC_MODE (CCA);
65*e4b17023SJohn MarinoCC_MODE (CCC);
66*e4b17023SJohn MarinoCC_MODE (CCO);
67*e4b17023SJohn MarinoCC_MODE (CCS);
68*e4b17023SJohn MarinoCC_MODE (CCZ);
69*e4b17023SJohn MarinoCC_MODE (CCFP);
70*e4b17023SJohn MarinoCC_MODE (CCFPU);
71*e4b17023SJohn Marino
72*e4b17023SJohn Marino/* Vector modes.  Note that VEC_CONCAT patterns require vector
73*e4b17023SJohn Marino   sizes twice as big as implemented in hardware.  */
74*e4b17023SJohn MarinoVECTOR_MODES (INT, 4);        /*              V4QI V2HI */
75*e4b17023SJohn MarinoVECTOR_MODES (INT, 8);        /*         V8QI V4HI V2SI */
76*e4b17023SJohn MarinoVECTOR_MODES (INT, 16);       /*   V16QI V8HI V4SI V2DI */
77*e4b17023SJohn MarinoVECTOR_MODES (INT, 32);       /*  V32QI V16HI V8SI V4DI */
78*e4b17023SJohn MarinoVECTOR_MODES (INT, 64);       /* V64QI V32HI V16SI V8DI */
79*e4b17023SJohn MarinoVECTOR_MODES (FLOAT, 8);      /*              V4HF V2SF */
80*e4b17023SJohn MarinoVECTOR_MODES (FLOAT, 16);     /*         V8HF V4SF V2DF */
81*e4b17023SJohn MarinoVECTOR_MODES (FLOAT, 32);     /*        V16HF V8SF V4DF */
82*e4b17023SJohn MarinoVECTOR_MODES (FLOAT, 64);     /*       V32HF V16SF V8DF */
83*e4b17023SJohn MarinoVECTOR_MODE (INT, TI, 1);     /*                   V1TI */
84*e4b17023SJohn MarinoVECTOR_MODE (INT, DI, 1);     /*                   V1DI */
85*e4b17023SJohn MarinoVECTOR_MODE (INT, SI, 1);     /*                   V1SI */
86*e4b17023SJohn MarinoVECTOR_MODE (INT, QI, 2);     /*                   V2QI */
87*e4b17023SJohn Marino
88*e4b17023SJohn MarinoINT_MODE (OI, 32);
89*e4b17023SJohn Marino
90*e4b17023SJohn Marino/* The symbol Pmode stands for one of the above machine modes (usually SImode).
91*e4b17023SJohn Marino   The tm.h file specifies which one.  It is not a distinct mode.  */
92