Skip to content

Commit

Permalink
cpuid: fix for intel compiler (#31)
Browse files Browse the repository at this point in the history
made an error when using intel compiler. compiles fine now.
  • Loading branch information
dallemon authored and tpruvot committed Nov 4, 2018
1 parent b262a2b commit ee9f642
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sysinfos.c
Expand Up @@ -113,9 +113,11 @@ int cpu_fanpercent()

#if !defined(__arm__) && !defined(__aarch64__)
static inline void cpuid(int functionnumber, int output[4]) {
#if defined (_MSC_VER) || defined (__INTEL_COMPILER)
// Microsoft or Intel compiler, intrin.h included
#ifdef _MSC_VER
// Microsoft compiler, intrin.h included
__cpuidex(output, functionnumber, 0);
#elif defined(__INTEL_COMPILER)
__cpuid(output, functionnumber);
#elif defined(__GNUC__) || defined(__clang__)
// use inline assembly, Gnu/AT&T syntax
int a, b, c, d;
Expand Down

2 comments on commit ee9f642

@eLvErDe
Copy link

@eLvErDe eLvErDe commented on ee9f642 Nov 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does Intel compiler increase performances ?

@2010phenix
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eLvErDe are you check performance with intel compiler?

Please sign in to comment.