From patchwork Wed Oct 9 01:44:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: DJ Delorie X-Patchwork-Id: 281697 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 5FA402C00A8 for ; Wed, 9 Oct 2013 12:44:45 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :message-id:from:to:subject; q=dns; s=default; b=EP+kWajBpm1TFSd ie2C3vHT7nPHEMGlVUWSUw+8NqDzCXTYk6AQu5SgM5x2uNJm6QGnmv0ih5zzukik VHz37nqy8LYg8aw0R/e7VWxQEcGCItzRAh6p3KXOar7LqpmSrrTK799mcKS9RYll qkXzVZnxQUpsl+QQrhA/4OlBEYgg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :message-id:from:to:subject; s=default; bh=Tyh77j8QHe3ZI45m/+3da vAR9C0=; b=L2Dj1woSr6t1Og3zE09k9EmC5UojROj1Tj4dxgKZ5MBcf9XiLD4qw 1IWqshdWuC8ka1YIBXTc23K4I29Pk0AWQYzKLJy0bUVxgcYiHOwOXUFj8sE+CloJ GmbOFqPCz2uu41h9TasBSFnmc37j3RQqTZ2uud+PhzxQaQyoXEDgtw= Received: (qmail 12246 invoked by alias); 9 Oct 2013 01:44:37 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 12234 invoked by uid 89); 9 Oct 2013 01:44:36 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-4.1 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS 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 ESMTP; Wed, 09 Oct 2013 01:44:36 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r991iYJ8009055 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 8 Oct 2013 21:44:34 -0400 Received: from greed.delorie.com (ovpn-113-20.phx2.redhat.com [10.3.113.20]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r991iXUf013705 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 8 Oct 2013 21:44:34 -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 r991iW6G027296 for ; Tue, 8 Oct 2013 21:44:32 -0400 Received: (from dj@localhost) by greed.delorie.com (8.14.4/8.14.4/Submit) id r991iWDg027295; Tue, 8 Oct 2013 21:44:32 -0400 Date: Tue, 8 Oct 2013 21:44:32 -0400 Message-Id: <201310090144.r991iWDg027295@greed.delorie.com> From: DJ Delorie To: gcc-patches@gcc.gnu.org Subject: [rl78] tweaks to moviqi/movsi expander X-IsSubscribed: yes Minor fix. Committed. * config/rl78/rl78-expand.md (movqi): use operands[] not operandN. (movhi): Likewise. 2013-10-08 Jan Hubicka Index: config/rl78/rl78-expand.md =================================================================== --- config/rl78/rl78-expand.md (revision 203298) +++ config/rl78/rl78-expand.md (working copy) @@ -22,55 +22,55 @@ (define_expand "movqi" [(set (match_operand:QI 0 "nonimmediate_operand") (match_operand:QI 1 "general_operand"))] "" { - if (MEM_P (operand0) && MEM_P (operand1)) - operands[1] = copy_to_mode_reg (QImode, operand1); - if (rl78_far_p (operand0) && rl78_far_p (operand1)) - operands[1] = copy_to_mode_reg (QImode, operand1); + if (MEM_P (operands[0]) && MEM_P (operands[1])) + operands[1] = copy_to_mode_reg (QImode, operands[1]); + if (rl78_far_p (operands[0]) && rl78_far_p (operands[1])) + operands[1] = copy_to_mode_reg (QImode, operands[1]); /* FIXME: Not sure how GCC can generate (SUBREG (SYMBOL_REF)), but it does. Since this makes no sense, reject it here. */ - if (GET_CODE (operand1) == SUBREG - && GET_CODE (XEXP (operand1, 0)) == SYMBOL_REF) + if (GET_CODE (operands[1]) == SUBREG + && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF) FAIL; /* Similarly for (SUBREG (CONST (PLUS (SYMBOL_REF)))). cf. g++.dg/abi/packed.C. */ - if (GET_CODE (operand1) == SUBREG - && GET_CODE (XEXP (operand1, 0)) == CONST - && GET_CODE (XEXP (XEXP (operand1, 0), 0)) == PLUS - && GET_CODE (XEXP (XEXP (XEXP (operand1, 0), 0), 0)) == SYMBOL_REF) + if (GET_CODE (operands[1]) == SUBREG + && GET_CODE (XEXP (operands[1], 0)) == CONST + && GET_CODE (XEXP (XEXP (operands[1], 0), 0)) == PLUS + && GET_CODE (XEXP (XEXP (XEXP (operands[1], 0), 0), 0)) == SYMBOL_REF) FAIL; - if (CONST_INT_P (operand1) && ! IN_RANGE (INTVAL (operand1), (-1 << 8) + 1, (1 << 8) - 1)) + if (CONST_INT_P (operands[1]) && ! IN_RANGE (INTVAL (operands[1]), (-1 << 8) + 1, (1 << 8) - 1)) FAIL; } ) (define_expand "movhi" [(set (match_operand:HI 0 "nonimmediate_operand") (match_operand:HI 1 "general_operand"))] "" { - if (MEM_P (operand0) && MEM_P (operand1)) - operands[1] = copy_to_mode_reg (HImode, operand1); - if (rl78_far_p (operand0) && rl78_far_p (operand1)) - operands[1] = copy_to_mode_reg (HImode, operand1); + if (MEM_P (operands[0]) && MEM_P (operands[1])) + operands[1] = copy_to_mode_reg (HImode, operands[1]); + if (rl78_far_p (operands[0]) && rl78_far_p (operands[1])) + operands[1] = copy_to_mode_reg (HImode, operands[1]); /* FIXME: Not sure how GCC can generate (SUBREG (SYMBOL_REF)), but it does. Since this makes no sense, reject it here. */ - if (GET_CODE (operand1) == SUBREG - && GET_CODE (XEXP (operand1, 0)) == SYMBOL_REF) + if (GET_CODE (operands[1]) == SUBREG + && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF) FAIL; /* Similarly for (SUBREG (CONST (PLUS (SYMBOL_REF)))). */ - if (GET_CODE (operand1) == SUBREG - && GET_CODE (XEXP (operand1, 0)) == CONST - && GET_CODE (XEXP (XEXP (operand1, 0), 0)) == PLUS - && GET_CODE (XEXP (XEXP (XEXP (operand1, 0), 0), 0)) == SYMBOL_REF) + if (GET_CODE (operands[1]) == SUBREG + && GET_CODE (XEXP (operands[1], 0)) == CONST + && GET_CODE (XEXP (XEXP (operands[1], 0), 0)) == PLUS + && GET_CODE (XEXP (XEXP (XEXP (operands[1], 0), 0), 0)) == SYMBOL_REF) FAIL; } ) (define_insn_and_split "movsi" [(set (match_operand:SI 0 "nonimmediate_operand" "=vYS,v,Wfr")