mirror of
https://github.com/golang/go
synced 2024-11-05 17:36:15 -07:00
syscall: avoid zeroing unused syscall arguments
Zeroing unused registers is not required. Removing it makes the code
very slightly smaller and very slightly faster.
Change-Id: I1ec17b497db971ca8a3641e3e94c063571419f27
GitHub-Last-Rev: f721bb2636
GitHub-Pull-Request: golang/go#31596
Reviewed-on: https://go-review.googlesource.com/c/go/+/173160
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
782228a73f
commit
531f1d50cc
@ -17,9 +17,6 @@ TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||
MOVQ a1+8(FP), DI
|
||||
MOVQ a2+16(FP), SI
|
||||
MOVQ a3+24(FP), DX
|
||||
MOVQ $0, R10
|
||||
MOVQ $0, R8
|
||||
MOVQ $0, R9
|
||||
MOVQ trap+0(FP), AX // syscall entry
|
||||
ADDQ $0x2000000, AX
|
||||
SYSCALL
|
||||
@ -100,9 +97,6 @@ TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||
MOVQ a1+8(FP), DI
|
||||
MOVQ a2+16(FP), SI
|
||||
MOVQ a3+24(FP), DX
|
||||
MOVQ $0, R10
|
||||
MOVQ $0, R8
|
||||
MOVQ $0, R9
|
||||
MOVQ trap+0(FP), AX // syscall entry
|
||||
ADDQ $0x2000000, AX
|
||||
SYSCALL
|
||||
|
@ -19,9 +19,6 @@ TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||
MOVQ a1+8(FP), DI
|
||||
MOVQ a2+16(FP), SI
|
||||
MOVQ a3+24(FP), DX
|
||||
MOVQ $0, R10
|
||||
MOVQ $0, R8
|
||||
MOVQ $0, R9
|
||||
MOVQ trap+0(FP), AX // syscall entry
|
||||
SYSCALL
|
||||
CMPQ AX, $0xfffffffffffff001
|
||||
@ -70,9 +67,6 @@ TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||
MOVQ a1+8(FP), DI
|
||||
MOVQ a2+16(FP), SI
|
||||
MOVQ a3+24(FP), DX
|
||||
MOVQ $0, R10
|
||||
MOVQ $0, R8
|
||||
MOVQ $0, R9
|
||||
MOVQ trap+0(FP), AX // syscall entry
|
||||
SYSCALL
|
||||
CMPQ AX, $0xfffffffffffff001
|
||||
@ -139,9 +133,6 @@ TEXT ·rawSyscallNoError(SB),NOSPLIT,$0-48
|
||||
MOVQ a1+8(FP), DI
|
||||
MOVQ a2+16(FP), SI
|
||||
MOVQ a3+24(FP), DX
|
||||
MOVQ $0, R10
|
||||
MOVQ $0, R8
|
||||
MOVQ $0, R9
|
||||
MOVQ trap+0(FP), AX // syscall entry
|
||||
SYSCALL
|
||||
MOVQ AX, r1+32(FP)
|
||||
|
@ -21,9 +21,6 @@ TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||
MOVQ a1+8(FP), DI
|
||||
MOVQ a2+16(FP), SI
|
||||
MOVQ a3+24(FP), DX
|
||||
MOVQ $0, R10
|
||||
MOVQ $0, R8
|
||||
MOVQ $0, R9
|
||||
SYSCALL
|
||||
JCC ok
|
||||
MOVQ $-1, r1+32(FP) // r1
|
||||
@ -65,9 +62,6 @@ TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||
MOVQ a1+8(FP), DI
|
||||
MOVQ a2+16(FP), SI
|
||||
MOVQ a3+24(FP), DX
|
||||
MOVQ $0, R10
|
||||
MOVQ $0, R8
|
||||
MOVQ $0, R9
|
||||
MOVQ trap+0(FP), AX // syscall entry
|
||||
SYSCALL
|
||||
JCC ok1
|
||||
|
Loading…
Reference in New Issue
Block a user