From: Ulrich Hecht <uli@suse.de>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] s390 host support
Date: Mon, 12 Nov 2007 18:14:43 +0100 [thread overview]
Message-ID: <200711121814.44245.uli@suse.de> (raw)
In-Reply-To: <20071110204219.GA12456@wavehammer.waldi.eu.org>
On Saturday 10 November 2007, Bastian Blank wrote:
> Thimo Seufer asked me to check if the s390 host supports works at all.
> It did not even build, dyngen failed.
A 31-bit build of the CVS code works fine for me. (At least if I add the
br %rANY fix that is also in your patch and the jcc patch that Thiemo
has not committed yet.)
A 31-bit build using your patch works as well, but it also needs the jcc
patch. The only reason it needs to be compiled with -march=z900 is the
use of larl in the inline assembly code, which can be avoided by simply
omitting it in the PARAMx macros (the bras already writes the address to
the register) and reverting to the code currently in CVS for
GOTO_LABEL_PARAM. (The GOTO_TB hack does not seem to be necessary any
more.)
> I digged into the problem and
> found the following:
> gcc for s390 generates a data table after each function if necessary
> instead of immediate loads.
It actually generates it inline, doing something like
op_something:
bras %r13, 8
.long <some data>
...
In other words, it branches over the data, storing the "return address"
(which is actually a pointer to the data) in r13.
> (g5, the oldest supported processor only
> suports one halfword immediate load.) dyngen is not prepared for that
> and fails.
> I found that gcc moves this data into the .rodata section
> if generating code for z900 and above, which looked like a possible
> way to support this.
(My) GCC only does this when generating 64-bit code.
> - Support R_390_PC32DBL relocation, including relocations into
> sections.
Again, my GCC only generates this relocation when compiling 64-bit code.
With your patch and some obvious fixes (ELFCLASS64, GETPC,
$hostlongbits)) it builds as 64-bit, but it segfaults in the first
translation block.
CU
Uli
--
Heute ist
- Dr. Sun Yat-sens Geburtstag (in Taiwan)
- Gedenktag (in Bermuda, Cayman-Inseln)
- Tag der Veteranen (in den USA (26 Staaten))
- Unabhängigkeit von Cartagena (in Kolumbien)
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
next prev parent reply other threads:[~2007-11-12 17:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-10 20:42 [Qemu-devel] s390 host support Bastian Blank
2007-11-12 17:14 ` Ulrich Hecht [this message]
2007-11-13 13:00 ` Bastian Blank
2007-11-13 14:05 ` Ulrich Hecht
2007-11-13 17:20 ` Bastian Blank
2007-11-16 19:09 ` [Qemu-devel] " Bastian Blank
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200711121814.44245.uli@suse.de \
--to=uli@suse.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).