All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thiemo Seufer <ths@networkno.de>
To: Alexander Graf <alex@csgraf.de>
Cc: qemu-devel@nongnu.org, Paul Brook <paul@codesourcery.com>
Subject: Re: [Qemu-devel] Patch for compiling with GCC 4
Date: Mon, 18 Feb 2008 20:49:26 +0000	[thread overview]
Message-ID: <20080218204926.GE4747@networkno.de> (raw)
In-Reply-To: <2151CED4-02CD-4928-978A-6C63A734F19F@csgraf.de>

Alexander Graf wrote:
>
> On Feb 17, 2008, at 9:22 PM, Christian Roue wrote:
>
>> Well, I somehow felt like it was a bit brutal and probably fixing the
>> symptoms which is apparently the case.
>> Looking more carefully, compile fails in :
>> sh4-linux-user for function op_cmp_str_T0_T1
>> gcc optimization leads to a ret followed by a last assignement with a 
>> jump back.
>> I guess dyngen hopes to find function epilogue as the last bytes.
>> It's apparently the only function where it happens.
>>
>> I found that adding gcc option "-fno-tree-dominator-opts" for sh4
>> target avoids this (I suppose) unwanted optimization.
>> It may be a bit brutal again ( disabling too many optims or wrong  
>> ones).
>> May be the op_cmp_str_T0_T1 function can be rewritten to something
>> that avoids this optimization.
>> Am I on a better track ?
>
> This looks like the right approach to the symptoms. The "real fix" would 
> be to move the sh4 target to TCG,

The migration to tcg can be done gradually, fixing the immediate problem
shouldn't get too involved.

> but for the meantime I believe this is 
> the way to go. You can already find a lot of these unoptimization flags 
> autodetected in the configure script, so I guess that'd be the right 
> place for a patch.

I added those as workarounds, they should rather go away than expand to
cover even more flags.


Thiemo

  parent reply	other threads:[~2008-02-18 20:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-16 11:22 [Qemu-devel] Patch for compiling with GCC 4 Christian Roue
2008-02-16 20:01 ` Paul Brook
2008-02-17 20:22   ` Christian Roue
2008-02-18 12:07     ` Alexander Graf
2008-02-18 19:52       ` Christian Roue
2008-02-18 20:49       ` Thiemo Seufer [this message]
2008-02-19 19:12         ` Christian Roue

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=20080218204926.GE4747@networkno.de \
    --to=ths@networkno.de \
    --cc=alex@csgraf.de \
    --cc=paul@codesourcery.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.