Skip to content

Commit

Permalink
syscall: freebsd/386 Syscall9 (fix build)
Browse files Browse the repository at this point in the history
  • Loading branch information
rsc committed Apr 7, 2011
1 parent c54ed66 commit 6204936
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/pkg/syscall/asm_freebsd_386.s
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,36 @@ ok6:
CALL runtime·exitsyscall(SB)
RET

TEXT ·Syscall9(SB),7,$0
CALL runtime·entersyscall(SB)
MOVL 4(SP), AX // syscall entry
// slide args down on top of system call number
LEAL 8(SP), SI
LEAL 4(SP), DI
CLD
MOVSL
MOVSL
MOVSL
MOVSL
MOVSL
MOVSL
MOVSL
MOVSL
MOVSL
INT $0x80
JAE ok9
MOVL $-1, 44(SP) // r1
MOVL $-1, 48(SP) // r2
MOVL AX, 52(SP) // errno
CALL runtime·exitsyscall(SB)
RET
ok9:
MOVL AX, 44(SP) // r1
MOVL DX, 48(SP) // r2
MOVL $0, 52(SP) // errno
CALL runtime·exitsyscall(SB)
RET

TEXT ·RawSyscall(SB),7,$0
MOVL 4(SP), AX // syscall entry
// slide args down on top of system call number
Expand Down

0 comments on commit 6204936

Please sign in to comment.