lhmouse wrote:
> > I think that's a bit overkill. The ecosystem of active mingw developers
> > isn't very big (and those who are interested in arm64ec is even smaller),
> > and all of them are already CCd on this PR.
>
> 1. I think the community should also be involved in this.
> 2. I think the Clang Area Team should evaluate the complexity this PR
> introduces to Clang, as it's not just a driver option.
Yes, definitely.
> If more people had been involved in the decisions related to MinGW back then,
> I believe this wouldn’t be an issue at all today. Shouldn’t we learn from the
> lessons of history?
That's a hypothesis against the fact.
> > It doesn't solve any existent issues
>
> What? I'm not sure what you mean, but in fact, this solves all the existent
> issues!
>
> * The major historical mistake
> * long double interoperability between {x86_64,arm64ec,aarch64}-{mingw32,msvc}
I don't want to repeat myself over and over. That's just what has happened, and
people will continue to use 80-bit `long double` on x86-64, because they
sometimes find it useful. Also hey look, Microsoft also decided to preserve x87
state during a context switch, even it's completely unused by MSVC for AMD64
since the beginning, so x87 is always there, and working somehow.
I think your question is beyond the scope of this PR. It is about how to make
ARM64EC compatible with current x86-64; it's not about how people should adopt
`-mlong-double-64` when compiling their code for x86-64.
> > but brings new issues by creating a parallel universe.
>
> What parallel universe?
>
> If you're talking about compatibility or consistency with old binaries, then
> this also applies to this PR.
It doesn't apply to this PR. I haven't heard of any use of arm64ec-w64-mingw32
in production. The cost of this move should be very little. OTOH the cost of
moving from 80-bit `long double` to 64-bit on x86-64 is relatively large.
It's actually not about `long double`, **but about `alignof(max_align_t)` as a
side effect.**
> > As a high level idea, I think making specifically the mingw variant of
> > arm64ec use 80 bit long doubles to make it more compatible with x86_64
> > mingw (which indeed is the main target it needs to be consistent and
> > compatible with), is very reasonable to do.
>
> arm64ec is indeed designed for compatibility and consistency, but not with
> MinGW, rather, with MSVC.
I think I said arm64ec-<b>w64-mingw32</b> should be compatible with
x86_64-<b>w64-mingw32</b> and arm64ec-<b>pc-windows-msvc</b> should be
compatible with x86_64-<b>pc-windows-msvc</b>.
Why should arm64ec-w64-mingw32 be compatible with x86_64-pc-windows-msvc? The
C++ ABI has never been compatible at all. And if people want to be compatible
with MSVC, why don't they build for arm64ec-pc-windows instead?
---
Sorry but it could be lengthy to comment on every paragraph of your input. I
think it's better to first persuade users of x87 `long double` to stop using
it, before we start discussion about `-mlong-double-64`.
https://github.com/llvm/llvm-project/pull/237057
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits