[Dwarf-discuss] Re: adding new fundamental types to DWARF
Thu Feb 24 13:42:52 GMT 2005
On Tue, Feb 22, 2005 at 06:26:58PM +1100, Ben Elliston wrote:
> We at IBM are undertaking a project to incorporate the ISO C draft for
> decimal floating point arithmetic into GCC. This extension to the C99
> standard adds three new fundamental types. We would like the debugger
> and other utilities to understand these types.
> How can we go about getting fundamental type numbers assigned by the
> DWARF committee? Would you prefer to see the draft ratified into the
> ISO C standard first? Can we assign numbers from a non-reserved range
> as a temporary measure?
> Regards, Ben
Jan van Dongen of ACE also proposed adding fixed-point type support to the
standard for DSP-C and Embedded C. And we at Concurrent implemented
fixed-point support for Ada, although we never submitted the changes for
approval because no other vendors seemed interested in generalized Ada
However, if fixed-point type support is to be added to the standard, it would
be good if it supported not only the ISO C draft, but also the DSP-C,
Embedded C, and Ada implementations. Since there are now 3 vendors
interested in such support, this seems to me like a good thing to add.
The DSP-C proposal involved new base type encodings for "signed_fixed" and
"unsigned fixed" and a scale attribute which described the number of bits
offset of the binary point. Perhaps Mr. van Dongen can send you a copy of
And here was my response to that proposal:
At Concurrent, we invented a number of our own extensions for Ada's
We also created two new [vendor-specific] encodings:
From your [Mr. van Dongen's] document, I get the impression is that
Embedded C fixed-point types have an implicit binary point, and the
DW_AT_scale is the number of digits to the right of that binary point. In
Ada, although that implementation is desirable when possible, the user is
allowed to use any multiplier, and not restricted to just a power-of-two.
So, instead of DW_AT_scale, we used a DW_AT_small attribute, which
references a double-precision representation of the multiplier. It allows
for perfect representations of powers-of-two (within range of the number
of bits in any reasonable underlying integer type), and also allows many
other non-power-of-two values, too.
Mr. van Dongen then agreed that the DSP-C/EmbeddedC implementation seemed
like a subset of the Ada implementation.
Perhaps Mr. van Dongen's proposal already meets your requirements. Although
hopefully, you won't object to my recommendation that the scale be replaced
with a small.
Concurrent Computer Corporation
More information about the Dwarf-discuss