Improved Windows ABI support

This commit is contained in:
2025-02-15 18:23:33 +01:00
parent 0a1a8f741d
commit d0bcd8cf9f
22 changed files with 124 additions and 32 deletions

View File

@ -33,6 +33,7 @@ func (r *Result) finalize() {
final.Syscall()
case config.Windows:
final.RegisterNumber(asm.MOVE, x86.WindowsInputRegisters[0], 0)
final.RegisterNumber(asm.AND, x86.RSP, -16)
final.DLLCall("kernel32.ExitProcess")
}
@ -67,6 +68,7 @@ func (r *Result) finalize() {
final.Syscall()
case config.Windows:
final.RegisterNumber(asm.MOVE, x86.WindowsInputRegisters[0], 1)
final.RegisterNumber(asm.AND, x86.RSP, -16)
final.DLLCall("kernel32.ExitProcess")
}