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

tedheadster tedheadster at gmail.com
Sun May 19 19:58:32 UTC 2019


On Sun, May 19, 2019, 3:33 PM Olaf van der Spek <ml at vdspek.org> wrote:

> On Sun, May 19, 2019 at 2:31 PM tedheadster <tedheadster at gmail.com> wrote:
> >
> > On Sun, May 19, 2019 at 7:31 AM Olaf van der Spek <ml at vdspek.org> wrote:
> > >
> > > What's eax after cpuid function 0?
> >
> > After calling cpuid function 0x0, %eax returns the expected 0x1.
> >
> > Here is the output of 'cpuid -r'.
> >
> > # cpuid -r
> > CPU 0:
> >    0x00000000 0x00: eax=0x00000001 ebx=0x746e6543 ecx=0x736c7561
> edx=0x48727561
> >    0x00000001 0x00: eax=0x00000585 ebx=0x746e6543 ecx=0x00000000
> edx=0x008001b5
>
> ecx does contain 0 doesn't it? Or is this the wrong line?
>
> Olaf
>

I was fooled by that too. The /usr/bin/cpuid program is not the same as the
gcc cpuid.h calls. I inserted debugging code and found that the %ecx
register still had its part of the vendor string 'auls' in it (from
'CentaurHauls') from the earlier call to cpuid() with eax = 0.

I posted a patch to the gcc-patches mailing list.

- Matthew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20190519/5c7cde5f/attachment.html>


More information about the systemd-devel mailing list