qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Re: [PATCH 1/5] Fix i386 Host


From: Johannes Schindelin
Subject: Re: [Qemu-devel] Re: [PATCH 1/5] Fix i386 Host
Date: Fri, 18 Jan 2008 14:22:21 +0000 (GMT)
User-agent: Alpine 1.00 (LSU 882 2007-12-20)

Hi,

On Fri, 18 Jan 2008, Michael Matz wrote:

> On Fri, 18 Jan 2008, Johannes Schindelin wrote:
> 
> > > > > asm (" ... movzbl %b1, %%edx\n ... " : : "r" (blubb), "r" (bla) );
> > > > 
> > > > Okay, but this only concerns gcc4, apparently.
> > > 
> > > No, it's nothing to do with GCC.
> > 
> > But apparently it has!  With gcc < 4 I did never get the error.
> 
> As I tried to explain, this is pure luck.

Maybe.

> > Which probably means that gcc < 4 did _not_ use ecx, and therefore it 
> > does not have to be pushed and popped.
> 
> We are talking about the hunk using the "q" constraint for operand 1 in 
> st[bw]_kernel.  The change in the clobber list (and the associated 
> saving/restoring of %ecx around the call) is something entirely different.

It cannot be, because just changing the clobber list makes the code 
compile again!

Of course, you are now going to say that this is pure luck, too...

> > Which -- judging from how commonly glue() is called in op.c -- could 
> > mean a performance hit.
> 
> glue() is a macro, the function called is stw_kernel (inline function).

Okay... I did not look closely enough (lack of time).

> > I am all for supporting gcc > 3, but please, please not at the cost of 
> > having a performance hit for _existing_ users.
> 
> Have you measured this?  This function actually does a call to stw_mmu, a 
> rather slow and big function, the overhead of one register store more or 
> less is probably zero.

No, lack of time.

> My patch in the last mail introduces a copy in C (to vtmp), _that_ can 
> be optimized away under the right circumstances.  Of course GCC does not 
> change the asm template in any way.

I must have missed that mail.

Ciao,
Dscho






reply via email to

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