Minor - clarify bit logic in mptable.c.
authorKevin O'Connor <kevin@koconnor.net>
Tue, 27 Jul 2010 02:34:37 +0000 (22:34 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Tue, 27 Jul 2010 02:34:37 +0000 (22:34 -0400)
src/mptable.c

index bf48a5e33bdaba7d95af438b08ce2ab725622f47..e5952c3ad706a2e6867dcf749338ca809e71fe8e 100644 (file)
@@ -1,6 +1,6 @@
 // MPTable generation (on emulators)
 //
-// Copyright (C) 2008,2009  Kevin O'Connor <kevin@koconnor.net>
+// Copyright (C) 2008-2010  Kevin O'Connor <kevin@koconnor.net>
 // Copyright (C) 2006 Fabrice Bellard
 //
 // This file may be distributed under the terms of the GNU LGPLv3 license.
@@ -59,7 +59,7 @@ mptable_init(void)
         cpu->apicid = i;
         cpu->apicver = apic_version;
         /* cpu flags: enabled, bootstrap cpu */
-        cpu->cpuflag = (i < CountCPUs) | ((i == 0) << 1);
+        cpu->cpuflag = ((i<CountCPUs) ? 0x01 : 0x00) | ((i==0) ? 0x02 : 0x00);
         cpu->cpusignature = cpuid_signature;
         cpu->featureflag = cpuid_features;
         cpu++;