Commit a79e3a45 by Richard Kenner Committed by Richard Kenner

cselib.c (cselib_subst_to_values, [...]): Remove reference to CONST_DOUBLE_MEM in comment.

	* cselib.c (cselib_subst_to_values, case CONST_DOUBLE): Remove
 	reference to CONST_DOUBLE_MEM in comment.
	* emit-rtl.c (gen_rtx_CONST_DOUBLE): Remove one operand.
	(gen_rtx, case CONST_DOUBLE): Call it with one less operand.
	(init_emit_once): Don't clear CONST_DOUBLE_MEM.
	* function.c (pop_function_context_from): Don't call
	restore_varasm_status.
	* function.h (restore_varasm_status): Delete declaration.
	* gengenrtl.c (CONST_DOUBLE_FORMAT): Delete CONST_DOUBLE_MEM slot.
	* rtl.c: Likewise.
	* rtl.def (CONST_DOUBLE): Update comment.
	* rtl.h (CONST_DOUBLE_HIGH, CONST_DOUBLE_LOW): Update operand number.
	(CONST_DOUBLE_CHAIN): Likewise.
	(CONST_DOUBLE_MEM): Delete.
	(gen_rtx_CONST_DOUBLE): Update parameters.
	* varasm.c (struct varasm_status): x_pool_offset now HOST_WIDE_INT.
	Remove reference to CONST_DOUBLE_MEM.
	(const_alias_set): New variable.
	(immed_double_const): Change call to gen_rtx_CONST_DOUBLE.
	(immed_real_const_1): Adjust tests for 0, 1, and 2.
	Don't set CONST_DOUBLE_MEM.
	(clear_const_double_mem): Don't do anything with const_tiny_rtx.
	(output_constant_def): Don't look at TREE_CST_RTL if INTEGER_CST.
	Put constant in const_alias_set.
	(struct pool_constant): ALIGN now unsigned.
	OFFSET now HOST_WIDE_INT.
	Delete LABEL.
	(restore_varasm_status): Deleted.
	(mark_pool_constant): Mark desc->rtl.
	(force_const_mem): Rework to store rtl in hash table,
	not CONST_DOUBLE_MEM.
	Put constant in const_alias_set.
	(find_pool_constant): Check desc->rtl.
	(mark_constants, mark_constant): Don't special-case CONST_DOUBLE.
	(init_varasm_once): Initialize const_alias_set.

From-SVN: r46736
parent d6b6783b
Sat Nov 3 10:37:56 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> Sat Nov 3 10:37:56 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* cselib.c (cselib_subst_to_values, case CONST_DOUBLE): Remove
reference to CONST_DOUBLE_MEM in comment.
* emit-rtl.c (gen_rtx_CONST_DOUBLE): Remove one operand.
(gen_rtx, case CONST_DOUBLE): Call it with one less operand.
(init_emit_once): Don't clear CONST_DOUBLE_MEM.
* function.c (pop_function_context_from): Don't call
restore_varasm_status.
* function.h (restore_varasm_status): Delete declaration.
* gengenrtl.c (CONST_DOUBLE_FORMAT): Delete CONST_DOUBLE_MEM slot.
* rtl.c: Likewise.
* rtl.def (CONST_DOUBLE): Update comment.
* rtl.h (CONST_DOUBLE_HIGH, CONST_DOUBLE_LOW): Update operand number.
(CONST_DOUBLE_CHAIN): Likewise.
(CONST_DOUBLE_MEM): Delete.
(gen_rtx_CONST_DOUBLE): Update parameters.
* varasm.c (struct varasm_status): x_pool_offset now HOST_WIDE_INT.
Remove reference to CONST_DOUBLE_MEM.
(const_alias_set): New variable.
(immed_double_const): Change call to gen_rtx_CONST_DOUBLE.
(immed_real_const_1): Adjust tests for 0, 1, and 2.
Don't set CONST_DOUBLE_MEM.
(clear_const_double_mem): Don't do anything with const_tiny_rtx.
(output_constant_def): Don't look at TREE_CST_RTL if INTEGER_CST.
Put constant in const_alias_set.
(struct pool_constant): ALIGN now unsigned.
OFFSET now HOST_WIDE_INT.
Delete LABEL.
(restore_varasm_status): Deleted.
(mark_pool_constant): Mark desc->rtl.
(force_const_mem): Rework to store rtl in hash table,
not CONST_DOUBLE_MEM.
Put constant in const_alias_set.
(find_pool_constant): Check desc->rtl.
(mark_constants, mark_constant): Don't special-case CONST_DOUBLE.
(init_varasm_once): Initialize const_alias_set.
* expr.c (expand_expr, case ADDDR_EXPR): If at top level, don't call * expr.c (expand_expr, case ADDDR_EXPR): If at top level, don't call
force_const_mem. force_const_mem.
......
...@@ -793,8 +793,6 @@ cselib_subst_to_values (x) ...@@ -793,8 +793,6 @@ cselib_subst_to_values (x)
} }
return e->u.val_rtx; return e->u.val_rtx;
/* CONST_DOUBLEs must be special-cased here so that we won't try to
look up the CONST_DOUBLE_MEM inside. */
case CONST_DOUBLE: case CONST_DOUBLE:
case CONST_INT: case CONST_INT:
return x; return x;
......
...@@ -355,21 +355,19 @@ gen_rtx_CONST_INT (mode, arg) ...@@ -355,21 +355,19 @@ gen_rtx_CONST_INT (mode, arg)
only at run-time. */ only at run-time. */
rtx rtx
gen_rtx_CONST_DOUBLE (mode, arg0, arg1, arg2) gen_rtx_CONST_DOUBLE (mode, arg0, arg1)
enum machine_mode mode; enum machine_mode mode;
rtx arg0; HOST_WIDE_INT arg0, arg1;
HOST_WIDE_INT arg1, arg2;
{ {
rtx r = rtx_alloc (CONST_DOUBLE); rtx r = rtx_alloc (CONST_DOUBLE);
int i; int i;
PUT_MODE (r, mode); PUT_MODE (r, mode);
XEXP (r, 0) = arg0; X0EXP (r, 0) = NULL_RTX;
X0EXP (r, 1) = NULL_RTX; XWINT (r, 1) = arg0;
XWINT (r, 2) = arg1; XWINT (r, 2) = arg1;
XWINT (r, 3) = arg2;
for (i = GET_RTX_LENGTH (CONST_DOUBLE) - 1; i > 3; --i) for (i = GET_RTX_LENGTH (CONST_DOUBLE) - 1; i > 2; --i)
XWINT (r, i) = 0; XWINT (r, i) = 0;
return r; return r;
...@@ -516,10 +514,10 @@ gen_rtx VPARAMS ((enum rtx_code code, enum machine_mode mode, ...)) ...@@ -516,10 +514,10 @@ gen_rtx VPARAMS ((enum rtx_code code, enum machine_mode mode, ...))
case CONST_DOUBLE: case CONST_DOUBLE:
{ {
rtx arg0 = va_arg (p, rtx); HOST_WIDE_INT arg0 = va_arg (p, HOST_WIDE_INT);
HOST_WIDE_INT arg1 = va_arg (p, HOST_WIDE_INT); HOST_WIDE_INT arg1 = va_arg (p, HOST_WIDE_INT);
HOST_WIDE_INT arg2 = va_arg (p, HOST_WIDE_INT);
rt_val = gen_rtx_CONST_DOUBLE (mode, arg0, arg1, arg2); rt_val = gen_rtx_CONST_DOUBLE (mode, arg0, arg1);
} }
break; break;
...@@ -4683,7 +4681,6 @@ init_emit_once (line_numbers) ...@@ -4683,7 +4681,6 @@ init_emit_once (line_numbers)
CONST_DOUBLE_HIGH (tem) = 0; CONST_DOUBLE_HIGH (tem) = 0;
memcpy (&CONST_DOUBLE_LOW (tem), &u, sizeof u); memcpy (&CONST_DOUBLE_LOW (tem), &u, sizeof u);
CONST_DOUBLE_MEM (tem) = cc0_rtx;
CONST_DOUBLE_CHAIN (tem) = NULL_RTX; CONST_DOUBLE_CHAIN (tem) = NULL_RTX;
PUT_MODE (tem, mode); PUT_MODE (tem, mode);
......
...@@ -386,7 +386,6 @@ pop_function_context_from (context) ...@@ -386,7 +386,6 @@ pop_function_context_from (context)
reg_renumber = 0; reg_renumber = 0;
restore_emit_status (p); restore_emit_status (p);
restore_varasm_status (p);
if (restore_lang_status) if (restore_lang_status)
(*restore_lang_status) (p); (*restore_lang_status) (p);
......
...@@ -597,7 +597,6 @@ extern void free_after_parsing PARAMS ((struct function *)); ...@@ -597,7 +597,6 @@ extern void free_after_parsing PARAMS ((struct function *));
extern void free_after_compilation PARAMS ((struct function *)); extern void free_after_compilation PARAMS ((struct function *));
extern void init_varasm_status PARAMS ((struct function *)); extern void init_varasm_status PARAMS ((struct function *));
extern void restore_varasm_status PARAMS ((struct function *));
extern void free_varasm_status PARAMS ((struct function *)); extern void free_varasm_status PARAMS ((struct function *));
extern void free_emit_status PARAMS ((struct function *)); extern void free_emit_status PARAMS ((struct function *));
extern void free_stmt_status PARAMS ((struct function *)); extern void free_stmt_status PARAMS ((struct function *));
......
...@@ -71,19 +71,19 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -71,19 +71,19 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#endif /* REAL_WIDTH */ #endif /* REAL_WIDTH */
#if REAL_WIDTH == 1 #if REAL_WIDTH == 1
# define CONST_DOUBLE_FORMAT "e0ww" # define CONST_DOUBLE_FORMAT "0ww"
#else #else
# if REAL_WIDTH == 2 # if REAL_WIDTH == 2
# define CONST_DOUBLE_FORMAT "e0ww" # define CONST_DOUBLE_FORMAT "0ww"
# else # else
# if REAL_WIDTH == 3 # if REAL_WIDTH == 3
# define CONST_DOUBLE_FORMAT "e0www" # define CONST_DOUBLE_FORMAT "0www"
# else # else
# if REAL_WIDTH == 4 # if REAL_WIDTH == 4
# define CONST_DOUBLE_FORMAT "e0wwww" # define CONST_DOUBLE_FORMAT "0wwww"
# else # else
# if REAL_WIDTH == 5 # if REAL_WIDTH == 5
# define CONST_DOUBLE_FORMAT "e0wwwww" # define CONST_DOUBLE_FORMAT "0wwwww"
# else # else
# define CONST_DOUBLE_FORMAT /* nothing - will cause syntax error */ # define CONST_DOUBLE_FORMAT /* nothing - will cause syntax error */
# endif # endif
......
...@@ -30,7 +30,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -30,7 +30,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* Calculate the format for CONST_DOUBLE. This depends on the relative /* Calculate the format for CONST_DOUBLE. This depends on the relative
widths of HOST_WIDE_INT and REAL_VALUE_TYPE. widths of HOST_WIDE_INT and REAL_VALUE_TYPE.
We need to go out to e0wwwww, since REAL_ARITHMETIC assumes 16-bits We need to go out to 0wwwww, since REAL_ARITHMETIC assumes 16-bits
per element in REAL_VALUE_TYPE. per element in REAL_VALUE_TYPE.
This is duplicated in gengenrtl.c. This is duplicated in gengenrtl.c.
...@@ -70,19 +70,19 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -70,19 +70,19 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#endif /* REAL_WIDTH */ #endif /* REAL_WIDTH */
#if REAL_WIDTH == 1 #if REAL_WIDTH == 1
# define CONST_DOUBLE_FORMAT "e0ww" # define CONST_DOUBLE_FORMAT "0ww"
#else #else
# if REAL_WIDTH == 2 # if REAL_WIDTH == 2
# define CONST_DOUBLE_FORMAT "e0ww" # define CONST_DOUBLE_FORMAT "0ww"
# else # else
# if REAL_WIDTH == 3 # if REAL_WIDTH == 3
# define CONST_DOUBLE_FORMAT "e0www" # define CONST_DOUBLE_FORMAT "0www"
# else # else
# if REAL_WIDTH == 4 # if REAL_WIDTH == 4
# define CONST_DOUBLE_FORMAT "e0wwww" # define CONST_DOUBLE_FORMAT "0wwww"
# else # else
# if REAL_WIDTH == 5 # if REAL_WIDTH == 5
# define CONST_DOUBLE_FORMAT "e0wwwww" # define CONST_DOUBLE_FORMAT "0wwwww"
# else # else
# define CONST_DOUBLE_FORMAT /* nothing - will cause syntax error */ # define CONST_DOUBLE_FORMAT /* nothing - will cause syntax error */
# endif # endif
......
...@@ -560,10 +560,7 @@ DEF_RTL_EXPR(RESX, "resx", "i", 'x') ...@@ -560,10 +560,7 @@ DEF_RTL_EXPR(RESX, "resx", "i", 'x')
DEF_RTL_EXPR(CONST_INT, "const_int", "w", 'o') DEF_RTL_EXPR(CONST_INT, "const_int", "w", 'o')
/* numeric floating point constant. /* numeric floating point constant.
Operand 0 ('e') is the MEM that stores this constant in memory, or Operand 0 ('0') is a chain of all CONST_DOUBLEs in use in the
various other things (see comments at immed_double_const in
varasm.c).
Operand 1 ('0') is a chain of all CONST_DOUBLEs in use in the
current function. current function.
Remaining operands hold the actual value. They are all 'w' and Remaining operands hold the actual value. They are all 'w' and
there may be from 1 to 4; see rtl.c. */ there may be from 1 to 4; see rtl.c. */
......
...@@ -804,15 +804,11 @@ extern const char * const note_insn_name[NOTE_INSN_MAX - NOTE_INSN_BIAS]; ...@@ -804,15 +804,11 @@ extern const char * const note_insn_name[NOTE_INSN_MAX - NOTE_INSN_BIAS];
For a float, the number of ints varies, For a float, the number of ints varies,
and CONST_DOUBLE_LOW is the one that should come first *in memory*. and CONST_DOUBLE_LOW is the one that should come first *in memory*.
So use &CONST_DOUBLE_LOW(r) as the address of an array of ints. */ So use &CONST_DOUBLE_LOW(r) as the address of an array of ints. */
#define CONST_DOUBLE_LOW(r) XCWINT (r, 2, CONST_DOUBLE) #define CONST_DOUBLE_LOW(r) XCWINT (r, 1, CONST_DOUBLE)
#define CONST_DOUBLE_HIGH(r) XCWINT (r, 3, CONST_DOUBLE) #define CONST_DOUBLE_HIGH(r) XCWINT (r, 2, CONST_DOUBLE)
/* Link for chain of all CONST_DOUBLEs in use in current function. */ /* Link for chain of all CONST_DOUBLEs in use in current function. */
#define CONST_DOUBLE_CHAIN(r) XCEXP (r, 1, CONST_DOUBLE) #define CONST_DOUBLE_CHAIN(r) XCEXP (r, 0, CONST_DOUBLE)
/* The MEM which represents this CONST_DOUBLE's value in memory,
or const0_rtx if no MEM has been made for it yet,
or cc0_rtx if it is not on the chain. */
#define CONST_DOUBLE_MEM(r) XCEXP (r, 0, CONST_DOUBLE)
/* For a SUBREG rtx, SUBREG_REG extracts the value we want a subreg of. /* For a SUBREG rtx, SUBREG_REG extracts the value we want a subreg of.
SUBREG_BYTE extracts the byte-number. */ SUBREG_BYTE extracts the byte-number. */
...@@ -1619,7 +1615,7 @@ extern rtx return_address_pointer_rtx; ...@@ -1619,7 +1615,7 @@ extern rtx return_address_pointer_rtx;
add to this list, modify special_rtx in gengenrtl.c as well. You add to this list, modify special_rtx in gengenrtl.c as well. You
should also modify gen_rtx to use the special function. */ should also modify gen_rtx to use the special function. */
extern rtx gen_rtx_CONST_DOUBLE PARAMS ((enum machine_mode, rtx, extern rtx gen_rtx_CONST_DOUBLE PARAMS ((enum machine_mode,
HOST_WIDE_INT, HOST_WIDE_INT)); HOST_WIDE_INT, HOST_WIDE_INT));
extern rtx gen_rtx_CONST_INT PARAMS ((enum machine_mode, HOST_WIDE_INT)); extern rtx gen_rtx_CONST_INT PARAMS ((enum machine_mode, HOST_WIDE_INT));
extern rtx gen_raw_REG PARAMS ((enum machine_mode, int)); extern rtx gen_raw_REG PARAMS ((enum machine_mode, int));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment