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: explow.c Enable allocate_stack64 and correct if clauses for i386


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


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