Make __int128 mandatory

39 views
Skip to first unread message

H.J. Lu

unread,
Dec 22, 2023, 3:26:47 PM12/22/23
to x86-64-abi
Hi,

Should we make __int128 mandatory:

https://gitlab.com/x86-psABIs/x86-64-ABI/-/merge_requests/51


--
H.J.

Jan Beulich

unread,
Jan 4, 2024, 3:39:59 AMJan 4
to H.J. Lu, x86-64-abi
On 22.12.2023 21:26, H.J. Lu wrote:
> Should we make __int128 mandatory:
>
> https://gitlab.com/x86-psABIs/x86-64-ABI/-/merge_requests/51

I don't think the suggested text change is enough. When no longer optional,
I think it needs saying explicitly whether in terms of C the types (i.e.
also explicitly covering its unsigned counterpart) are standard integer
types, or extended ones. As to other languages it's also not clear to me
what possible (further) implications there may be.

Jan

Michael Matz

unread,
Jan 9, 2024, 12:45:46 PMJan 9
to Jan Beulich, H.J. Lu, x86-64-abi
Hello,

On Thu, 4 Jan 2024, 'Jan Beulich' via X86-64 System V Application Binary Interface wrote:

> On 22.12.2023 21:26, H.J. Lu wrote:
> > Should we make __int128 mandatory:
> >
> > https://gitlab.com/x86-psABIs/x86-64-ABI/-/merge_requests/51
>
> I don't think the suggested text change is enough.

The reference to the "these are optional" footnote needs to go as well
then. But ...

> When no longer optional,
> I think it needs saying explicitly whether in terms of C the types (i.e.
> also explicitly covering its unsigned counterpart) are standard integer
> types, or extended ones.

... this. Hmm hmm, does it need to? Strictly speaking that's language
semantics, which the psABI should not get involved in too much, i.e. this
would need to go into the docu of a respective compiler. E.g. GCC doesn't
support any extended integer types (implying that __int128, when
supported, is a standard one).

On the bigger topic if the psABI should or shouldn't make __int128
mandatory at all: I don't really see a reason to make it mandatory. There
are (toy?) compilers that don't support __int128, and they still might
strive to be ABI compliant, and if the user doesn't write code using
those types they actually are, right now. They wouldn't be anymore after
the change, strictly speaking. But without any advantages to the world at
large.

So, I'm actually not in favor of the change.


Ciao,
Michael.

--2345E24CF23.1704819654/knuth.suse.de--
ReSent-Date: Tue, 9 Jan 2024 18:45:36 +0100 (CET)
ReSent-From: Michael Matz <ma...@suse.de>
ReSent-To: x86-6...@googlegroups.com
ReSent-Subject: Re: Make __int128 mandatory
ReSent-Message-ID: <3df7efa4-e963-bda3...@suse.de>

Hello,

On Thu, 4 Jan 2024, 'Jan Beulich' via X86-64 System V Application Binary Interface wrote:

> On 22.12.2023 21:26, H.J. Lu wrote:
> > Should we make __int128 mandatory:
> >
> > https://gitlab.com/x86-psABIs/x86-64-ABI/-/merge_requests/51
>
> I don't think the suggested text change is enough.

The reference to the "these are optional" footnote needs to go as well
then. But ...

> When no longer optional,
> I think it needs saying explicitly whether in terms of C the types (i.e.
> also explicitly covering its unsigned counterpart) are standard integer
> types, or extended ones.

... this. Hmm hmm, does it need to? Strictly speaking that's language
semantics, which the psABI should not get involved in too much, i.e. this
would need to go into the docu of a respective compiler. E.g. GCC doesn't
support any extended integer types (implying that __int128, when
supported, is a standard one).

On the bigger topic if the psABI should or shouldn't make __int128
mandatory at all: I don't really see a reason to make it mandatory. There
are (toy?) compilers that don't support __int128, and they still might
strive to be ABI compliant, and if the user doesn't write code using
those types they actually are, right now. They wouldn't be anymore after
the change, strictly speaking. But without any advantages to the world at
large.

So, I'm actually not in favor of the change.


Ciao,
Michael.

--2345E24CF23.1704819654/knuth.suse.de--

Reply all
Reply to author
Forward
0 new messages