This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH for sibcalls on i386
- From: Richard Henderson <rth at redhat dot com>
- To: Andreas Bauer <baueran at in dot tum dot de>
- Cc: gcc-patches at gcc dot gnu dot org, pizka at informatik dot tu-muenchen dot de, jason dot ozolins at anu dot edu dot au
- Date: Mon, 23 Sep 2002 18:12:11 -0400
- Subject: Re: PATCH for sibcalls on i386
- References: <20020923141054.B26514@royal.anu.edu.au>
I'll only comment on the md change, since Fergus and Zack
have adequately addressed the generic change that the proper
way to attack this problem.
On Mon, Sep 23, 2002 at 02:10:54PM +1000, Andreas Bauer wrote:
> + (define_insn "*sibcall_0"
> + [(call (mem:QI (match_operand 0 "constant_call_address_operand" "s,c,d,a"))
> + (match_operand 1 "" ""))]
> + "SIBLING_CALL_P (insn)"
> + {
> + if (SIBLING_CALL_P (insn))
Note that you're checking SIBLING_CALL_P here twice. Note that
the call pattern from which you duplicated this now contains
references to SIBLING_CALL_P which should always be false. All
of your patterns are doing this.
Note that constant_call_address_operand really means constant.
You cannot have register alternatives.
Don't be so tentative with respect to x86_64. Yes, we _could_
do better than ecx/edx/eax, but those are a good start.
> + (define_insn "*sibcall_value_1"
> + [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "s,c,d,a"))
> + (match_operand 1 "" ""))]
This is not a call value pattern. There's no value. Contrast
this with the sibcall_value_0 pattern which is correct.
r~