> The point I was trying to make was: "CPUID" and the model-specific registers
> (thus the name) depend very much on the CPU being used. While the kernel makes
> grat efforts to get things right, I wondered whether it's the best idea 
> whether
> to repeat that effort in an application program.

Compiler intrinsics are supposed to provide correct results
independent of the OS that they're running on. It's not unreasonable
for code to expect them to behave correctly. In this case it seems
that an assumption that gcc made that's true for most CPUs isn't true
for a specific (20 years old) CPU - that's a bug in gcc, and it's
reasonable to ask for it to be fixed. There's a separate question of
whether depending on the kernel for this information rather than using
the compiler was the best solution, but it's pretty justified for
applications to presume that the compiler works the way that the
compiler is documented as behaving.
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to