about named address space

Ian Lance Taylor iant@google.com
Tue May 24 20:25:00 GMT 2011


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



More information about the Gcc-help mailing list