qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Bug in s390 instruction emulation
@ 2014-12-03 21:16 Torbjörn Granlund
  2014-12-13 22:10 ` Torbjörn Granlund
  0 siblings, 1 reply; 4+ messages in thread
From: Torbjörn Granlund @ 2014-12-03 21:16 UTC (permalink / raw)
  To: qemu-devel

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 <stdio.h>
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.)

-- 
Torbjörn
Please encrypt, key id 0xC8601622

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-12-15 23:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-03 21:16 [Qemu-devel] Bug in s390 instruction emulation Torbjörn Granlund
2014-12-13 22:10 ` Torbjörn Granlund
2014-12-14 21:45   ` Paolo Bonzini
2014-12-15 23:44     ` Torbjörn Granlund

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).