Here is the link: https://groups.google.com/forum/#!topic/ia32-abi/nq6cvH_VVV4 -- H.J.
On Thu, Jan 22, 2015 at 4:35 AM, H.J. Lu <hjl.tools at gmail.com> wrote:> Here is the link: > > https://groups.google.com/forum/#!topic/ia32-abi/nq6cvH_VVV4The document contains this claim (as do many other psABI documents): "Bit-fields that are neither signed nor unsigned always have non-negative values. Although they may have type char, short, int, or long (which can have negative values), these bit-fields have the same range as a bit-field of the same size with the corresponding unsigned type." This does not reflect the ABI as widely implemented, and is incompatible with C++ (in which plain bit-fields are required to be signed). GCC documents why they ignore the psABI in this regard here: https://gcc.gnu.org/onlinedocs/gcc/Non-bugs.html#Non-bugs I would suggest either removing this specification from the psABI or correcting it to reflect actual implementation practice: plain bit-fields are signed.
On Thu, Jan 22, 2015 at 11:54 AM, Richard Smith <richard at metafoo.co.uk> wrote:> On Thu, Jan 22, 2015 at 4:35 AM, H.J. Lu <hjl.tools at gmail.com> wrote: >> Here is the link: >> >> https://groups.google.com/forum/#!topic/ia32-abi/nq6cvH_VVV4 > > The document contains this claim (as do many other psABI documents): > > "Bit-fields that are neither signed nor unsigned > always have non-negative values. Although they may have type char, > short, int, or long (which can have negative values), these bit-fields > have the same range as a bit-field of the same size with the > corresponding unsigned type." >Can you show me where this paragraph in IA-32 psABI? I couldn't find it in my copy. -- H.J.
On Thu, 22 Jan 2015, H.J. Lu wrote:> Here is the link: > > https://groups.google.com/forum/#!topic/ia32-abi/nq6cvH_VVV4I sent the following reply to the ia32-abi list but haven't yet received it back from the list - you might want to check if it's stuck in moderation somewhere: I would suggest that rather than using old terms such as "single", "double" and "128-bit extended" to describe floating-point formats, and rather than referring to "IEEE-754R", the names from IEEE 754-2008 should be used. That is, binary32, binary64, binary128. (When referring to decimal32, decimal64, decimal128 you still need to specify somewhere that it's BID rather than DPD. And you'll still need to refer to 80-bit extended since that's not an IEEE interchange format.) -- Joseph S. Myers joseph at codesourcery.com
On Thu, Jan 22, 2015 at 1:13 PM, Joseph Myers <joseph at codesourcery.com> wrote:> On Thu, 22 Jan 2015, H.J. Lu wrote: > >> Here is the link: >> >> https://groups.google.com/forum/#!topic/ia32-abi/nq6cvH_VVV4 > > I sent the following reply to the ia32-abi list but haven't yet received > it back from the list - you might want to check if it's stuck in > moderation somewhere:Gmail put the message in "Promotion" category :-).> I would suggest that rather than using old terms such as "single", > "double" and "128-bit extended" to describe floating-point formats, and > rather than referring to "IEEE-754R", the names from IEEE 754-2008 should > be used. That is, binary32, binary64, binary128. (When referring to > decimal32, decimal64, decimal128 you still need to specify somewhere that > it's BID rather than DPD. And you'll still need to refer to 80-bit > extended since that's not an IEEE interchange format.) >This change should be made in x86-64 psABI first before cherry-picked into IA-32 psABI. -- H.J.