From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17217 invoked by alias); 13 Apr 2007 12:48:21 -0000 Received: (qmail 17204 invoked by uid 22791); 13 Apr 2007 12:48:19 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 13 Apr 2007 13:48:13 +0100 Received: (qmail 7507 invoked from network); 13 Apr 2007 12:48:11 -0000 Received: from unknown (HELO 81-179-106-172.dsl.pipex.com) (paul@127.0.0.2) by mail.codesourcery.com with ESMTPA; 13 Apr 2007 12:48:11 -0000 From: Paul Brook To: gdb-patches@sourceware.org Subject: Floating point types in target descriptions User-Agent: KMail/1.9.5 MIME-Version: 1.0 Content-Disposition: inline Date: Fri, 13 Apr 2007 12:48:00 -0000 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200704131348.10042.paul@codesourcery.com> 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: 2007-04/txt/msg00191.txt.bz2 The patch below adds ieee_single and ieee_double predefined types for use in XML target descriptions. These are needed to describe vector types with floating point elements. I considered using "float"/"double" and/or "float32"/"float64". However the former are ambiguous with the "float" register type, and the latter don't really tell you want you're getting. If targets need non-ieee types they can add them like arm_fpa_ext. Ok? Paul 2007-04-13 Paul Brook * target-descriptions.c (tdesc_named_type): Add ieee_single and ieee_double. * doc/gdb.texinfo: Document ieee_single and ieee_double target types. Index: gdb/doc/gdb.texinfo =================================================================== --- gdb/doc/gdb.texinfo (revision 168411) +++ gdb/doc/gdb.texinfo (working copy) @@ -26070,6 +26070,12 @@ pointers; printing a code pointer conver address. The stack pointer and any dedicated address registers may be marked as data pointers. +@item ieee_single +Single precision IEEE floating point. + +@item ieee_double +Double precision IEEE floating point. + @item arm_fpa_ext The 12-byte extended precision format used by ARM FPA registers. Index: gdb/target-descriptions.c =================================================================== --- gdb/target-descriptions.c (revision 168411) +++ gdb/target-descriptions.c (working copy) @@ -409,6 +409,12 @@ tdesc_named_type (const struct tdesc_fea if (strcmp (id, "uint64") == 0) return builtin_type_uint64; + if (strcmp (id, "ieee_single") == 0) + return builtin_type_ieee_single; + + if (strcmp (id, "ieee_double") == 0) + return builtin_type_ieee_double; + if (strcmp (id, "arm_fpa_ext") == 0) return builtin_type_arm_ext;