On Tue, Nov 05, 2024 at 12:00:24PM +0100, Uros Bizjak wrote:
> On Tue, Nov 5, 2024 at 11:43 AM Andreas Schwab <sch...@linux-m68k.org> wrote:
> >
> > On Nov 05 2024, Uros Bizjak wrote:
> >
> > > But what is the non-deprecated way to communicate the fact that SP
> > > changes, and possibly clobbers stack in the asm to the compiler?
> >
> > Since an asm statement is not allowed to change SP there is no need for
> > that.
> 
> asm volatile ("pushfq; popfq %0" : "=r"(x));
> 
> doesn't change SP at any sequence point, doesn't clobber the function
> frame, but the function using it shouldn't create redzone. How to
> communicate this to the compiler?

One possibility would be make __attribute__((target ("no-red-zone")))
working (I think currently the option isn't TargetSave or isn't listed
somewhere, so it doesn't work).

And the other  one is IMHO making it explicit that it clobbers the red zone,
so "redzone" or "red-zone" clobber (or some other word, but can't be easily
stack-below-sp because we have hppa with stack growing in the wrong
direction).

        Jakub

Reply via email to