Improved Windows support
This commit is contained in:
parent
a7835a4494
commit
32ae625af4
8 changed files with 50 additions and 8 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue