From owner-svn-src-projects@FreeBSD.ORG Fri Oct 4 07:31:26 2013 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 22B04E4A; Fri, 4 Oct 2013 07:31:26 +0000 (UTC) (envelope-from mark@grondar.org) Received: from gromit.grondar.org (grandfather.grondar.org [IPv6:2a01:348:0:15:5d59:5c20:0:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DA5D02AD9; Fri, 4 Oct 2013 07:31:25 +0000 (UTC) Received: from [2001:470:9174:1:47d:25fc:8100:b5e3] by gromit.grondar.org with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1VRzr8-000PeP-W3; Fri, 04 Oct 2013 08:31:24 +0100 Subject: Re: 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/... Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Content-Type: multipart/signed; boundary="Apple-Mail=_0837B9C8-899D-414F-93F6-8B12E5F44FC8"; protocol="application/pgp-signature"; micalg=pgp-sha512 From: Mark R V Murray In-Reply-To: <20131004072327.GR41229@kib.kiev.ua> Date: Fri, 4 Oct 2013 08:31:21 +0100 Message-Id: References: <201310040655.r946t6ZR038091@svn.freebsd.org> <20131004070521.GQ41229@kib.kiev.ua> <20131004072327.GR41229@kib.kiev.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.1510) X-SA-Score: -1.0 Cc: svn-src-projects@freebsd.org, src-committers@freebsd.org, Mark Murray X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Oct 2013 07:31:26 -0000 --Apple-Mail=_0837B9C8-899D-414F-93F6-8B12E5F44FC8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 4 Oct 2013, at 08:23, Konstantin Belousov = wrote: > On Fri, Oct 04, 2013 at 08:09:48AM +0100, Mark R V Murray wrote: >>=20 >> On 4 Oct 2013, at 08:05, Konstantin Belousov = wrote: >>=20 >>> 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. >>=20 >> 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. >>=20 >=20 > 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. *Sigh* OK :-). I'll revert for 10 but not 11-Current. OK? :-P > 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: Thanks! M --=20 Mark R V Murray --Apple-Mail=_0837B9C8-899D-414F-93F6-8B12E5F44FC8 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.20 (Darwin) Comment: GPGTools - http://gpgtools.org iQCVAwUBUk5uyd58vKOKE6LNAQopegP+LavLr7b6M4l3UzSijLcvabm55tpns8kH RdMYttIb67hgkHBC0Fa5R+hD2XVEAH7SnvcmQTCFN5YHpElbFsdx6nt5G5c/GVid LuxjuXmJsbNaJhwHFsnxLTWrCuypX3IA4sfzkelOXiIygX/chsknPodY6HK+jPYI G9Xyq9tVnYA= =Ym+J -----END PGP SIGNATURE----- --Apple-Mail=_0837B9C8-899D-414F-93F6-8B12E5F44FC8--