This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: genflags and genemit disagree
- To: kthomas at gwdg dot de (Philipp Thomas)
- Subject: Re: genflags and genemit disagree
- From: hjl at lucon dot org (H.J. Lu)
- Date: Mon, 26 Oct 1998 21:53:06 -0800 (PST)
- Cc: egcs at cygnus dot com
>
> iI
> Hi,
> while looking for ways to add prototypes to i386.h (which I'll write about
> in another message) I stumbled over an odity regarding gen_call_pop() and
> gen_call_value_pop(). The bug is that either genflags produces a wrong
> prototype or genemit the wrong function.
>
> As I don't understand rtl yet, I thought I'ld ask here for somebody to
> explain.
>
> Here is the relevant part form i386.md:
>
> (define_expand "call_pop"
> [(parallel [(call (match_operand:QI 0 "indirect_operand" "")
> (match_operand:SI 1 "general_operand" ""))
> (set (reg:SI 7)
> (plus:SI (reg:SI 7)
> (match_operand:SI 3 "immediate_operand"
> "")))])]
> How many parameters do result from this description ? I don't have the
> generated code here, but if I remember correctly, genflags produces a
> prototype with three rtx as parameter, while genemit produces a function
> with four rtx.
>
> As I suspect genflags of being the culprit, could somebody please have
> a look at num_operands() in genemit.c and tell me where it could fail with
> a rtl as above ?
>
Just do a
# cd gcc
# grep MD_CALL_PROTOTYPES *
and check out all references to MD_CALL_PROTOTYPES.
H.J.