This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: about named address space


Rony Paul <ronypaul77@gmail.com> writes:

> I user declare a variable "x", then when compiler executes that and
> stores in memory, can  you tell me what is the rtx code for storing
> that variable? and in which file in GCC it is done?

It's difficult to answer that question in a simple way.  Assuming you
are using C, the C frontend will create a VAR_DECL for x.  If you assign
a value to that variable, it will create a MODIFY_EXPR.  The MODIFY_EXPR
will then be converted to a GIMPLE_ASSIGN statement in GIMPLE.  This
will then eventually be converted to an RTL SET.  So the rtx code is
SET.  If this is a local variable which is stored in memory rather than
in a register, the stack space will be allocated by assign_stack_local.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]