Merge pull request #1 from google/master

Sync with head
diff --git a/include/internal/bit_utils.h b/include/internal/bit_utils.h
index 75f0cdd..bc965cb 100644
--- a/include/internal/bit_utils.h
+++ b/include/internal/bit_utils.h
@@ -28,7 +28,7 @@
 
 inline static uint32_t ExtractBitRange(uint32_t reg, uint32_t msb,
                                        uint32_t lsb) {
-  const uint64_t bits = msb - lsb + 1;
+  const uint64_t bits = msb - lsb + 1ULL;
   const uint64_t mask = (1ULL << bits) - 1ULL;
   assert(msb >= lsb);
   return (reg >> lsb) & mask;
diff --git a/src/cpuinfo_x86.c b/src/cpuinfo_x86.c
index 390e8c9..0114817 100644
--- a/src/cpuinfo_x86.c
+++ b/src/cpuinfo_x86.c
@@ -149,7 +149,7 @@
   return info;
 }
 
-#define CPUID(FAMILY, MODEL) (((FAMILY & 0xFF) << 8) | (MODEL & 0xFF))
+#define CPUID(FAMILY, MODEL) ((((FAMILY) & 0xFF) << 8) | ((MODEL) & 0xFF))
 
 X86Microarchitecture GetX86Microarchitecture(const X86Info* info) {
   if (memcmp(info->vendor, "GenuineIntel", sizeof(info->vendor)) == 0) {