1
0
mirror of https://github.com/golang/go synced 2024-11-21 21:24:45 -07:00

internal/cpu: Prefer XOR CX, CX over MOV 0, CX in xgetbv

This makes the code consistent with the gccgo implementation.
This commit is contained in:
Andrew Gaul 2021-07-13 20:00:01 +09:00
parent a98589711d
commit 685cb9af0d

View File

@ -20,7 +20,7 @@ TEXT ·cpuid(SB), NOSPLIT, $0-24
// func xgetbv() (eax, edx uint32)
TEXT ·xgetbv(SB),NOSPLIT,$0-8
MOVL $0, CX
XORL CX, CX
XGETBV
MOVL AX, eax+0(FP)
MOVL DX, edx+4(FP)