From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwHHz-00078X-Co for qemu-devel@nongnu.org; Wed, 03 Dec 2014 16:16:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XwHHr-0004cR-T3 for qemu-devel@nongnu.org; Wed, 03 Dec 2014 16:16:47 -0500 Received: from servus.gmplib.org ([193.10.5.126]:54868 helo=shell.gmplib.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwHHr-0004bs-M0 for qemu-devel@nongnu.org; Wed, 03 Dec 2014 16:16:39 -0500 From: tg@gmplib.org (=?utf-8?Q?Torbj=C3=B6rn?= Granlund) Sender: tg@gmplib.org Date: Wed, 03 Dec 2014 22:16:37 +0100 Message-ID: <86lhmo303u.fsf@shell.gmplib.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Bug in s390 instruction emulation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org The s390 instruction emulation makes GMP fail most of its tests. I have isolated one of the problems: How to reproduce: gcc m.c x.s ./a.out Correct output on actual hardware: ffffffff Incorrect output using QEMU 2.2.0 rc4: 0 File m.c: #include int foo(); int main() { printf("%x\n", foo()); return 0; } File x.s: .text .align 8 .globl foo .type foo,@function foo: lghi %r2, 0 lghi %r3, 1 slgr %r2, %r3 slbgr %r3, %r3 slbgr %r2, %r2 br %r14 (This is using "user mode" emulation. System mode emulation doesn't work at all, and never did, as I am sure you know. I suppose getting basic instruction emulation correct is a good first step.) --=20 Torbj=C3=B6rn Please encrypt, key id 0xC8601622