From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81805 invoked by alias); 11 May 2015 16:55:26 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 81793 invoked by uid 89); 11 May 2015 16:55:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 11 May 2015 16:55:21 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id DC465B59B0; Mon, 11 May 2015 16:55:19 +0000 (UTC) Received: from greed.delorie.com (ovpn-113-113.phx2.redhat.com [10.3.113.113]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4BGtIK8019049 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 11 May 2015 12:55:18 -0400 Received: from greed.delorie.com (greed.delorie.com [127.0.0.1]) by greed.delorie.com (8.14.4/8.14.4) with ESMTP id t4BGtHPs023169; Mon, 11 May 2015 12:55:17 -0400 Received: (from dj@localhost) by greed.delorie.com (8.14.4/8.14.4/Submit) id t4BGtGSp023167; Mon, 11 May 2015 12:55:16 -0400 Date: Mon, 11 May 2015 16:55:00 -0000 Message-Id: <201505111655.t4BGtGSp023167@greed.delorie.com> From: DJ Delorie To: Richard Sandiford CC: Franz.Sirl-kernel@lauterbach.com, segher@kernel.crashing.org, gcc-patches@gcc.gnu.org, richard.sandiford@arm.com In-reply-to: <87zj5e13jn.fsf@e105548-lin.cambridge.arm.com> (message from Richard Sandiford on Sat, 09 May 2015 10:52:12 +0100) Subject: Re: Remove mode argument from gen_rtx_SET References: <87ioc4vct9.fsf@e105548-lin.cambridge.arm.com> <554C90BE.5080105@lauterbach.com> <20150508115747.GA11371@gate.crashing.org> <554CB17E.4040406@lauterbach.com> <877fsjupyh.fsf@e105548-lin.cambridge.arm.com> <201505081642.t48Ggwbp001371@greed.delorie.com> <87zj5e13jn.fsf@e105548-lin.cambridge.arm.com> X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00966.txt.bz2 > What I was confused about is that the first set isn't valid rtl. > The SET_SRC and SET_DEST always have to have the same mode > (or VOIDmode in the case of a CONST_INT, etc., where the mode > is implicitly the same as the SET_DEST). So wouldn't it have > to be: > > (set (reg:SI 1) > (subreg:SI (reg:PSI 2))) > > or: > > (set (reg:PSI 1) > (subreg:PSI (reg:SI 2))) > > ? If my memory doesn't match reality, I blame my memory. I'd have to experiment a while to dig out the details, but the key point is that a PSI in a reg is not stored the same as a PSI subreg of an SI reg. You have to keep that information across subregs or you lose track of where the actual bits are.