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]

patch to improve x86_adjust_cost


Hi
this is small patch to make x86_adjust_cost more correct for Pentium CPU.

Honza

Tue Apr 13 00:32:03 CEST 1999
	* i386.c (x86_adjust_cost): Agi stall takes 1 cycle on Pentium, fst
	requires value to be ready one extra cycle.

*** i386.c.old2	Mon Apr 12 23:12:40 1999
--- i386.c	Tue Apr 13 00:35:10 1999
*************** x86_adjust_cost (insn, link, dep_insn, c
*** 5572,5578 ****
  	return 0;
  
        if (agi_dependent (insn, dep_insn))
! 	return 3;
  
        if (GET_CODE (insn) == INSN
  	  && GET_CODE (PATTERN (insn)) == SET
--- 5594,5600 ----
  	return 0;
  
        if (agi_dependent (insn, dep_insn))
! 	return 2;
  
        if (GET_CODE (insn) == INSN
  	  && GET_CODE (PATTERN (insn)) == SET
*************** x86_adjust_cost (insn, link, dep_insn, c
*** 5581,5586 ****
--- 5603,5617 ----
  	  && GET_CODE (next_inst) == JUMP_INSN)
  	/* compare probably paired with jump */
  	return 0;
+ 
+       /* Stores stalls one cycle longer than other insns.  */
+       if (is_fp_insn (insn) && cost && is_fp_store (dep_insn))
+         cost++;
+ 
        break;
  
      case PROCESSOR_K6:


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