From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2681 invoked by alias); 21 Apr 2015 06:04:40 -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 2593 invoked by uid 89); 21 Apr 2015 06:04:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mail1.asahi-net.or.jp Received: from mail1.asahi-net.or.jp (HELO mail1.asahi-net.or.jp) (202.224.39.197) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 21 Apr 2015 06:04:37 +0000 Received: from sa76r4 (y081184.ppp.asahi-net.or.jp [118.243.81.184]) by mail1.asahi-net.or.jp (Postfix) with ESMTP id 5D9C9DADE; Tue, 21 Apr 2015 15:04:34 +0900 (JST) Received: from localhost (localhost [127.0.0.1]) by sa76r4 (Postfix) with ESMTP id 06F9B19A7; Tue, 21 Apr 2015 15:04:34 +0900 (JST) Received: from sa76r4 ([127.0.0.1]) by localhost (sa76r4.localdomain [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iaLRqERaIjfn; Tue, 21 Apr 2015 15:04:33 +0900 (JST) Received: from sa76r4.ysato.dip.jp (localhost [127.0.0.1]) by sa76r4 (Postfix) with ESMTP id DB712248; Tue, 21 Apr 2015 15:04:33 +0900 (JST) Date: Tue, 21 Apr 2015 06:04:00 -0000 Message-ID: <87egneuidq.wl-ysato@users.sourceforge.jp> From: Yoshinori Sato To: Jeff Law Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Add new target h8300-*-linux In-Reply-To: <55351A9D.4070902@redhat.com> References: <87twxz75id.wl-ysato@users.sourceforge.jp> <55313A9F.6040304@redhat.com> <87618rjtbe.wl-ysato@users.sourceforge.jp> <55351A9D.4070902@redhat.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 EasyPG/1.0.0 Emacs/24.4 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg01115.txt.bz2 At Mon, 20 Apr 2015 09:26:21 -0600, Jeff Law wrote: > > On 04/19/2015 10:51 PM, Yoshinori Sato wrote: > >>> + if (TARGET_H8300H && (TARGET_H8300S || TARGET_H8300SX)) > >>> + { > >>> + target_flags ^= MASK_H8300H; > >>> + } > >> I'm a bit concerned by this. Why did you need to make this change? > >> > > > > The flag is exclusion, but it's set both. > Hmmm, IIRC the port has many places where it may assume that H8300H is > set for H8300S/H8300SX. I did a very quick audit and saw: I think it's being broken by my changes, so it's checked. > I would recommend reviewing the extzv_16_8 pattern which has the > condition "TARGET_H8300H" and changing the condition to > "TARGET_H8300H || TARGET_H8300S" since AFAICT that pattern should > work on both processor variants. > > Similarly there's two peephole patterns have have conditions that > looks like this: > > "(TARGET_H8300H || TARGET_H8300S) > && peep2_reg_dead_p (1, operands[0]) > && ((TARGET_H8300H && INTVAL (operands[1]) == 3) > || INTVAL (operands[1]) == 7 > || INTVAL (operands[1]) == 15 > || INTVAL (operands[1]) == 31 > || INTVAL (operands[1]) == 63 > || INTVAL (operands[1]) == 127 > || INTVAL (operands[1]) == 255)" > > > I'm pretty sure the second TARGET_H8300H should be (TARGET_H8300H || > TARGET_H8300S). OK. > > In h8300.c::get_shift_alg, case HIshift, count 14, does this need to change? > It loock unnecessary. Remove it. > else if (TARGET_H8300H) > { > info->special = > "shll.b\t%t0\n\tsubx.b\t%s0,%s0\n\tshll.b\t%t0\n\trotxl.b\t%s0\n\texts.w\t%T0"; > info->cc_special = CC_SET_ZNV; > } > else /* TARGET_H8300S */ > gcc_unreachable (); > > Similarly SImode shifts by 28-30 bits should be reviewed in a similar > manner. As should the implementation of h8300_shift_needs_scratch_p. > > output_a_rotate also needs to be reviewed if you want to make the > change to turn off H8300H when H8/S is true. Similarly for > compute_a_rotate_length. > The one put in by an experiment was left. Removed. > > There may be others, these are what I found with a very quick > search. If there's not a compelling reason to make the change, I'd > recommend against it. > OK. I will fix and resent. > > > Jeff -- Yoshinori Sato