[PATCH] D20970: [cpu-detection] Naming convention

Alina Sbirlea via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 3 12:33:44 PDT 2016


asbirlea added inline comments.

================
Comment at: lib/Support/Host.cpp:189-190
@@ -189,7 +188,4 @@
 
-static void DetectX86FamilyModel(unsigned EAX, unsigned &Family,
-                                 unsigned &Model) {
-  Family = (EAX >> 8) & 0xf; // Bits 8 - 11
-  Model = (EAX >> 4) & 0xf;  // Bits 4 - 7
-  if (Family == 6 || Family == 0xf) {
-    if (Family == 0xf)
+static void detectX86FamilyModel(unsigned EAX, unsigned *Family,
+                                 unsigned *Model) {
+  *Family = (EAX >> 8) & 0xf; // Bits 8 - 11
----------------
echristo wrote:
> Why are you changing the references to pointers?
1. Consistency withe the above methods.
2. Planning to port the same code into compiler-rt/ as ***.c (it will address Bug 25510).


http://reviews.llvm.org/D20970





More information about the llvm-commits mailing list