Patch to fix x86 use of reload_completed
John Wehle
john@feith.com
Wed Apr 12 11:59:00 GMT 2000
This patch fixes several places in the x86 backend where
no_new_pseudos should be checked instead of reload_completed.
It passes make bootstrap and make check on FreeBSD-3.4 x86.
ChangeLog:
Wed Apr 12 01:21:56 EDT 2000 John Wehle (john@feith.com)
* i386.c (ix86_expand_binary_operator,
ix86_expand_unary_operator): Check no_new_pseudos
instead of reload_in_progress and reload_completed.
(ix86_split_ashldi, ix86_split_ashrdi,
ix86_split_lshrdi): Check no_new_pseudos instead
of reload_completed.
Enjoy!
-- John Wehle
------------------8<------------------------8<------------------------
*** gcc/config/i386/i386.c.ORIGINAL Sun Apr 9 21:15:23 2000
--- gcc/config/i386/i386.c Wed Apr 12 01:14:28 2000
*************** ix86_expand_binary_operator (code, mode,
*** 4231,4237 ****
src1 = force_reg (mode, src1);
/* If optimizing, copy to regs to improve CSE */
! if (optimize && !reload_in_progress && !reload_completed)
{
if (GET_CODE (dst) == MEM)
dst = gen_reg_rtx (mode);
--- 4231,4237 ----
src1 = force_reg (mode, src1);
/* If optimizing, copy to regs to improve CSE */
! if (optimize && ! no_new_pseudos)
{
if (GET_CODE (dst) == MEM)
dst = gen_reg_rtx (mode);
*************** ix86_expand_unary_operator (code, mode,
*** 4325,4331 ****
src = force_reg (mode, src);
/* If optimizing, copy to regs to improve CSE */
! if (optimize && !reload_in_progress && !reload_completed)
{
if (GET_CODE (dst) == MEM)
dst = gen_reg_rtx (mode);
--- 4325,4331 ----
src = force_reg (mode, src);
/* If optimizing, copy to regs to improve CSE */
! if (optimize && ! no_new_pseudos)
{
if (GET_CODE (dst) == MEM)
dst = gen_reg_rtx (mode);
*************** ix86_split_ashldi (operands, scratch)
*** 5644,5652 ****
emit_insn (gen_x86_shld_1 (high[0], low[0], operands[2]));
emit_insn (gen_ashlsi3 (low[0], low[0], operands[2]));
! if (TARGET_CMOVE && (! reload_completed || scratch))
{
! if (! reload_completed)
scratch = force_reg (SImode, const0_rtx);
else
emit_move_insn (scratch, const0_rtx);
--- 5644,5652 ----
emit_insn (gen_x86_shld_1 (high[0], low[0], operands[2]));
emit_insn (gen_ashlsi3 (low[0], low[0], operands[2]));
! if (TARGET_CMOVE && (! no_new_pseudos || scratch))
{
! if (! no_new_pseudos)
scratch = force_reg (SImode, const0_rtx);
else
emit_move_insn (scratch, const0_rtx);
*************** ix86_split_ashrdi (operands, scratch)
*** 5704,5712 ****
emit_insn (gen_x86_shrd_1 (low[0], high[0], operands[2]));
emit_insn (gen_ashrsi3 (high[0], high[0], operands[2]));
! if (TARGET_CMOVE && (!reload_completed || scratch))
{
! if (! reload_completed)
scratch = gen_reg_rtx (SImode);
emit_move_insn (scratch, high[0]);
emit_insn (gen_ashrsi3 (scratch, scratch, GEN_INT (31)));
--- 5704,5712 ----
emit_insn (gen_x86_shrd_1 (low[0], high[0], operands[2]));
emit_insn (gen_ashrsi3 (high[0], high[0], operands[2]));
! if (TARGET_CMOVE && (! no_new_pseudos || scratch))
{
! if (! no_new_pseudos)
scratch = gen_reg_rtx (SImode);
emit_move_insn (scratch, high[0]);
emit_insn (gen_ashrsi3 (scratch, scratch, GEN_INT (31)));
*************** ix86_split_lshrdi (operands, scratch)
*** 5757,5765 ****
emit_insn (gen_lshrsi3 (high[0], high[0], operands[2]));
/* Heh. By reversing the arguments, we can reuse this pattern. */
! if (TARGET_CMOVE && (! reload_completed || scratch))
{
! if (! reload_completed)
scratch = force_reg (SImode, const0_rtx);
else
emit_move_insn (scratch, const0_rtx);
--- 5757,5765 ----
emit_insn (gen_lshrsi3 (high[0], high[0], operands[2]));
/* Heh. By reversing the arguments, we can reuse this pattern. */
! if (TARGET_CMOVE && (! no_new_pseudos || scratch))
{
! if (! no_new_pseudos)
scratch = force_reg (SImode, const0_rtx);
else
emit_move_insn (scratch, const0_rtx);
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------
More information about the Gcc-patches
mailing list