This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PR 15492: floating-point arguments are loaded too early to x87 stack
- From: Steven Bosscher <stevenb at suse dot de>
- To: James E Wilson <wilson at specifixinc dot com>,Uros Bizjak <uros at kss-loka dot si>
- Cc: gcc at gcc dot gnu dot org, vmakarov at redhat dot com
- Date: Sat, 21 Aug 2004 12:08:20 +0200
- Subject: Re: PR 15492: floating-point arguments are loaded too early to x87 stack
- Organization: SUSE Labs
- References: <41246622.5090401@kss-loka.si> <412597D6.6030002@kss-loka.si> <4126A56F.7030701@specifixinc.com>
On Saturday 21 August 2004 03:29, James E Wilson wrote:
> Uros Bizjak wrote:
> > Is there everything OK with fsched-insn2 for pentum4 case?
>
> The problem here is that we have no DFA scheduler for pentium4, and we
> also have no default scheduling info. As a result, the compiler assumes
> that almost everything takes 1 cycle. This is unlikely to result in a
> good schedule.
>
> Someone will have to write a DFA scheduler for pentium4 if we want good
> code for that target.
Vlad has a pentium4 scheduling description but he said it doesn't help
much at all...
> I say almost everything, because in the ppro.md file, the reservation
> for call instruction is missing the cpu==pentiumpro check, and hence it
> applies to pentium4 also.
Ouch. It applies to every CPU in i386.md.
> I suspect this is a bug, but it could be an
> undocumented misfeature.
This is definitely a bug. Very nice catch, it's a shame that genautomata
does not complain if an insn may match more than one reservation. The
obvious fix is this:
Index: ppro.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/ppro.md,v
retrieving revision 1.6
diff -c -3 -p -r1.6 ppro.md
*** ppro.md 11 Mar 2004 05:54:30 -0000 1.6
--- ppro.md 21 Aug 2004 10:05:49 -0000
***************
*** 137,143 ****
;; on decoder 0, and say that it takes a little while before the result
;; is available.
(define_insn_reservation "ppro_complex_insn" 6
! (eq_attr "type" "other,multi,call,callv,str")
"decoder0")
;; imov with memory operands does not use the integer units.
--- 137,144 ----
;; on decoder 0, and say that it takes a little while before the result
;; is available.
(define_insn_reservation "ppro_complex_insn" 6
! (and (eq_attr "cpu" "pentiumpro")
! (eq_attr "type" "other,multi,call,callv,str"))
"decoder0")
;; imov with memory operands does not use the integer units.
Gr.
Steven