This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch: explow.c Enable allocate_stack64 and correct if clauses for i386
- From: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- To: Kai Tietz <Kai dot Tietz at onevision dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 16 Mar 2007 15:41:16 +0100
- Subject: Re: patch: explow.c Enable allocate_stack64 and correct if clauses for i386
- References: <OFEB4C2D48.76C88BEB-ONC12572A0.004A6A1B-C12572A0.004AC487@onevision.de>
- Reply-to: bonzini at gnu dot org
> + {
> +#if defined(HAVE_allocate_stack64) && defined(TARGET_64BIT)
> + mode = insn_data[((!HAVE_allocate_stack64 || !TARGET_64BIT)
> ? (int) CODE_FOR_allocate_stack : (int)
> CODE_FOR_allocate_stack64)].operand[1].mode;
> +#else
> mode = insn_data[(int) CODE_FOR_allocate_stack].operand[1].mode;
> +#endif
> + }
This is wrong. I believe that what you want is either:
- creating the RTL for allocate_stack using a define_expand, as in
e.g. the s390 port
- turning allocate_stack into an optab, and then expanding the Pmode
one. This would require changes in other ports (possibly using mode
macros too), defining insns like allocate_stacksi and/or
allocate_stackdi.
I would say you should go for the former.
Paolo