]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/fixed-value.h
[Ada] Avoid "others => <>" association in resolved record aggregates
[thirdparty/gcc.git] / gcc / fixed-value.h
index 5ffe67ca87a4742327bb9393b78a9963ba816d2a..81af948ce5727d62ce4a974eeb8b6a0b4af8671c 100644 (file)
@@ -1,5 +1,5 @@
 /* Fixed-point arithmetic support.
-   Copyright (C) 2006-2013 Free Software Foundation, Inc.
+   Copyright (C) 2006-2020 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -20,14 +20,10 @@ along with GCC; see the file COPYING3.  If not see
 #ifndef GCC_FIXED_VALUE_H
 #define GCC_FIXED_VALUE_H
 
-#include "machmode.h"
-#include "real.h"
-#include "double-int.h"
-
 struct GTY(()) fixed_value
 {
-  double_int data;             /* Store data up to 2 wide integers.  */
-  enum machine_mode mode;      /* Use machine mode to know IBIT and FBIT.  */
+  double_int data;       /* Store data up to 2 wide integers.  */
+  scalar_mode_pod mode;  /* Use machine mode to know IBIT and FBIT.  */
 };
 
 #define FIXED_VALUE_TYPE struct fixed_value
@@ -47,18 +43,17 @@ extern FIXED_VALUE_TYPE fconst1[MAX_FCONST1];
 /* Return a CONST_FIXED with value R and mode M.  */
 #define CONST_FIXED_FROM_FIXED_VALUE(r, m) \
   const_fixed_from_fixed_value (r, m)
-extern rtx const_fixed_from_fixed_value (FIXED_VALUE_TYPE, enum machine_mode);
+extern rtx const_fixed_from_fixed_value (FIXED_VALUE_TYPE, machine_mode);
 
 /* Construct a FIXED_VALUE from a bit payload and machine mode MODE.
-   The bits in PAYLOAD are used verbatim.  */
-extern FIXED_VALUE_TYPE fixed_from_double_int (double_int,
-                                                    enum machine_mode);
+   The bits in PAYLOAD are sign-extended/zero-extended according to MODE.  */
+extern FIXED_VALUE_TYPE fixed_from_double_int (double_int, scalar_mode);
 
 /* Return a CONST_FIXED from a bit payload and machine mode MODE.
-   The bits in PAYLOAD are used verbatim.  */
+   The bits in PAYLOAD are sign-extended/zero-extended according to MODE.  */
 static inline rtx
 const_fixed_from_double_int (double_int payload,
-                             enum machine_mode mode)
+                            scalar_mode mode)
 {
   return
     const_fixed_from_fixed_value (fixed_from_double_int (payload, mode),
@@ -67,25 +62,25 @@ const_fixed_from_double_int (double_int payload,
 
 /* Initialize from a decimal or hexadecimal string.  */
 extern void fixed_from_string (FIXED_VALUE_TYPE *, const char *,
-                              enum machine_mode);
+                              scalar_mode);
 
 /* In tree.c: wrap up a FIXED_VALUE_TYPE in a tree node.  */
 extern tree build_fixed (tree, FIXED_VALUE_TYPE);
 
 /* Extend or truncate to a new mode.  */
-extern bool fixed_convert (FIXED_VALUE_TYPE *, enum machine_mode,
+extern bool fixed_convert (FIXED_VALUE_TYPE *, scalar_mode,
                           const FIXED_VALUE_TYPE *, bool);
 
 /* Convert to a fixed-point mode from an integer.  */
-extern bool fixed_convert_from_int (FIXED_VALUE_TYPE *, enum machine_mode,
+extern bool fixed_convert_from_int (FIXED_VALUE_TYPE *, scalar_mode,
                                    double_int, bool, bool);
 
 /* Convert to a fixed-point mode from a real.  */
-extern bool fixed_convert_from_real (FIXED_VALUE_TYPE *, enum machine_mode,
+extern bool fixed_convert_from_real (FIXED_VALUE_TYPE *, scalar_mode,
                                     const REAL_VALUE_TYPE *, bool);
 
 /* Convert to a real mode from a fixed-point.  */
-extern void real_convert_from_fixed (REAL_VALUE_TYPE *, enum machine_mode,
+extern void real_convert_from_fixed (REAL_VALUE_TYPE *, scalar_mode,
                                     const FIXED_VALUE_TYPE *);
 
 /* Compare two fixed-point objects for bitwise identity.  */