chiark
/
gitweb
/
~mdw
/
misc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Release 1.3.1.
[misc]
/
x86-model.c
diff --git
a/x86-model.c
b/x86-model.c
index cb90fb3dab75cd8556f47d7851148d40da48f470..05c47c6f25052be4f66ce03fc2f775f3779af82e 100644
(file)
--- a/
x86-model.c
+++ b/
x86-model.c
@@
-32,7
+32,7
@@
#include <mLib/quis.h>
#include <mLib/report.h>
#include <mLib/quis.h>
#include <mLib/report.h>
-#if !defined(__GNUC__) ||
!defined(__i386__
)
+#if !defined(__GNUC__) ||
(!defined(__i386__) && !defined(__amd64__)
)
# error "This isn't going to work."
#endif
# error "This isn't going to work."
#endif
@@
-44,6
+44,7
@@
struct cpuid { unsigned eax, ebx, ecx, edx; };
static inline void cpuid(unsigned leaf, struct cpuid *c)
{
static inline void cpuid(unsigned leaf, struct cpuid *c)
{
+
__asm__ ("cpuid"
: "=a" (c->eax),
"=b" (c->ebx),
__asm__ ("cpuid"
: "=a" (c->eax),
"=b" (c->ebx),