some wrap to cpp
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
|
||||
extern "C" {
|
||||
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
void llgo_getcpuid(unsigned int eax, unsigned int ecx,
|
||||
unsigned int *a, unsigned int *b,
|
||||
@@ -19,3 +22,5 @@ void llgo_getcpuid(unsigned int eax, unsigned int ecx,
|
||||
#else
|
||||
#error This code requires GCC or Clang
|
||||
#endif
|
||||
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
const (
|
||||
LLGoPackage = "link"
|
||||
LLGoFiles = "_wrap/cpu_x86.c"
|
||||
LLGoFiles = "_wrap/cpu_x86.cpp"
|
||||
)
|
||||
|
||||
//go:linkname c_getcpuid C.llgo_getcpuid
|
||||
|
||||
Reference in New Issue
Block a user