[Top][All Lists]

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

Re: [Qemu-devel] [patch] make qemu work with GCC 4

From: Paul Brook
Subject: Re: [Qemu-devel] [patch] make qemu work with GCC 4
Date: Wed, 29 Aug 2007 16:06:10 +0100
User-agent: KMail/1.9.7

>        I solved that by placing one of the T[012] operands into memory
>        for HOST_I386, thereby freeing one reg.  Here's some justification
>        of why that doesn't really cost performance: with three free regs
>        GCC is already spilling like mad in the snippets, we just trade one
>        of those memory accesses (to stack) with one other mem access to
>        the cpu_state structure, which will be in cache.

Do you have any evidence to support this claim? Last time I did this it caused 
a significant performance hit. I'd guess that most common ops are simple 
enough that we don't need more than 3 registers.

> --- qemu-0.9.0.cvs.orig/softmmu_header.h
> -                  : "%eax", "%ecx", "%edx", "memory", "cc");
> +                  : "%eax", "%edx", "memory", "cc");

This change is wrong. The inline asm calls C code which clobbers %ecx.


reply via email to

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