From patchwork Sat Apr 12 07:27:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 338664 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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 6DB1D1400FE for ; Sat, 12 Apr 2014 17:27:52 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; q=dns; s=default; b=yt3movJQU7/Cv+kx b2uOO+LTV/CrEyPMP/C5kLzRK/2NndwQgFYRC3AGCnka3+vr1v6DAftFNES5TRQ6 v82bMAEgHI7BnGM3vRWehwEh1v06dwToNQFJJIAAI2l6o+XR8+JU4HfjFaV+RP74 WL4zyDcV7Y5jVWm5AiF+0ImZ5Ro= 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:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; s=default; bh=xlWEJ6/1lxY0418DZOnjQ5 63y/I=; b=qMcZKtffWHu4k4Qbm2rc+9rETfQnIa++fq1fnkSQJ31guwGfEiqWJR WpqDKLjCquMDQIEZ10DnxJqbGXPfFPinvjwS9YyOhg/SmymFuUP2DDWlzgExJjiu H4/1DHJOW4iUzWmvvqfJdlSmO4CQjnlzD1dDHmbgMQBd2o0ciMXGI= Received: (qmail 8207 invoked by alias); 12 Apr 2014 07:27:45 -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 8195 invoked by uid 89); 12 Apr 2014 07:27:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wg0-f49.google.com Received: from mail-wg0-f49.google.com (HELO mail-wg0-f49.google.com) (74.125.82.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sat, 12 Apr 2014 07:27:43 +0000 Received: by mail-wg0-f49.google.com with SMTP id a1so6239216wgh.8 for ; Sat, 12 Apr 2014 00:27:40 -0700 (PDT) X-Received: by 10.194.86.7 with SMTP id l7mr23900070wjz.37.1397287659897; Sat, 12 Apr 2014 00:27:39 -0700 (PDT) Received: from localhost ([2.28.235.12]) by mx.google.com with ESMTPSA id or5sm14670400wjc.2.2014.04.12.00.27.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Apr 2014 00:27:38 -0700 (PDT) From: Richard Sandiford To: Matthew Fortune Mail-Followup-To: Matthew Fortune , "Moore\, Catherine" , "gcc-patches\@gcc.gnu.org" , rdsandiford@googlemail.com Cc: "Moore\, Catherine" , "gcc-patches\@gcc.gnu.org" Subject: Re: [PATCH] [MIPS] Fix operands for microMIPS SW16, SH16 and SB16 References: <6D39441BF12EF246A7ABCE6654B023534E17E5@LEMAIL01.le.imgtec.org> Date: Sat, 12 Apr 2014 08:27:38 +0100 In-Reply-To: <6D39441BF12EF246A7ABCE6654B023534E17E5@LEMAIL01.le.imgtec.org> (Matthew Fortune's message of "Fri, 11 Apr 2014 20:07:29 +0000") Message-ID: <87zjjrxb11.fsf@talisman.default> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Matthew Fortune writes: > Hi Catherine/Richard, > > I think there may be some impact on register move costs by introducing > this class. Yeah, I was worried about that too. I'm going to do some code comparison tests for SE and MIPS16 to see what happens. > Is it worth having mips_canonicalize_move_class return M16_REGS for > M16_STORE_REGS to reduce the effect on costings? Given the extra > register is only $0 then this would seem mostly acceptable albeit > slightly strange. This will happen automatically, since M16_STORE_REGS is just M16_REGS without $16. (M16_STORE_REGS doesn't include $0, since that's handled as a constant instead.) However: this bit isn't right. We should leave entry 0 alone and change the M16_REGS entries for every register except $16. Thanks, Richard Index: config/mips/mips.c =================================================================== --- config/mips/mips.c (revision 209307) +++ config/mips/mips.c (working copy) @@ -648,7 +648,7 @@ static mips_one_only_stub *mips16_set_fcsr_stub; /* Index R is the smallest register class that contains register R. */ const enum reg_class mips_regno_to_class[FIRST_PSEUDO_REGISTER] = { - LEA_REGS, LEA_REGS, M16_REGS, V1_REG, + M16_STORE_REGS, LEA_REGS, M16_REGS, V1_REG, M16_REGS, M16_REGS, M16_REGS, M16_REGS, LEA_REGS, LEA_REGS, LEA_REGS, LEA_REGS, LEA_REGS, LEA_REGS, LEA_REGS, LEA_REGS,