]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/machmode.def
[arm] Fix testsuite nit when compiling for thumb2
[thirdparty/gcc.git] / gcc / machmode.def
index 35337bac37bcffe95d4904ad91c45d3325f139e4..5f0b370227ee80b2fcba87e84d393d2f4dad98a5 100644 (file)
@@ -1,7 +1,6 @@
 /* This file contains the definitions and documentation for the
    machine modes used in the GNU compiler.
-   Copyright (C) 1987, 1992, 1994, 1997, 1998, 2000, 2003, 2004, 2005,
-   2007, 2010, 2011  Free Software Foundation, Inc.
+   Copyright (C) 1987-2019 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -122,11 +121,11 @@ along with GCC; see the file COPYING3.  If not see
        to FORMAT.  Use in an ARCH-modes.def to reset the format
        of one of the float modes defined in this file.
 
-     PARTIAL_INT_MODE (MODE);
+     PARTIAL_INT_MODE (MODE, PRECISION, NAME);
         declares a mode of class PARTIAL_INT with the same size as
-       MODE (which must be an INT mode).  The name of the new mode
-       is made by prefixing a P to the name MODE.  This statement
-       may grow a PRECISION argument in the future.
+       MODE (which must be an INT mode) and precision PREC.
+       Optionally, NAME is the new name of the mode.  NAME is the
+       name of the mode.
 
      VECTOR_MODE (CLASS, MODE, COUNT);
         Declare a vector mode whose component mode is MODE (of class
@@ -143,6 +142,17 @@ along with GCC; see the file COPYING3.  If not see
        than two bytes (if CLASS is FLOAT).  CLASS must be INT or
        FLOAT.  The names follow the same rule as VECTOR_MODE uses.
 
+     VECTOR_MODES_WITH_PREFIX (PREFIX, CLASS, WIDTH);
+       Like VECTOR_MODES, but start the mode names with PREFIX instead
+       of the usual "V".
+
+     VECTOR_BOOL_MODE (NAME, COUNT, BYTESIZE)
+        Create a vector mode called NAME that contains COUNT boolean
+        elements and occupies BYTESIZE bytes in total.  Each boolean
+        element occupies (COUNT * BITS_PER_UNIT) / BYTESIZE bits, with
+        the element at index 0 occupying the lsb of the first byte in
+        memory.  Only the lowest bit of each element is significant.
+
      COMPLEX_MODES (CLASS);
         For all modes presently declared in class CLASS, construct
        corresponding complex modes.  Modes smaller than one byte
@@ -164,6 +174,12 @@ along with GCC; see the file COPYING3.  If not see
        Unlike a FORMAT argument, if you are adjusting a float format
        you must put an & in front of the name of each format structure.
 
+     ADJUST_NUNITS (MODE, EXPR);
+       Like the above, but set the number of nunits of MODE to EXPR.
+       This changes the size and precision of the mode in proportion
+       to the change in the number of units; for example, doubling
+       the number of units doubles the size and precision as well.
+
    Note: If a mode is ever made which is more than 255 bytes wide,
    machmode.h and genmodes.c will have to be changed to allocate
    more space for the mode_size and mode_alignment arrays.  */
@@ -180,8 +196,11 @@ RANDOM_MODE (BLK);
 FRACTIONAL_INT_MODE (BI, 1, 1);
 
 /* Basic integer modes.  We go up to TI in generic code (128 bits).
-   The name OI is reserved for a 256-bit type (needed by some back ends).
-   FIXME TI shouldn't be generically available either.  */
+   TImode is needed here because the some front ends now genericly
+   support __int128.  If the front ends decide to generically support
+   larger types, then corresponding modes must be added here.  The
+   name OI is reserved for a 256-bit type (needed by some back ends).
+    */
 INT_MODE (QI, 1);
 INT_MODE (HI, 2);
 INT_MODE (SI, 4);
@@ -190,6 +209,13 @@ INT_MODE (TI, 16);
 
 /* No partial integer modes are defined by default.  */
 
+/* The target normally defines any target-specific __intN types and
+   their modes, but __int128 for TImode is fairly common so define it
+   here.  The type will not be created unless the target supports
+   TImode.  */
+
+INT_N (TI, 128);
+
 /* Basic floating point modes.  SF and DF are the only modes provided
    by default.  The names QF, HF, XF, and TF are reserved for targets
    that need 1-word, 2-word, 80-bit, or 128-bit float types respectively.
@@ -234,6 +260,7 @@ UACCUM_MODE (UTA, 16, 64, 64); /* 64.64 */
 
 /* Complex modes.  */
 COMPLEX_MODES (INT);
+COMPLEX_MODES (PARTIAL_INT);
 COMPLEX_MODES (FLOAT);
 
 /* Decimal floating point modes.  */