[Top][All Lists]

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

Re: [Tinycc-devel] Basic register usage

From: Daniel Glöckner
Subject: Re: [Tinycc-devel] Basic register usage
Date: Wed, 27 Sep 2017 02:24:01 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On Tue, Sep 26, 2017 at 07:59:30PM -0400, Charles Lohr wrote:
> Is there some way of hinting to TCC "hey, register X contains Y sym" What
> functions/data structures would I use in func_prolog to tell TCC about it?

No, the gfunc_prolog function in all existing backends stores all
parameters that are passed in registers on the stack. The offset in
the stack frame is remembered together with the name of the parameter.

Remember, TinyCC forgets what is inside the registers after each
statement. So after the prolog has been emitted, all parameters must
be on the stack.

On the other hand, the gfunc_call function will get the parameters on
the vtop stack. The r element of each vtop element will tell you if
the value is already in a register and which register it is.

Best regards,


reply via email to

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