summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/specialreg.h
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2009-09-10 17:27:36 +0000
committerjkim <jkim@FreeBSD.org>2009-09-10 17:27:36 +0000
commitbe05b1436b447ef36146259400f93cfd997b2411 (patch)
treed5de1bb581acd0166dbeadb709641909a975358a /sys/amd64/include/specialreg.h
parente4fc8331e6ad16cd47da1d2884498d46200e7eb6 (diff)
downloadFreeBSD-src-be05b1436b447ef36146259400f93cfd997b2411.zip
FreeBSD-src-be05b1436b447ef36146259400f93cfd997b2411.tar.gz
Consolidate CPUID to CPU family/model macros for amd64 and i386 to reduce
unnecessary #ifdef's for shared code between them.
Diffstat (limited to 'sys/amd64/include/specialreg.h')
-rw-r--r--sys/amd64/include/specialreg.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/amd64/include/specialreg.h b/sys/amd64/include/specialreg.h
index 88ff734..d1f0c89 100644
--- a/sys/amd64/include/specialreg.h
+++ b/sys/amd64/include/specialreg.h
@@ -168,10 +168,10 @@
#define CPUID_FAMILY 0x00000f00
#define CPUID_EXT_MODEL 0x000f0000
#define CPUID_EXT_FAMILY 0x0ff00000
-#define AMD64_CPU_MODEL(id) \
+#define CPUID_TO_MODEL(id) \
((((id) & CPUID_MODEL) >> 4) | \
(((id) & CPUID_EXT_MODEL) >> 12))
-#define AMD64_CPU_FAMILY(id) \
+#define CPUID_TO_FAMILY(id) \
((((id) & CPUID_FAMILY) >> 8) + \
(((id) & CPUID_EXT_FAMILY) >> 20))
OpenPOWER on IntegriCloud