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

--- Comment #15 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Josh Poimboeuf from comment #14)
> (In reply to H.J. Lu from comment #13)
> > (In reply to Josh Poimboeuf from comment #12)
> > > I would like to clarify that most of the time, when we use "sp" in the
> > > clobbers list, the stack does *not* need to be realigned.  And in those
> > 
> > Yes, stack alignment may be needed due to:
> > 
> > typedef struct {
> >  u64 __attribute__((aligned(8))) counter;
> > } atomic64_t;
> > 
> > with -mpreferred-stack-boundary=2.
> 
> Yes, in the above example that is true.  However there are many more cases
> in the kernel where we want to use the "sp" clobbers, where stack alignment
> is not needed.

DRAP is used only when stack realignment may be needed.  If the code doesn't
need more 4 byte alignment on stack, you won't run into this issue at all.

Reply via email to