#define XSAVE_AREA_MASK \
  ((1 << 1) | (1 << 2) | (1 << 3) | (1 << 5) | (1 << 6) | (1 << 7))

	.text
	.p2align 4,,15
	.globl	xsave
	.type	xsave, @function
xsave:
	.cfi_startproc
	movl	$XSAVE_AREA_MASK, %eax
	xorl	%edx, %edx
	movq	%rdx, xsave_area+512
	movq	%rdx, xsave_area+512+8
	movq	%rdx, xsave_area+512+8*2
	movq	%rdx, xsave_area+512+8*3
	movq	%rdx, xsave_area+512+8*4
	movq	%rdx, xsave_area+512+8*5
	movq	%rdx, xsave_area+512+8*6
	movq	%rdx, xsave_area+512+8*7
	xsave	xsave_area
	movl	$XSAVE_AREA_MASK, %eax
	xorl	%edx, %edx
	xrstor	xsave_area
	ret
	.cfi_endproc
	.size	xsave, .-xsave
	.section	.note.GNU-stack,"",@progbits
