qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Bug in s390 instruction emulation


From: Torbjörn Granlund
Subject: [Qemu-devel] Bug in s390 instruction emulation
Date: Wed, 03 Dec 2014 22:16:37 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (berkeley-unix)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]