123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- #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;
- machine_mode mode;
- };
- #define FIXED_VALUE_TYPE struct fixed_value
- #define MAX_FCONST0 18
- #define MAX_FCONST1 8
- extern FIXED_VALUE_TYPE fconst0[MAX_FCONST0];
- extern FIXED_VALUE_TYPE fconst1[MAX_FCONST1];
- #define FCONST0(mode) fconst0[mode - QQmode]
- #define FCONST1(mode) fconst1[mode - HAmode]
- #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, machine_mode);
- extern FIXED_VALUE_TYPE fixed_from_double_int (double_int,
- machine_mode);
- static inline rtx
- const_fixed_from_double_int (double_int payload,
- machine_mode mode)
- {
- return
- const_fixed_from_fixed_value (fixed_from_double_int (payload, mode),
- mode);
- }
- extern void fixed_from_string (FIXED_VALUE_TYPE *, const char *,
- machine_mode);
- extern tree build_fixed (tree, FIXED_VALUE_TYPE);
- extern bool fixed_convert (FIXED_VALUE_TYPE *, machine_mode,
- const FIXED_VALUE_TYPE *, bool);
- extern bool fixed_convert_from_int (FIXED_VALUE_TYPE *, machine_mode,
- double_int, bool, bool);
- extern bool fixed_convert_from_real (FIXED_VALUE_TYPE *, machine_mode,
- const REAL_VALUE_TYPE *, bool);
- extern void real_convert_from_fixed (REAL_VALUE_TYPE *, machine_mode,
- const FIXED_VALUE_TYPE *);
- extern bool fixed_identical (const FIXED_VALUE_TYPE *, const FIXED_VALUE_TYPE *);
- extern unsigned int fixed_hash (const FIXED_VALUE_TYPE *);
- #define FIXED_VALUES_IDENTICAL(x, y) fixed_identical (&(x), &(y))
- #define FIXED_VALUE_NEGATIVE(x) fixed_isneg (&(x))
- extern void fixed_to_decimal (char *str, const FIXED_VALUE_TYPE *, size_t);
- extern bool fixed_arithmetic (FIXED_VALUE_TYPE *, int, const FIXED_VALUE_TYPE *,
- const FIXED_VALUE_TYPE *, bool);
- extern bool fixed_compare (int, const FIXED_VALUE_TYPE *,
- const FIXED_VALUE_TYPE *);
- extern bool fixed_isneg (const FIXED_VALUE_TYPE *);
- #endif
|