delve/pkg/proc/amd64util/xsave_amd64.s
Alessandro Arzilli 24ec1754b2
proc: use CPUID to determine maximum size of XSAVE area (#2256)
the maximum size of the Xsave area was previously hardcoded but the
CPUID instruction can be used to determine its maximum size.
2020-12-14 09:39:01 -08:00

10 lines
168 B
ArmAsm

TEXT ·cpuid(SB),$0-24
MOVL axIn+0(FP), AX
MOVL cxIn+4(FP), CX
CPUID
MOVL AX, axOut+8(FP)
MOVL BX, bxOut+12(FP)
MOVL CX, cxOut+16(FP)
MOVL DX, dxOut+20(FP)
RET