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]

SH5 ffs fix checked in


-- 
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658
Wed Oct  9 15:54:49 2002  J"orn Rennecke <joern.rennecke@superh.com>

	* sh.md (ffssi2): Fix emitted code.

Index: sh.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.md,v
retrieving revision 1.121
diff -p -F^( -r1.121 sh.md
*** sh.md	28 Sep 2002 15:29:45 -0000	1.121
--- sh.md	9 Oct 2002 14:54:42 -0000
*************** (define_expand "ffssi2"
*** 10380,10393 ****
    rtx discratch = gen_reg_rtx (DImode);
    rtx last;
  
!   emit_insn (gen_adddi3z_media (discratch, operands[1],
! 				force_reg (SImode, GEN_INT (-1))));
!   emit_insn (gen_andcdi3 (discratch, discratch,
! 			  simplify_gen_subreg (DImode, operands[1],
! 					       SImode, 0)));
    emit_insn (gen_nsbsi (scratch, discratch));
    last = emit_insn (gen_subsi3 (operands[0],
! 				force_reg (SImode, GEN_INT (-64)), scratch));
    REG_NOTES (last)
      = gen_rtx_EXPR_LIST (REG_EQUAL,
  			 gen_rtx_FFS (SImode, operands[0]), REG_NOTES (last));
--- 10380,10394 ----
    rtx discratch = gen_reg_rtx (DImode);
    rtx last;
  
!   emit_insn (gen_adddi3 (discratch,
! 			 simplify_gen_subreg (DImode, operands[1], SImode, 0),
! 			 GEN_INT (-1)));
!   emit_insn (gen_andcdi3 (discratch,
! 			  simplify_gen_subreg (DImode, operands[1], SImode, 0),
! 			  discratch));
    emit_insn (gen_nsbsi (scratch, discratch));
    last = emit_insn (gen_subsi3 (operands[0],
! 				force_reg (SImode, GEN_INT (63)), scratch));
    REG_NOTES (last)
      = gen_rtx_EXPR_LIST (REG_EQUAL,
  			 gen_rtx_FFS (SImode, operands[0]), REG_NOTES (last));

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