From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvA62-00048J-IE for qemu-devel@nongnu.org; Tue, 15 Jan 2013 12:14:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvA5w-0004kC-O7 for qemu-devel@nongnu.org; Tue, 15 Jan 2013 12:14:46 -0500 Received: from gmplib-02.nada.kth.se ([130.237.222.242]:12993 helo=shell.gmplib.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvA5w-0004jx-HZ for qemu-devel@nongnu.org; Tue, 15 Jan 2013 12:14:40 -0500 References: <867gnlup4w.fsf@shell.gmplib.org> <50F1B339.9010709@twiddle.net> <86mwwbr5s5.fsf@shell.gmplib.org> <50F45277.9070506@twiddle.net> From: Torbjorn Granlund Sender: tg@gmplib.org Date: Tue, 15 Jan 2013 18:14:38 +0100 In-Reply-To: <50F45277.9070506@twiddle.net> (Richard Henderson's message of "Mon\, 14 Jan 2013 10\:46\:15 -0800") Message-ID: <864niiid1d.fsf@shell.gmplib.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] 3 new x86 instructions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: Blue Swirl , qemu-devel@nongnu.org Richard Henderson writes: On 01/14/2013 10:14 AM, Torbjorn Granlund wrote: > Is it in such a state that grabbing that repo and building a > qemu-system-x86_64 would give me MULX support? =20=20 Yes, and "-cpu Haswell" will enable the BMI extensions. =20=20 A review of the code and docs reveals that I missed RORX from the BMI2 insns, but that's the only one I missed. =20=20 Note that I also incorrectly set the overflow flag in several of the BMI insns. It ought to be 0, and I currently set it as if by a standard arithmetic insn. =20=20 I can also suggest using "qemu-x86_64" for userland linux emulation, rather than full system emulation, for testing something as well-behaved as gmp. In partiular, the way memory accesses are translated is significantly faster. =20=20 I compiled your version. It does not work for me: tutu$ gcc -static^C/foo.s && qemu-x86_64 -cpu Haswell ./a.out tutu$ cat ~/foo.s .text .globl main .type main, @function main: mulx %rax, %r8, %r9 ret tutu$ gcc ~/foo.s tutu$ qemu-x86_64 -cpu Haswell ./a.out qemu: uncaught target signal 4 (Illegal instruction) - core dumped Illegal instruction If I remove the mulx, the example runs. I copied your sources using this command: git clone git://repo.or.cz/qemu/rth.git qemu-x86-rth=20=20 There seem to be no mention of MULX in the i386 subdirectory. --=20 Torbj=C3=B6rn