i386.h (PREFERRED_RELOAD_CLASS): Standard fp constants load to TOS.
* i386.h (PREFERRED_RELOAD_CLASS): Standard fp constants load to TOS. * i386.md (movsf, movdf, movxf): Validate memory address returned from force_const_mem. Kill useless REG_EQUAL setting code. From-SVN: r22269
This commit is contained in:
parent
37834fc834
commit
55953cea37
@ -1,3 +1,9 @@
|
||||
Sat Sep 5 14:47:17 1998 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* i386.h (PREFERRED_RELOAD_CLASS): Standard fp constants load to TOS.
|
||||
* i386.md (movsf, movdf, movxf): Validate memory address returned
|
||||
from force_const_mem. Kill useless REG_EQUAL setting code.
|
||||
|
||||
Sat Sep 5 14:23:31 1998 Torbjorn Granlund <tege@matematik.su.se>
|
||||
|
||||
* m68k.md (zero_extendsidi2): Fix typo.
|
||||
|
@ -932,7 +932,8 @@ enum reg_class
|
||||
movdf to do mem-to-mem moves through integer regs. */
|
||||
|
||||
#define PREFERRED_RELOAD_CLASS(X,CLASS) \
|
||||
(GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) != VOIDmode ? NO_REGS \
|
||||
(GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) != VOIDmode \
|
||||
? (standard_80387_constant_p (X) ? FP_TOP_REG : NO_REGS) \
|
||||
: GET_MODE (X) == QImode && ! reg_class_subset_p (CLASS, Q_REGS) ? Q_REGS \
|
||||
: ((CLASS) == ALL_REGS \
|
||||
&& GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT) ? GENERAL_REGS \
|
||||
|
@ -1234,27 +1234,14 @@
|
||||
}
|
||||
|
||||
/* If we are loading a floating point constant that isn't 0 or 1
|
||||
into a register, indicate we need the pic register loaded. This could
|
||||
be optimized into stores of constants if the target eventually moves
|
||||
to memory, but better safe than sorry. */
|
||||
into a register, force the value to memory now, since we'll
|
||||
get better code out the back end. */
|
||||
else if ((reload_in_progress | reload_completed) == 0
|
||||
&& GET_CODE (operands[0]) != MEM
|
||||
&& GET_CODE (operands[1]) == CONST_DOUBLE
|
||||
&& !standard_80387_constant_p (operands[1]))
|
||||
&& GET_CODE (operands[0]) != MEM
|
||||
&& GET_CODE (operands[1]) == CONST_DOUBLE
|
||||
&& !standard_80387_constant_p (operands[1]))
|
||||
{
|
||||
rtx insn, note, fp_const;
|
||||
|
||||
fp_const = force_const_mem (SFmode, operands[1]);
|
||||
if (flag_pic)
|
||||
current_function_uses_pic_offset_table = 1;
|
||||
|
||||
insn = emit_insn (gen_rtx_SET (SFmode, operands[0], fp_const));
|
||||
note = find_reg_note (insn, REG_EQUAL, NULL_RTX);
|
||||
|
||||
if (note)
|
||||
XEXP (note, 0) = operands[1];
|
||||
else
|
||||
REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, operands[1], REG_NOTES (insn));
|
||||
operands[1] = validize_mem (force_const_mem (SFmode, operands[1]));
|
||||
}
|
||||
}")
|
||||
|
||||
@ -1330,6 +1317,7 @@
|
||||
return AS1 (fxch,%0);
|
||||
}")
|
||||
|
||||
|
||||
(define_insn "movdf_push"
|
||||
[(set (match_operand:DF 0 "push_operand" "=<,<")
|
||||
(match_operand:DF 1 "general_operand" "*rfF,o"))]
|
||||
@ -1386,23 +1374,11 @@
|
||||
optimized into stores of constants if the target eventually moves to
|
||||
memory, but better safe than sorry. */
|
||||
else if ((reload_in_progress | reload_completed) == 0
|
||||
&& GET_CODE (operands[0]) != MEM
|
||||
&& GET_CODE (operands[1]) == CONST_DOUBLE
|
||||
&& !standard_80387_constant_p (operands[1]))
|
||||
&& GET_CODE (operands[0]) != MEM
|
||||
&& GET_CODE (operands[1]) == CONST_DOUBLE
|
||||
&& !standard_80387_constant_p (operands[1]))
|
||||
{
|
||||
rtx insn, note, fp_const;
|
||||
|
||||
fp_const = force_const_mem (DFmode, operands[1]);
|
||||
if (flag_pic)
|
||||
current_function_uses_pic_offset_table = 1;
|
||||
|
||||
insn = emit_insn (gen_rtx_SET (DFmode, operands[0], fp_const));
|
||||
note = find_reg_note (insn, REG_EQUAL, NULL_RTX);
|
||||
|
||||
if (note)
|
||||
XEXP (note, 0) = operands[1];
|
||||
else
|
||||
REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, operands[1], REG_NOTES (insn));
|
||||
operands[1] = validize_mem (force_const_mem (DFmode, operands[1]));
|
||||
}
|
||||
}")
|
||||
|
||||
@ -1535,23 +1511,11 @@
|
||||
be optimized into stores of constants if the target eventually moves
|
||||
to memory, but better safe than sorry. */
|
||||
else if ((reload_in_progress | reload_completed) == 0
|
||||
&& GET_CODE (operands[0]) != MEM
|
||||
&& GET_CODE (operands[1]) == CONST_DOUBLE
|
||||
&& !standard_80387_constant_p (operands[1]))
|
||||
&& GET_CODE (operands[0]) != MEM
|
||||
&& GET_CODE (operands[1]) == CONST_DOUBLE
|
||||
&& !standard_80387_constant_p (operands[1]))
|
||||
{
|
||||
rtx insn, note, fp_const;
|
||||
|
||||
fp_const = force_const_mem (XFmode, operands[1]);
|
||||
if (flag_pic)
|
||||
current_function_uses_pic_offset_table = 1;
|
||||
|
||||
insn = emit_insn (gen_rtx_SET (XFmode, operands[0], fp_const));
|
||||
note = find_reg_note (insn, REG_EQUAL, NULL_RTX);
|
||||
|
||||
if (note)
|
||||
XEXP (note, 0) = operands[1];
|
||||
else
|
||||
REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, operands[1], REG_NOTES (insn));
|
||||
operands[1] = validize_mem (force_const_mem (XFmode, operands[1]));
|
||||
}
|
||||
}")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user