This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch, libiberty, gdb] IEEE 754 half floating-point format
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Ken Werner <ken at linux dot vnet dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 18 Nov 2010 09:44:27 -0800
- Subject: Re: [patch, libiberty, gdb] IEEE 754 half floating-point format
- References: <201007021859.05191.ken@linux.vnet.ibm.com>
> include/ChangeLog:
>
> 2010-07-02 Ken Werner <ken.werner@de.ibm.com>
>
> * gfloatformat.h (floatformat_ieee_half_big): Add declaration.
^^^ typo
> (floatformat_ieee_half_little): Likewise.
>
> libiberty/ChangeLog:
>
> 2010-07-02 Ken Werner <ken.werner@de.ibm.com>
>
> * floatformat.c (floatformat_ieee_half_big): New variable.
> (floatformat_ieee_half_little): Likewise.
This part should be submitted to GCC, I think?
> 2010-07-02 Ken Werner <ken.werner@de.ibm.com>
>
> * gdbtypes.h (floatformats_ieee_half): Add declaration.
> * gdbtypes.c (floatformats_ieee_half): New variable.
> * doublest.c (floatformat_from_length): Set format to
> gdbarch_half_format if length matches.
> * gdbarch.sh (half_bit): New architecture method.
> (half_format): Likewise.
> * gdbarch.h: Regenerate.
> * gdbarch.c: Likewise.
My only comment regarding this part of the patch is that "half_bit"
and "half_format" isn't very intuitive. Perhaps that's more obvious
to someone who programs in OpenCL if "half" is a type name? For
the other arch routines, the routine name makes it clear that it's
about floating point types, because it contains a name that is
clearly associated to floats (float, double, long double). What
about using "half_float_bit" and "half_float_format"?
What do others think?
--
Joel