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

2019-05-18 Thread tedheadster
On Sat, May 18, 2019 at 6:57 PM Segher Boessenkool wrote: > Something like > > *__ebx = *__ecx = *__edx = 0; > asm volatile("" : "+r"(*__eax), "+r"(*__ebx), "+r"(*__ecx), "+r"(*__edx)); > __cpuid (__leaf, *__eax, *__ebx, *__ecx, *__edx); > > should do the trick. Segher, that got closer,

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

2019-05-18 Thread tedheadster
On Sat, May 18, 2019 at 5:30 PM Segher Boessenkool wrote: > That won't help, the compiler will remove those dead stores. > > Add a > > asm("" ::: "memory"); > > between these two lines? > This didn't seem to do anything: --- cpuid.h.orig 2019-05-14 05:52:11.0 -0400 +++ cpuid.h 2019-05

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

2019-05-18 Thread tedheadster
On Mon, May 13, 2019 at 4:49 PM Mike Gilbert wrote: > > Just a guess: I wonder if that 'auls' value is left over from the > previous CPUID result. If that's the case, a simple solution might be > to zero-out ebx, ecx, and edx in __cpuid(). Mike, I tried your suggestion and added this patch to g