From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31705 invoked by alias); 21 May 2011 06:19:46 -0000 Received: (qmail 31694 invoked by uid 22791); 21 May 2011 06:19:45 -0000 X-SWARE-Spam-Status: No, hits=-2.3 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; Sat, 21 May 2011 06:19:30 +0000 Received: from wpaz17.hot.corp.google.com (wpaz17.hot.corp.google.com [172.24.198.81]) by smtp-out.google.com with ESMTP id p4L6JSpi014672 for ; Fri, 20 May 2011 23:19:28 -0700 Received: from pzk37 (pzk37.prod.google.com [10.243.19.165]) by wpaz17.hot.corp.google.com with ESMTP id p4L6JQrS031624 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for ; Fri, 20 May 2011 23:19:26 -0700 Received: by pzk37 with SMTP id 37so3421376pzk.1 for ; Fri, 20 May 2011 23:19:25 -0700 (PDT) Received: by 10.68.51.135 with SMTP id k7mr375596pbo.1.1305958765810; Fri, 20 May 2011 23:19:25 -0700 (PDT) Received: from coign.google.com ([216.239.45.130]) by mx.google.com with ESMTPS id t9sm2928652pbq.31.2011.05.20.23.19.24 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 20 May 2011 23:19:25 -0700 (PDT) From: Ian Lance Taylor To: Rony Paul Cc: gcc-help@gcc.gnu.org Subject: Re: about named address space References: Date: Sat, 21 May 2011 07:15:00 -0000 In-Reply-To: (Rony Paul's message of "Fri, 20 May 2011 16:29:38 +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/msg00307.txt.bz2 Rony Paul writes: > Can you explain me the following piece of code? > > rtx result, ls; > > ls = gen_const_mem (DImode, > gen_rtx_SYMBOL_REF (Pmode, "__ea_local_store")); Build a memory reference to the address __ea_local_store in DImode (64-bit). > set_mem_align (ls, 128); Set the alignment of that memory to 128 bits. > result = gen_reg_rtx (Pmode); Build a pseudo-register of type Pmode. > ls = force_reg (Pmode, convert_modes (Pmode, DImode, ls, 1)); Copy ls to a new pseudo-register, converting it from DImode to Pmode. > op = force_reg (Pmode, convert_modes (Pmode, EAmode, op, 1)); Copy op to a new pseudo-register, converting it from EAmode to Pmode. > ls = emit_conditional_move (ls, NE, op, const0_rtx, Pmode, > ls, const0_rtx, Pmode, 1); Equivalent to ls = op != 0 ? ls : 0. > emit_insn (gen_subsi3 (result, op, ls)); Equivalent to result = op - ls. So basically if op is not 0, this subtracts __ea_local_store from it. Ian