https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79514

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Uroš Bizjak from comment #6)
> (In reply to Uroš Bizjak from comment #5)
> > Maybe we should use our own pushxf expander?
> 
> No. Middle end should be fixed. x86 does not define any of HAVE_PRE_MODIFY
> macros.

So what it can emit?  PRE_DEC is not really right, because GET_MODE_SIZE
(XFmode) is in that case 12, but PUSH_ROUNDING increases that to 16.  But the
push actually needs to adjust sp by 16, not 12.
With -m128bit-long-double, rounded_size is equal to GET_MODE_SIZE and we get
to:
4124      if (GET_MODE_SIZE (mode) == rounded_size)
4125        dest_addr = gen_rtx_fmt_e (STACK_PUSH_CODE, Pmode,
stack_pointer_rtx);
I think i386.md should have a pushxf1 expander enabled at least for the case
when GET_MODE_SIZE (XFmode) != PUSH_ROUNDING (GET_MODE_SIZE (XFmode)) and just
not use PRE_DEC in the pattern at all, just sp subtraction plus store.

Reply via email to