FYI: IA-32 psABI draft version 0.1

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

FYI: IA-32 psABI draft version 0.1

H.J. Lu
Here is the link:

https://groups.google.com/forum/#!topic/ia32-abi/nq6cvH_VVV4

--
H.J.
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: FYI: IA-32 psABI draft version 0.1

Richard Smith-33
On Thu, Jan 22, 2015 at 4:35 AM, H.J. Lu <[hidden email]> 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."

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.
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: FYI: IA-32 psABI draft version 0.1

H.J. Lu
On Thu, Jan 22, 2015 at 11:54 AM, Richard Smith <[hidden email]> wrote:

> On Thu, Jan 22, 2015 at 4:35 AM, H.J. Lu <[hidden email]> 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.
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: FYI: IA-32 psABI draft version 0.1

H.J. Lu
On Thu, Jan 22, 2015 at 12:00 PM, H.J. Lu <[hidden email]> wrote:

> On Thu, Jan 22, 2015 at 11:54 AM, Richard Smith <[hidden email]> wrote:
>> On Thu, Jan 22, 2015 at 4:35 AM, H.J. Lu <[hidden email]> 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.
>

FYI :-):

commit 2496a6db377b489668e49c39b6f477a4f8f0ec22
Author: H.J. Lu <[hidden email]>
Date:   Wed Jan 7 13:05:49 2015 -0800

    Remove Bit-Fields


--
H.J.
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: FYI: IA-32 psABI draft version 0.1

Joseph Myers
In reply to this post by H.J. Lu
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:

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
[hidden email]
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: FYI: IA-32 psABI draft version 0.1

H.J. Lu
On Thu, Jan 22, 2015 at 1:13 PM, Joseph Myers <[hidden email]> 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.
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: FYI: IA-32 psABI draft version 0.1

Richard Smith-33
In reply to this post by H.J. Lu
On Thu, Jan 22, 2015 at 12:05 PM, H.J. Lu <[hidden email]> wrote:

> On Thu, Jan 22, 2015 at 12:00 PM, H.J. Lu <[hidden email]> wrote:
>> On Thu, Jan 22, 2015 at 11:54 AM, Richard Smith <[hidden email]> wrote:
>>> On Thu, Jan 22, 2015 at 4:35 AM, H.J. Lu <[hidden email]> 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.
>>
>
> FYI :-):
>
> commit 2496a6db377b489668e49c39b6f477a4f8f0ec22
> Author: H.J. Lu <[hidden email]>
> Date:   Wed Jan 7 13:05:49 2015 -0800
>
>     Remove Bit-Fields

Ah, I was looking at the wrong branch ('master' instead of
'hjl/x86/master'). Thanks =)
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev