public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Willgerodt, Felix" <felix.willgerodt@intel.com>
To: Tom Tromey <tom@tromey.com>,
	"Willgerodt, Felix via Gdb-patches" <gdb-patches@sourceware.org>
Subject: RE: [PATCH 1/1] gdb, fortran: Fix quad floating-point type for ifort compiler.
Date: Mon, 20 Feb 2023 09:17:47 +0000	[thread overview]
Message-ID: <MN2PR11MB45666F618FA971DCB5EFF2408EA49@MN2PR11MB4566.namprd11.prod.outlook.com> (raw)
In-Reply-To: <87ttzmrhuz.fsf@tromey.com>

> >>>>> "Felix" == Willgerodt, Felix via Gdb-patches <gdb-
> patches@sourceware.org> writes:
> 
> Felix> || strcmp (name, "_Float128") == 0
> Felix> || strcmp (name, "complex _Float128") == 0
> Felix> || strcmp (name, "complex(kind=16)") == 0
> Felix> +	|| strcmp (name, "COMPLEX(16)") == 0
> Felix> || strcmp (name, "complex*32") == 0
> Felix> || strcmp (name, "COMPLEX*32") == 0
> Felix> || strcmp (name, "quad complex") == 0
> Felix> || strcmp (name, "real(kind=16)") == 0
> Felix> || strcmp (name, "real*16") == 0
> Felix> -	|| strcmp (name, "REAL*16") == 0)
> Felix> +	|| strcmp (name, "REAL*16") == 0
> Felix> +	|| strcmp (name, "REAL(16)") == 0)
> Felix> return floatformats_ieee_quad;
> 
> >> Not your fault but this whole approach seems bad.
> 
> Felix> Agreed. But can we change anything really?
> 
> I suppose ideally what we would need is extra information in the DWARF.
> 
> Although... i386_floatformat_for_type is explicitly checking for
> len==128.  Is there some other float format matching this on i386?

As far as I know, the actual x87 FPU supports only an extended-double
format with 80 bits and the SSE/AVX units only support double-precision.
default_floatformat_for_type() has an explicit comment about it as well.

When examining memory for this Fortran test, I see 128-bit values in
binary128 format, so I assume that this is just a software/compiler feature. 
There is also decimal128 support in e.g. gcc.  I tried it only briefly,
we don't end up in i386_floatformat_for_type for those types, but
GDB prints them just fine.  I assume as they are marked as
DW_ATE_decimal_float instead of DW_ATE_float, but I didn't look into 
it in detail.

I am not aware of any other float types that exist with this length.

Felix
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva  
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

  reply	other threads:[~2023-02-20  9:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-14 11:00 Felix Willgerodt
2023-02-14 15:14 ` Tom Tromey
2023-02-15  9:05   ` Willgerodt, Felix
2023-02-15 16:52     ` Tom Tromey
2023-02-20  9:17       ` Willgerodt, Felix [this message]
2023-02-24 14:11         ` Tom Tromey
2023-02-28 10:21           ` Willgerodt, Felix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MN2PR11MB45666F618FA971DCB5EFF2408EA49@MN2PR11MB4566.namprd11.prod.outlook.com \
    --to=felix.willgerodt@intel.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).