saw the following inconsistency (no r2 return value on windows amd64?) in
the "TEXT runtime·asmstdcall(SB),NOSPLIT,$0" assembly:
// file: runtime/sys_windows_386.go
...
// Return result.
MOVL fn+0(FP), BX
MOVL AX, libcall_r1(BX)
MOVL DX, libcall_r2(BX)
// file: runtime/sys_windows_amd64.go
...
// Return result.
POPQ CX
MOVQ AX, libcall_r1(CX)
The corresponding assembly for darwin, linux, and freebsd in
syscall/asm_*.s all appear to return r2 from DX for both 386 and amd64
similar to the following linux assembly:
// file: syscall/asm_linux_386.s
...
ok:
MOVL AX, r1+16(FP)
MOVL DX, r2+20(FP)
MOVL $0, err+24(FP)
CALL runtime·exitsyscall(SB)
RET
// file: syscall/asm_linux_amd64.s
...
ok:
MOVQ AX, r1+32(FP)
MOVQ DX, r2+40(FP)
MOVQ $0, err+48(FP)
CALL runtime·exitsyscall(SB)
RET
Is this a bug for syscall on windows amd64, or do I not yet grok the go
assembly? If a bug, what is the real-world impact?
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.