yurydelendik opened Issue #2372:
The issue is a part of #2079 (and possibly #1642 ?). The issue needs to be extended to all new backends (x64 and aarch64). This will require implementing the win64 fastcall ABI support in cranelift/codegen/src/machinst/ to fix e.g. tests/all/traps.rs tests.
cfallin commented on Issue #2372:
AFAIK, aarch64 doesn't have a separate fastcall ABI (at least according to this doc) -- @peterhuene can you confirm?
yurydelendik commented on Issue #2372:
aarch64 doesn't have a separate fastcall ABI
MS docs refer it as "mostly AArch64 EABI". Will we call it
CallConv::SystemV
or will add different values?
yurydelendik edited Issue #2372:
The issue is a part of #2079 (and possibly #1642 ?). The issue needs to be extended to all new backends (x64 and aarch64). This will require implementing the win64 fastcall ABI (or "mostly AArch64 EABI") support in cranelift/codegen/src/machinst/ to fix e.g. tests/all/traps.rs tests.
cfallin commented on Issue #2372:
I read through the doc and compared it to the standard AArch64 ABI; it seems that all of the basic details are the same (register roles, stack requirements, etc.). The only differences I spotted were that the AArch64 ABI specifies FPCR (FPU control register) is undefined and must not be modified, while Windows specifies it is callee-save; and that Windows has its own exception unwind, of course. The FPCR difference shouldn't matter as we never modify the register.
So as far as I can tell, we can just use the
SystemV
ABI for Windows on AArch64, but others please do say something if that's wrong!
peterhuene commented on Issue #2372:
I believe your assessment of the calling convention is correct, that being it won't differ from AArch64 ABI in ways that concern Cranelift.
However, I think we'll need a different
CallConv
value for Windows "ARM64" to differentiate the unwind information.While we're there, I would love for us to stop calling it "Windows fastcall" instead of "Windows x64" in Cranelift, but that ship has probably sailed.
peterhuene edited a comment on Issue #2372:
I believe your assessment of the calling convention is correct: it won't differ from the AArch64 ABI in ways that concern Cranelift.
However, I think we'll need a different
CallConv
value for Windows "ARM64" to differentiate the unwind information.While we're there, I would love for us to stop calling it "Windows fastcall" instead of "Windows x64" in Cranelift, but that ship has probably sailed.
peterhuene commented on Issue #2372:
I guess we could also just rename
WindowsFastcall
to simplyWindows
and use the same value for both x64 and ARM backends for unwind information generation. "Fastcall" just leaves a x86 taste in my mouth.
yurydelendik commented on Issue #2372:
I guess we could also just rename WindowsFastcall to simply Windows
Yeah, I am counting we will do just that.
Last updated: Nov 22 2024 at 16:03 UTC