qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Patch for compiling with GCC 4


From: Thiemo Seufer
Subject: Re: [Qemu-devel] Patch for compiling with GCC 4
Date: Mon, 18 Feb 2008 20:49:26 +0000
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

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




reply via email to

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