Added Windows calling convention registers
This commit is contained in:
parent
9c6eb45fe9
commit
58a157c864
2 changed files with 38 additions and 1 deletions
|
@ -15,6 +15,7 @@ import (
|
|||
"git.akyoto.dev/cli/q/src/exe/pe"
|
||||
"git.akyoto.dev/cli/q/src/os/linux"
|
||||
"git.akyoto.dev/cli/q/src/os/mac"
|
||||
"git.akyoto.dev/cli/q/src/os/windows"
|
||||
)
|
||||
|
||||
// Result contains all the compiled functions in a build.
|
||||
|
@ -72,7 +73,7 @@ func (r *Result) finalize() ([]byte, []byte) {
|
|||
final.Syscall()
|
||||
case "windows":
|
||||
final.RegisterNumber(asm.SUB, x64.RSP, 32+8)
|
||||
final.RegisterNumber(asm.MOVE, x64.RCX, 1)
|
||||
final.RegisterNumber(asm.MOVE, windows.X64InputRegisters[0], 1)
|
||||
final.Label(asm.CALL_AT, "ExitProcess")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue