Improved Windows ABI support
This commit is contained in:
@ -9,15 +9,10 @@ import (
|
||||
|
||||
func (c *compiler) dllCall(x asm.Instruction) {
|
||||
size := 4
|
||||
// TODO: R15 could be in use.
|
||||
c.code = x86.MoveRegisterRegister(c.code, x86.R15, x86.RSP)
|
||||
c.code = x86.AlignStack(c.code)
|
||||
c.code = x86.SubRegisterNumber(c.code, x86.RSP, 32)
|
||||
c.code = x86.CallAtAddress(c.code, 0x00_00_00_00)
|
||||
position := len(c.code) - size
|
||||
c.code = x86.MoveRegisterRegister(c.code, x86.RSP, x86.R15)
|
||||
|
||||
label := x.Data.(*asm.Label)
|
||||
|
||||
pointer := &pointer{
|
||||
Position: Address(position),
|
||||
OpSize: 2,
|
||||
|
Reference in New Issue
Block a user