diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-13 04:50:20 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-13 04:50:20 +0000 |
commit | 2ff23ed0d9df8655567c127b8cea5d7c5439778c (patch) | |
tree | e4ab53634b284c98ed87220fcf4d28bcf380dd5b /gcc/real.h | |
parent | 850764ac5fecff94dd88997e88aef515b09be411 (diff) | |
download | gcc-2ff23ed0d9df8655567c127b8cea5d7c5439778c.tar.gz |
* emit-rtl.c (global_rtl): Update comment.
(const_double_htab, const_double_htab_hash,
const_double_htab_hash, lookup_const_double): New.
(const_int_htab_hash, const_int_htab_eq): Remove const
qualifiers, which cause tons of warnings with RTL checking on.
(gen_rtx_CONST_DOUBLE): Deleted.
(const_double_from_real_value): New function - bears some
resemblance to the former immed_real_const_1.
(immed_double_const): Moved here from varasm.c and
simplified.
(gen_rtx_REG): Make REGNO unsigned to squelch warnings.
(gen_rtx_SUBREG): Use gen_rtx_raw_SUBREG.
(gen_rtx): Use immed_double_const.
(init_emit_once): Initialize the const_double_htab. Use
REAL_VALUE_FROM_INT where possible. Can now use
CONST_DOUBLE_FROM_REAL_VALUE when setting up const_tiny_rtx.
* varasm.c (struct varasm_status): Remove x_const_double_chain.
(const_double_chain, immed_real_const, clear_const_double_mem): Delete.
(immed_double_const, immed_real_const_1): Moved to emit-rtl.c.
(init_varasm_status, mark_varasm_status): Don't touch
x_const_double_chain.
* output.h: Delete prototype for clear_const_double_mem.
* real.h: Make REAL_VALUE_TYPE a macro again. Remove leading
'0' slot from all CONST_DOUBLE_FORMAT definitions. Prototype
const_double_from_real_value, not immed_real_const_1, and use
it to define CONST_DOUBLE_FROM_REAL_VALUE. Define new macro
CONST_DOUBLE_ATOF.
* rtl.h (CONST_DOUBLE_CHAIN): Kill.
(CONST_DOUBLE_LOW, CONST_DOUBLE_HIGH): Adjust.
(gen_rtx_CONST_DOUBLE, immed_real_const): Delete prototypes.
(gen_rtx_REG): Second arg is unsigned.
* gengenrtl.c (special_rtx): Take out CONST_DOUBLE.
(excluded_rtx): New, return true for CONST_DOUBLE.
(genmacro): Write nothing for excluded codes.
* combine.c (combine_simplify_rtx): Use CONST_DOUBLE_FROM_REAL_VALUE.
* expr.c (expand_expr): Likewise.
* ggc-common.c (ggc_mark_rtx_children_1): Don't mark the
CONST_DOUBLE_CHAIN.
* toplev.c (rest_of_compilation): Don't call
clear_const_double_mem.
* config/rs6000/rs6000.c (rs6000_float_const): Delete.
(rs6000_hash_constant): Remove CONST_DOUBLE special case.
(toc_hash_eq): Remove CONST_DOUBLE and LABEL_REF special cases.
* config/rs6000/rs6000-protos.h: Don't prototype rs6000_float_const.
* config/c4x/c4x.md, config/rs6000/rs6000.md: Use CONST_DOUBLE_ATOF.
* config/dsp16xx/dsp16xx.md, config/mips/mips.md,
config/pa/pa.md: Use CONST_DOUBLE_FROM_REAL_VALUE.
* config/sparc/sparc.md, config/sparc/sparc.c: Use immed_double_const.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53409 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/real.h')
-rw-r--r-- | gcc/real.h | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/gcc/real.h b/gcc/real.h index b662089d51e..3de905dfddf 100644 --- a/gcc/real.h +++ b/gcc/real.h @@ -89,7 +89,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA + (REAL_VALUE_TYPE_SIZE%HOST_BITS_PER_WIDE_INT ? 1 : 0)) /* round up */ typedef struct { HOST_WIDE_INT r[REAL_WIDTH]; -} REAL_VALUE_TYPE; +} realvaluetype; +/* Various headers condition prototypes on #ifdef REAL_VALUE_TYPE, so it needs + to be a macro. */ +#define REAL_VALUE_TYPE realvaluetype /* Calculate the format for CONST_DOUBLE. We need as many slots as are necessary to overlay a REAL_VALUE_TYPE on them. This could be @@ -99,19 +102,19 @@ typedef struct { slots in a CONST_DOUBLE, so we provide them even if one would suffice. */ #if REAL_WIDTH == 1 -# define CONST_DOUBLE_FORMAT "0ww" +# define CONST_DOUBLE_FORMAT "ww" #else # if REAL_WIDTH == 2 -# define CONST_DOUBLE_FORMAT "0ww" +# define CONST_DOUBLE_FORMAT "ww" # else # if REAL_WIDTH == 3 -# define CONST_DOUBLE_FORMAT "0www" +# define CONST_DOUBLE_FORMAT "www" # else # if REAL_WIDTH == 4 -# define CONST_DOUBLE_FORMAT "0wwww" +# define CONST_DOUBLE_FORMAT "wwww" # else # if REAL_WIDTH == 5 -# define CONST_DOUBLE_FORMAT "0wwwww" +# define CONST_DOUBLE_FORMAT "wwwww" # else #error "REAL_WIDTH > 5 not supported" # endif @@ -265,9 +268,14 @@ REAL_VALUE_TYPE real_value_from_int_cst PARAMS ((union tree_node *, /* Return a CONST_DOUBLE with value R and mode M. */ -#define CONST_DOUBLE_FROM_REAL_VALUE(r, m) immed_real_const_1 (r, m) -extern struct rtx_def *immed_real_const_1 PARAMS ((REAL_VALUE_TYPE, - enum machine_mode)); +#define CONST_DOUBLE_FROM_REAL_VALUE(r, m) \ + const_double_from_real_value (r, m) +extern rtx const_double_from_real_value PARAMS ((REAL_VALUE_TYPE, + enum machine_mode)); + +/* Shorthand; can be handy in machine descriptions. */ +#define CONST_DOUBLE_ATOF(s, m) \ + CONST_DOUBLE_FROM_REAL_VALUE (REAL_VALUE_ATOF (s, m), m) /* Replace R by 1/R in the given machine mode, if the result is exact. */ extern int exact_real_inverse PARAMS ((enum machine_mode, REAL_VALUE_TYPE *)); |