From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10479 invoked by alias); 24 May 2011 14:23:57 -0000 Received: (qmail 10466 invoked by uid 22791); 24 May 2011 14:23:56 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 24 May 2011 14:23:43 +0000 Received: from kpbe11.cbf.corp.google.com (kpbe11.cbf.corp.google.com [172.25.105.75]) by smtp-out.google.com with ESMTP id p4OENfbh006454 for ; Tue, 24 May 2011 07:23:41 -0700 Received: from pvg3 (pvg3.prod.google.com [10.241.210.131]) by kpbe11.cbf.corp.google.com with ESMTP id p4OENdtW032347 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Tue, 24 May 2011 07:23:39 -0700 Received: by pvg3 with SMTP id 3so4143669pvg.18 for ; Tue, 24 May 2011 07:23:39 -0700 (PDT) Received: by 10.68.23.131 with SMTP id m3mr2952059pbf.253.1306247019223; Tue, 24 May 2011 07:23:39 -0700 (PDT) Received: from coign.google.com ([67.218.109.241]) by mx.google.com with ESMTPS id m4sm5036431pbb.78.2011.05.24.07.23.22 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 May 2011 07:23:38 -0700 (PDT) From: Ian Lance Taylor To: Rony Paul Cc: gcc-help@gcc.gnu.org Subject: Re: about named address space References: Date: Tue, 24 May 2011 20:25:00 -0000 In-Reply-To: (Rony Paul's message of "Mon, 23 May 2011 15:10:32 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-05/txt/msg00348.txt.bz2 Rony Paul 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