This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[3.4-BIB] Fix another cmov breakage


Hi,
yet another breakage my patch introduced is crash when we happen to generate QImode
cmove with memory operand.  THis is not supported by the ISA.  I've
bootstrapped and regtested the attached patch and installed it to BIB branch as
obivous.
Honza

Sat Nov 30 19:06:31 CET 2002  Jan Hubicka  <jh@suse.cz>
	* i386.c (ix86_expand_int_movcc): Force operand into register for QImode
	condtiional moves.
Index: i386.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.447.2.35
diff -c -3 -p -r1.447.2.35 i386.c
*** i386.c	28 Nov 2002 22:58:21 -0000	1.447.2.35
--- i386.c	30 Nov 2002 18:02:28 -0000
*************** ix86_expand_int_movcc (operands)
*** 9720,9728 ****
        emit_move_insn (tmp, operands[2]);
        operands[2] = tmp;
      }
    if (! register_operand (operands[2], VOIDmode)
!       && ! register_operand (operands[3], VOIDmode))
      operands[2] = force_reg (mode, operands[2]);
  
    emit_insn (compare_seq);
    emit_insn (gen_rtx_SET (VOIDmode, operands[0],
--- 9734,9748 ----
        emit_move_insn (tmp, operands[2]);
        operands[2] = tmp;
      }
+ 
    if (! register_operand (operands[2], VOIDmode)
!       && (mode == QImode 
!           || ! register_operand (operands[3], VOIDmode)))
      operands[2] = force_reg (mode, operands[2]);
+ 
+   if (mode == QImode
+       && ! register_operand (operands[3], VOIDmode))
+     operands[3] = force_reg (mode, operands[3]);
  
    emit_insn (compare_seq);
    emit_insn (gen_rtx_SET (VOIDmode, operands[0],


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]