New x86 backend and my regstack changes...

Richard Henderson rth@cygnus.com
Thu Jul 1 19:12:00 GMT 1999


On Thu, Jul 01, 1999 at 05:57:07PM +0200, Jan Hubicka wrote:
> Tue Jul 1 15:14:04 CEST 1999  Jan Hubicka <hubicka@freesoft.cz>
> 	* i386.md (memory attribute): New "both" value.
> 	(imm_disp attribute): New attribute.
> 	(Pentium scheduling definitions): More exact model
> 	* i386.c (memory_displacement_operand): New predicate
> 	(memory_address_info): Rename from memory_address_length,
> 	new AIB parameter.
> 	* i386.h (memory_displacement_operand): Declare.
> 	(ix86_safe_length): New function.
> 	(ix86_safe_memory): New function.
> 	(ix86_find_instruction): New function.
> 	(ix86_sched_reorder): Use it.
[...]
> ! ;; these are correct for fdiv.
> ! ;; the fsqrt takes 70 cycles, all can overlap by integer ops, only last two
> ! ;; with fp ops. Can not overlap with fmul/imul instructions.
> ! ;; sin/cos takes 65-100 cycles, only last two can overlap by integer or fp ops.
> ! ;; sin/cos can overlap with fmul/imul.
>   
>   (define_function_unit "fpu" 1 0
>     (and (eq_attr "cpu" "pentium")
>          (eq_attr "type" "fdiv,fpspc"))
> !   39 37)

I went ahead and split these apart, and made fpspc take 70 cycles.

> ! int
> ! memory_address_info (addr, sib)
>        rtx addr;
> +      int sib;

As I mentioned in the previous mail, I killed this change.

> + static enum attr_pent_pair
> + ix86_safe_length (insn)
> +      rtx insn;
> + {
> +   if (recog_memoized (insn) >= 0)
> +     return get_attr_length(insn);
> +   else
> +     return PENT_PAIR_NP;

Careful.  This should have returned an int.

> + static rtx *
> + ix86_find_instruction (rtx * e_ready, rtx * ready, enum attr_pent_pair \
> type, rtx * first)

I renamed this ix86_pent_find_pair.  Careful about the prototypes 
for K&R C.

> + 	    /* Two read modify write instructions together 
> + 	       takes two cycles longer.  */
> + 	    if (memory == MEMORY_BOTH && second_memory == MEMORY_BOTH)
> + 	      currentcycles += 4;

"two" != 4?  I changed it to 2 -- if this is wrong, you'll have
to expand on the comment.

Other than that, I fixed english grammar.  The attached result is 
what I committed.


r~


More information about the Gcc-patches mailing list