Improved Windows support

This commit is contained in:
Eduard Urbach 2024-08-19 17:25:51 +02:00
parent a7835a4494
commit 32ae625af4
Signed by: eduard
GPG key ID: 49226B848C78F6C8
8 changed files with 50 additions and 8 deletions

View file

@ -50,7 +50,6 @@ func (r *Result) finalize() ([]byte, []byte, dll.List) {
final.RegisterNumber(asm.MOVE, x64.SyscallInputRegisters[1], 0)
final.Syscall()
case "windows":
final.RegisterNumber(asm.SUB, x64.RSP, 8)
final.RegisterNumber(asm.MOVE, windows.X64InputRegisters[0], 0)
final.DLLCall("kernel32.ExitProcess")
}
@ -83,9 +82,8 @@ func (r *Result) finalize() ([]byte, []byte, dll.List) {
final.RegisterNumber(asm.MOVE, x64.SyscallInputRegisters[1], 1)
final.Syscall()
case "windows":
final.RegisterNumber(asm.SUB, x64.RSP, 8)
final.RegisterNumber(asm.MOVE, windows.X64InputRegisters[0], 1)
final.Label(asm.DLLCALL, "kernel32.ExitProcess")
final.DLLCall("kernel32.ExitProcess")
}
code, data := final.Finalize(dlls)