about named address space
Rony Paul
ronypaul77@gmail.com
Sat May 28 08:47:00 GMT 2011
On Tue, May 24, 2011 at 4:22 PM, Ian Lance Taylor <iant@google.com> wrote:
>
> 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
suppose I have the following piece of code in my program.
extern int __ea x;
int y;
y = x;
that means I am copying data from one address space to another.
in that case will the method spu_addr_space_convert (rtx op, tree
from_type, tree to_type); be called by the compiler?
in the spu.c file the defination of " spu_addr_space_convert " is
given. but when and under which condition they will be called ?where
is it defined?
More information about the Gcc-help
mailing list