[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] PATCH: In gen_vla_sp_restore, use X30 rather than get

From: Daniel Glöckner
Subject: Re: [Tinycc-devel] PATCH: In gen_vla_sp_restore, use X30 rather than get_reg.
Date: Mon, 10 Oct 2016 11:08:28 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On Mon, Oct 10, 2016 at 10:19:24AM +0200, Daniel Glöckner wrote:
> On Sun, Oct 09, 2016 at 11:51:11PM +0100, Edmund Grimley Evans wrote:
> > -    uint32_t r = intr(get_reg(RC_INT));
> > +    // Use x30 because this function can be called when there
> > +    // is a live return value in x0 but there is nothing on
> > +    // the value stack to prevent get_reg from returning x0.
> > +    uint32_t r = 30;
> Wait, can this happen on ARM32 as well? Why is x0 still in use?

Never mind, I was mentally inside gen_vla_alloc().
My gen_vla_sp_restore() just calls load(), which will use r14 if it
needs a temporary register and usually doesn't need one (unless the
current stack frame is > 4 kB).

Best regards,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]