Open szdytom opened 2 years ago
I tired to port the compiler to Windws but there are some errors:
Generated out.s does not compile correctly on Windows.
GAS(the AT&T asm) on Windows don't work identical, it have a little difference about psedo-ops. So I wrote a cg.c for NASM.
cg.c
It passes the compiling stage, but it still faces a runtime error. It seems because of something called shadow storage on Windows:
The x64 Application Binary Interface (ABI) uses a four-register fast-call calling convention by default. Space is allocated on the call stack as a shadow store for callees to save those registers. https://docs.microsoft.com/en-us/cpp/build/x64-calling-convention?view=msvc-170
the x64 calling convention on Windows it very different (and hard to understand for me), do you have any idea on fixing this?
Is your nasm cg.c available @szdytom?
I tired to port the compiler to Windws but there are some errors:
Generated out.s does not compile correctly on Windows.
GAS(the AT&T asm) on Windows don't work identical, it have a little difference about psedo-ops. So I wrote a
cg.c
for NASM.It passes the compiling stage, but it still faces a runtime error. It seems because of something called shadow storage on Windows:
the x64 calling convention on Windows it very different (and hard to understand for me), do you have any idea on fixing this?