qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 05/10] target-i386: Access segs via TCG register


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 05/10] target-i386: Access segs via TCG registers
Date: Fri, 10 Jul 2015 07:48:31 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1

On 07/09/2015 02:30 PM, Paolo Bonzini wrote:


On 09/07/2015 09:15, Richard Henderson wrote:
Having segs[].base as a register significantly improves code
generation for real and protected modes, particularly for TBs
that have multiple memory references where the segment base
can be held in a hard register through the TB.

On top of this, "is base 0" could be cached in HFLAGS, and CS.BASE does
not need to be in a register at all.  Or, to avoid wasting too many
HFLAGS, "is DS/ES/SS base equal to CS base" since the CS base is known
and usually all four of them (unlike FS and GS) are zero.

We do have CS/DS/ES/SS base not-equal to zero in hflags -- this is HF_ADDSEG_SHIFT. You're right about CS.BASE being known via the TB though, I hadn't thought about that.

I'm not sure that CS=DS/ES/SS really helps much 16-bit code though; afaik except for the smallest COMs they're always different.


r~



reply via email to

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