1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-28 02:37:11 +00:00

pkg/cpuid: lint fixes

This commit is contained in:
Markus Lehtonen 2020-05-19 15:49:54 +03:00
parent 2f4e038f10
commit 523aa894a3
2 changed files with 9 additions and 7 deletions

View file

@ -16,14 +16,14 @@ limitations under the License.
package cpuid
type CpuidRet struct {
type ReturnValue struct {
EAX, EBX, ECX, EDX uint32
}
func Cpuid(eax, ecx uint32) *CpuidRet {
r := &CpuidRet{}
func Cpuid(eax, ecx uint32) *ReturnValue {
r := &ReturnValue{}
r.EAX, r.EBX, r.ECX, r.EDX = cpuidAsm(eax, ecx)
return r
}
func cpuidAsm(eax_arg, ecx_arg uint32) (eax, ebx, ecx, edx uint32)
func cpuidAsm(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32)

View file

@ -16,9 +16,11 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
TEXT ·cpuidAsm(SB), 4, $0 // 4 = NOSPLIT
MOVL eax_arg+0(FP), AX
MOVL ecx_arg+4(FP), CX
#include "textflag.h"
TEXT ·cpuidAsm(SB), NOSPLIT, $0
MOVL eaxArg+0(FP), AX
MOVL ecxArg+4(FP), CX
CPUID
MOVL AX, eax+8(FP)
MOVL BX, ebx+12(FP)