svn commit: r256042 - in projects/random_number_generator: share/examples/kld/random_adaptor sys/conf sys/dev/glxsb sys/dev/hifn sys/dev/random sys/dev/rndtest sys/dev/safe sys/dev/syscons sys/dev/...
Konstantin Belousov
kostikbel at gmail.com
Fri Oct 4 07:23:32 UTC 2013
On Fri, Oct 04, 2013 at 08:09:48AM +0100, Mark R V Murray wrote:
>
> On 4 Oct 2013, at 08:05, Konstantin Belousov <kostikbel at gmail.com> wrote:
>
> > On Fri, Oct 04, 2013 at 06:55:06AM +0000, Mark Murray wrote:
> >> #ifdef __amd64__
> >> - ".byte\t0x48,0x0f,0xc7,0xf0\n\t" /* rdrand %rax */
> >> + "rdrand\t%%rax\n\t"
> >> "jnc\t1f\n\t"
> >> "movq\t%%rax,%1\n\t"
> >> "movl\t$8,%%eax\n"
> >> #else /* i386 */
> >> - ".byte\t0x0f,0xc7,0xf0\n\t" /* rdrand %eax */
> >> + "rdrand\t%%eax\n\t"
> >> "jnc\t1f\n\t"
> >> "movl\t%%eax,%1\n\t"
> >> "movl\t$4,%%eax\n"
> > This should break the build with the in-tree binutils, i.e. when gcc
> > is used. The same for the chunks of the VIA asm.
>
> This is likely a case of me getting it wrong, but I thought we were headed away from worrying about that? Or is that only in 11-current? If so I'll revert that bit.
>
I assure you about the infinite stream of complains if the build with the
base gcc is broken on x86. It is not catched by tinderboxes, but people
are fast to report.
Also, if changing the .byte to mnemonic, it makes sense to loose the
constraints and allow the compiler to generate direct store from rdrand
to the target address. I.e., do something like this (not tested):
rdrand %1
jnc 1f
movl $8,%%eax
1:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-projects/attachments/20131004/9ae49fa7/attachment.sig>
More information about the svn-src-projects
mailing list