From owner-svn-src-projects@FreeBSD.ORG Fri Oct 4 07:23:32 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 581FAC53; Fri, 4 Oct 2013 07:23:32 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E76F62A81; Fri, 4 Oct 2013 07:23:31 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id r947NRSh066640; Fri, 4 Oct 2013 10:23:27 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r947NRSh066640 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r947NRJ5066639; Fri, 4 Oct 2013 10:23:27 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 4 Oct 2013 10:23:27 +0300 From: Konstantin Belousov To: Mark R V Murray 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/... Message-ID: <20131004072327.GR41229@kib.kiev.ua> References: <201310040655.r946t6ZR038091@svn.freebsd.org> <20131004070521.GQ41229@kib.kiev.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Lqx35L3UMnwj0UbW" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home 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:23:32 -0000 --Lqx35L3UMnwj0UbW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 heade= d away from worrying about that? Or is that only in 11-current? If so I'll = revert that bit. >=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. 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: =09 --Lqx35L3UMnwj0UbW Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQIcBAEBAgAGBQJSTmzuAAoJEJDCuSvBvK1BFmAP/31KTzCldstO+erOsChL9S9k t7WHtzV/ReRurqXWeCfb9/B3b7YsFg5h1TVosrasoO/WsnBD9NOI2HaNFO6IG/Be ki6IyG5Jfh6oW47NkagCxQ3IGYSP25Xaw8i8azoSedN66xiv+diLy6GemGHCt0AK m8B2Pg0dtTxar6dR1r6HQwc/J+qYc/b42uSL0CdOEdeA0fVp6+6h4LKrEqwFv+7q xpppsD9FLrxDth4AhGrqT3s41lrqDimfhyu5+StDjQyLgzWWzC8riV4bp7Hj6pEu y97XPoXwLEbOmAGYgm8Opi+TqKKx2L/fn+vgW1UEmhizeTpsUA/5NnGRMeKHjVGP 9AhecalXNh/HrI3ARY8FB+AF8TaGWJq/0nUwU4eZArzOdWu67Rel9PbDX4LBrYZo SlLo5iZEp3KmVA3yOU+gaAD8lolAEUq8W1o3SPBnX6YPd27leEjysOiABBdsB5f/ iDTxcsjQAvfjJdinKG7BhBe9vj5A/oSOFRYfAJN4DFHWVhwuwI7DJSyvSHdIn+Hr JQIPX9NbKFzb/XXMhTccJoRz/BJCSDVfPho4Lo3jDW+UoQcQ/Ynh5Aqm2FVbm3QD ELnH6u6mSGsySVWTbXrYXYNBpHN8F7iMJBsHHbYczWxBvlFIDpF8eMPj/B0WZRQu Z+SoDAlHLE8MEbRHn8Tj =O/Bo -----END PGP SIGNATURE----- --Lqx35L3UMnwj0UbW--