Patch Set #12, Line 24:
I'm curious, does the compiler optimize it differently? […]
I'm not sure if the compiler can infer that cpuid_edx has no side-effect, so it may not be able to optimize out the code as-is.
In any case, I'd write this function as follows:
/* CLFLUSH while operating in CAR might not be supported by platforms */
if (ENV_CACHE_AS_RAM && !CONFIG(X86_CLFLUSH_CAR))
return !!(cpuid_edx(1) >> CPUID_FEATURE_CLFLUSH_BIT);
To view, visit change 37196. To unsubscribe, or for help writing mail filters, visit settings.