Skip to content

Commit c58bc30

Browse files
committed
Fix wrong assignment in compiler_rt
1 parent 1808556 commit c58bc30

File tree

1 file changed

+7
-7
lines changed
  • compiler-rt/lib/builtins/cpu_model

1 file changed

+7
-7
lines changed

compiler-rt/lib/builtins/cpu_model/x86.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ enum ProcessorTypes {
6262
ZHAOXIN_FAM7H,
6363
INTEL_SIERRAFOREST,
6464
INTEL_GRANDRIDGE,
65-
INTEL_CLEARWATERFOREST,
6665
AMDFAM1AH,
6766
CPU_TYPE_MAX
6867
};
@@ -105,6 +104,7 @@ enum ProcessorSubtypes {
105104
AMDFAM1AH_ZNVER5,
106105
INTEL_COREI7_DIAMONDRAPIDS,
107106
INTEL_COREI7_NOVALAKE,
107+
INTEL_CLEARWATERFOREST,
108108
CPU_SUBTYPE_MAX
109109
};
110110

@@ -322,8 +322,8 @@ static void detectX86FamilyModel(unsigned EAX, unsigned *Family,
322322
static const char *getIntelProcessorTypeAndSubtype(unsigned Family,
323323
unsigned Model,
324324
const unsigned *Features,
325-
unsigned *Type,
326-
unsigned *Subtype) {
325+
enum ProcessorTypes *Type,
326+
enum ProcessorSubtypes *Subtype) {
327327
// We select CPU strings to match the code in Host.cpp, but we don't use them
328328
// in compiler-rt.
329329
const char *CPU = 0;
@@ -670,8 +670,8 @@ static const char *getIntelProcessorTypeAndSubtype(unsigned Family,
670670
static const char *getAMDProcessorTypeAndSubtype(unsigned Family,
671671
unsigned Model,
672672
const unsigned *Features,
673-
unsigned *Type,
674-
unsigned *Subtype) {
673+
enum ProcessorTypes *Type,
674+
enum ProcessorSubtypes *Subtype) {
675675
const char *CPU = 0;
676676

677677
switch (Family) {
@@ -1162,8 +1162,8 @@ __attribute__((visibility("hidden")))
11621162
#endif
11631163
struct __processor_model {
11641164
unsigned int __cpu_vendor;
1165-
unsigned int __cpu_type;
1166-
unsigned int __cpu_subtype;
1165+
enum ProcessorTypes __cpu_type;
1166+
enum ProcessorSubtypes __cpu_subtype;
11671167
unsigned int __cpu_features[1];
11681168
} __cpu_model = {0, 0, 0, {0}};
11691169

0 commit comments

Comments
 (0)