[cxx-abi-dev] Mangling of ISO/IEC TR 18037 fixed-point types?
David Vandevoorde
daveed at edg.com
Fri Dec 5 15:38:47 UTC 2008
On Dec 4, 2008, at 2:30 PM, Jason Merrill wrote:
> GCC supports fixed-point arithmetic along the lines of the above
> standard, but there's currently no mangling specified in the ABI.
> Anyone want to propose one? Do other compilers have support for
> these types?
We implemented these some time ago for C, but not C++ (so we didn't
decide on mangling).
How about:
DF [a|f] <kind>
with "a" for _Accum types, and "f" for _Fract types, and <kind>
imitating the integer types:
<kind> = s for "signed short"
t for "unsigned short"
i for "signed"
j for "unsigned"
l for "long"
m for "unsigned long"
E.g., "unsigned long _Accum" would be encoded as "DFam".
Alternatively, if we think a single platform may have different
precision choices for these types, we could go with:
DF <accumbits(opt)> <kind> <fractbits> _
where
<accumbits(opt)> = nothing for _Fract types
the number of explicit nonfractional bits for
_Accum types (base 10 digits)
<fractbits> = the number of fractional bits (base 10 digits)
E.g., "short _Fract" might get encoded as "DFs15_" if the compiler
implements _Fract as a 16-bit type, or "DFs7_" if it uses an 8-bit
type (e.g., to map on Intel MMX).
Daveed
More information about the cxx-abi-dev
mailing list