patch: explow.c Enable allocate_stack64 and correct if clauses for i386

Paolo Bonzini
Fri Mar 16 15:15:00 GMT 2007

> +        {
> +#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

I would say you should go for the former.


More information about the Gcc-patches mailing list