Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Oct 2008 17:36:52 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r184170 - head/sys/amd64/include
Message-ID:  <200810221736.m9MHaqHX034645@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jkim
Date: Wed Oct 22 17:36:52 2008
New Revision: 184170
URL: http://svn.freebsd.org/changeset/base/184170

Log:
  Simplify AMD64_CPU_MODEL() and AMD64_CPU_FAMILY() macros as the base family
  should be at least 0xf00 for all supported platforms.

Modified:
  head/sys/amd64/include/specialreg.h

Modified: head/sys/amd64/include/specialreg.h
==============================================================================
--- head/sys/amd64/include/specialreg.h	Wed Oct 22 17:30:37 2008	(r184169)
+++ head/sys/amd64/include/specialreg.h	Wed Oct 22 17:36:52 2008	(r184170)
@@ -162,12 +162,10 @@
 #define	CPUID_EXT_FAMILY	0x0ff00000
 #define	AMD64_CPU_MODEL(id) \
     ((((id) & CPUID_MODEL) >> 4) | \
-    ((((id) & CPUID_FAMILY) >= 0x600) ? \
-    (((id) & CPUID_EXT_MODEL) >> 12) : 0))
+    (((id) & CPUID_EXT_MODEL) >> 12))
 #define	AMD64_CPU_FAMILY(id) \
     ((((id) & CPUID_FAMILY) >> 8) + \
-    ((((id) & CPUID_FAMILY) == 0xf00) ? \
-    (((id) & CPUID_EXT_FAMILY) >> 20) : 0))
+    (((id) & CPUID_EXT_FAMILY) >> 20))
 
 /*
  * CPUID instruction 1 ebx info



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810221736.m9MHaqHX034645>