[systemd-devel] rdrand generated with march=winchip-c6 in systemd-241

Segher Boessenkool segher@kernel.crashing.org
Sat May 18 21:30:00 GMT 2019


On Sat, May 18, 2019 at 02:22:01PM -0400, tedheadster wrote:
> +  *__ebx = *__ecx = *__edx = 0;
> +
>    __cpuid (__leaf, *__eax, *__ebx, *__ecx, *__edx);

That won't help, the compiler will remove those dead stores.

Add a

  asm("" ::: "memory");

between these two lines?

Also, look at the generated machine code, to see if you are actually
testing what you think you are.


Segher



More information about the Gcc-help mailing list