1// Copyright 2018 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// +build gccgo
7
8package cpu
9
10//extern gccgoGetCpuidCount
11func gccgoGetCpuidCount(eaxArg, ecxArg uint32, eax, ebx, ecx, edx *uint32)
12
13func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) {
14	var a, b, c, d uint32
15	gccgoGetCpuidCount(eaxArg, ecxArg, &a, &b, &c, &d)
16	return a, b, c, d
17}
18
19//extern gccgoXgetbv
20func gccgoXgetbv(eax, edx *uint32)
21
22func xgetbv() (eax, edx uint32) {
23	var a, d uint32
24	gccgoXgetbv(&a, &d)
25	return a, d
26}
27