From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 55765 invoked by alias); 20 Sep 2017 07:35:45 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 55708 invoked by uid 89); 20 Sep 2017 07:35:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 20 Sep 2017 07:35:36 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id v8K7ZTxu016560 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 20 Sep 2017 03:35:34 -0400 Received: by simark.ca (Postfix, from userid 112) id 47DB11ED03; Wed, 20 Sep 2017 03:35:29 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 989241E092; Wed, 20 Sep 2017 03:35:26 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 20 Sep 2017 07:35:00 -0000 From: Simon Marchi To: Ulrich Weigand Cc: gdb-patches@sourceware.org Subject: Re: [RFC][03/19] Target FP: Complete tdep move to convert_typed_floating In-Reply-To: <20170905182045.22009D8086F@oc3748833570.ibm.com> References: <20170905182045.22009D8086F@oc3748833570.ibm.com> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.0 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Wed, 20 Sep 2017 07:35:29 +0000 X-IsSubscribed: yes X-SW-Source: 2017-09/txt/msg00478.txt.bz2 On 2017-09-05 20:20, Ulrich Weigand wrote: > [RFC][03/19] Target FP: Complete tdep move to convert_typed_floating > > Many tdep files need to perform conversions between two floating-point > types, usually when accessing FP registers. Most targets now use the > convert_typed_floating helper routine to do so. However, a small > number > still use the old method of converting via a DOUBLEST. Since we want > to get rid of DOUBLEST, these targets need to be moves to the new > method as well. > > The main obstacle is that for convert_typed_floating we need an actual > *type*, not just a floatformat. > > In arm-tdep.c, this is very straightforward, since there is already a > type using the ARM extended floatformat. > > For sh-tdep.c and sh64-tdep.c, no such type already exists, so I've > added one to the gdbarch_tdep struct as done on other targets. So far the patches look like good cleanups on their own own, independently of the rest of the series. > Index: binutils-gdb/gdb/sh-tdep.c > =================================================================== > --- binutils-gdb.orig/gdb/sh-tdep.c > +++ binutils-gdb/gdb/sh-tdep.c > @@ -33,7 +33,6 @@ > #include "dis-asm.h" > #include "inferior.h" > #include "arch-utils.h" > -#include "floatformat.h" > #include "regcache.h" > #include "doublest.h" > #include "osabi.h" > @@ -1552,6 +1551,19 @@ sh_register_reggroup_p (struct gdbarch * > The other pseudo registers (the FVs) also don't pose a problem > because they are stored as 4 individual FP elements. */ > > +static struct type * > +sh_littlebyte_bigword_type (struct gdbarch *gdbarch) > +{ > + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); > + > + if (!tdep->sh_littlebyte_bigword_type) Nit, use == NULL. > + tdep->sh_littlebyte_bigword_type > + = arch_float_type (gdbarch, -1, > "builtin_type_sh_littlebyte_bigword", > + floatformats_arm_ext); This refers to arm, is it right? Same comments for sh64. Thanks, Simon