From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2981 invoked by alias); 22 Nov 2011 18:11:47 -0000 Received: (qmail 2973 invoked by uid 22791); 22 Nov 2011 18:11:44 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-vw0-f47.google.com (HELO mail-vw0-f47.google.com) (209.85.212.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 Nov 2011 18:11:29 +0000 Received: by vbbey12 with SMTP id ey12so542968vbb.20 for ; Tue, 22 Nov 2011 10:11:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.115.106 with SMTP id jn10mr7543906obb.54.1321985488725; Tue, 22 Nov 2011 10:11:28 -0800 (PST) Received: by 10.182.56.130 with HTTP; Tue, 22 Nov 2011 10:11:28 -0800 (PST) In-Reply-To: References: Date: Tue, 22 Nov 2011 21:39:00 -0000 Message-ID: Subject: Re: How do we access higher order bits of a register? From: Ayonam Ray To: Ian Lance Taylor Cc: gcc-help@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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-11/txt/msg00224.txt.bz2 On 22 November 2011 20:30, Ian Lance Taylor wrote: > Ayonam Ray writes: > >> I wanted to write an RTL that would access the higher order bits of a >> register.=A0 I saw that high: works only with constants or labels. >> =A0The subreg: only takes the lower order bits. =A0Can't find any >> way to address the higher order bits. =A0Any help would be appreciated. > > If it is a single hard register, use a shift. > > Ian > Thanks for your reply. It is indeed a single hard register. But I need it as an lvalue. Ayonam