]> git.proxmox.com Git - ceph.git/blame - ceph/src/arrow/go/arrow/internal/cpu/cpu_x86.s
import quincy 17.2.0
[ceph.git] / ceph / src / arrow / go / arrow / internal / cpu / cpu_x86.s
CommitLineData
1d09f67e
TL
1// Copyright 2017 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// +build 386 amd64 amd64p32
6
7#include "textflag.h"
8
9// func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32)
10TEXT ·cpuid(SB), NOSPLIT, $0-24
11 MOVL eaxArg+0(FP), AX
12 MOVL ecxArg+4(FP), CX
13 CPUID
14 MOVL AX, eax+8(FP)
15 MOVL BX, ebx+12(FP)
16 MOVL CX, ecx+16(FP)
17 MOVL DX, edx+20(FP)
18 RET
19
20// func xgetbv() (eax, edx uint32)
21TEXT ·xgetbv(SB),NOSPLIT,$0-8
22#ifdef GOOS_nacl
23 // nacl does not support XGETBV.
24 MOVL $0, eax+0(FP)
25 MOVL $0, edx+4(FP)
26#else
27 MOVL $0, CX
28 XGETBV
29 MOVL AX, eax+0(FP)
30 MOVL DX, edx+4(FP)
31#endif
32 RET