-
-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't reverse parameters order for extern(D) #3873
Conversation
39f274a
to
f965d3d
Compare
I must have missed some 32-bit x86 bits, some 32-bit Linux multilib tests fail. Edit: fixed. On Linux/Mac x64, things are interesting - the entire testsuite passes, but a compiler compiled by itself fails to compile the runtime libs, complaining about forward references wrt. templates. |
767fe60
to
6d782e9
Compare
Turns out the frontend itself depends on some peculiar @p0nce: How badly would this breaking ABI change affect your intel-intrinsics project? Accessing parameters of |
@kinke well I don't use |
Thanks @p0nce. - @JohanEngelen: Any potential problems for Weka?
This 'just' brings the compiler in line with the spec (and LDC more compatible with GDC) - at least for non-32-bit-x86 targets (I don't reverse the params on 32-bit x86 anymore either, and now accordingly optionally pass the first param in a GP register, not the last one). I've wanted to rectify this for years and the topic keeps popping up every few months in the forum, so I don't really want to wait much longer (or even on DMD to follow suit). |
void setFPUControlState(ushort dummy, ushort newState) nothrow @nogc
{
asm nothrow @nogc
{
fclex;
fldcw newState;
}
} Will that sort of inline assembly keep working? |
Yes, it only affects code that assumed params to end up in particular registers or stack slots. No problem when regularly accessing by symbol. |
0d5c0df
to
81fce95
Compare
I don't expect problems: I've converted all assembly to LLVM IR or intrinsics (AArch compatibility). Or it is an The build process seems to depend on libdparse, and that has assembly in it that appears to be affected: |
Great Johan, thx for testing. Yes, libdparse would need some apparently pretty trivial adaptations (and the asm should then work on x86 in general, not just for Posix x64, and with GDC too). |
I have tested this for Symmetry, no problems so far, testsuite is green. |
No description provided.