From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29027 invoked by alias); 7 Feb 2010 22:00:44 -0000 Received: (qmail 29018 invoked by uid 22791); 7 Feb 2010 22:00:44 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-ew0-f223.google.com (HELO mail-ew0-f223.google.com) (209.85.219.223) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 07 Feb 2010 22:00:39 +0000 Received: by ewy23 with SMTP id 23so237755ewy.4 for ; Sun, 07 Feb 2010 14:00:36 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.90.131 with SMTP id e3mr751681wef.69.1265580036595; Sun, 07 Feb 2010 14:00:36 -0800 (PST) In-Reply-To: <201002072152.o17LqEm7030005@glazunov.sibelius.xs4all.nl> References: <20100205011447.GA28263@lucon.org> <201002072152.o17LqEm7030005@glazunov.sibelius.xs4all.nl> Date: Sun, 07 Feb 2010 22:00:00 -0000 Message-ID: <6dc9ffc81002071400u5bad1726v93330aeb38246143@mail.gmail.com> Subject: Re: PATCH: PATCH: Add builtin floating point types From: "H.J. Lu" To: Mark Kettenis Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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 X-SW-Source: 2010-02/txt/msg00189.txt.bz2 On Sun, Feb 7, 2010 at 1:52 PM, Mark Kettenis wro= te: >> Date: Thu, 4 Feb 2010 17:14:47 -0800 >> From: "H.J. Lu" >> >> I am resending this patch. The motivation is I am working on x86 xml >> target descriptions. =A0x86 has i387_ext type. I added >> >> =A0 case TDESC_TYPE_I387_EXT: >> =A0 =A0 =A0return arch_float_type (gdbarch, -1, "builtin_type_i387_ext", >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0floatformats_= i387_ext); >> >> to tdesc_gdb_type. I would up 8 i387_ext types at 8 different addresses >> with the same bits. x86 does >> >> if (i386_fp_regnum_p (gdbarch, regnum)) >> =A0 =A0{ >> =A0 =A0 =A0/* Floating point registers must be converted unless we are >> =A0 =A0 =A0 =A0 accessing them in their hardware type. =A0*/ >> =A0 =A0 =A0if (type =3D=3D i387_ext_type (gdbarch)) >> =A0 =A0 =A0 =A0return 0; >> =A0 =A0 =A0else >> =A0 =A0 =A0 =A0return 1; >> =A0 =A0} >> >> It expects 2 =A0i387_ext types should have the same address. =A0This >> patch caches ieee_single, ieee_double and i387_ext. OK to install? > > Sorry, but I don't like this diff. =A0At the very least, keep the > i387_ext_type() function around. =A0It makes the diff far less invasive. Is there a way to call i387_ext_type from target-descriptions.c? Otherwise, XML target description will create multiple i386_ext types and won't work for x86 since x86 requires single i386_ext type per arch. Thanks. --=20 H.J.