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]
Other format: [Raw text]

Re: PATCH for sibcalls on i386


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~


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