qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 05/10] target-i386: Access segs via TCG registers
Date: Fri, 10 Jul 2015 07:48:31 +0100	[thread overview]
Message-ID: <559F6ABF.3090101@twiddle.net> (raw)
In-Reply-To: <559E778E.6090903@redhat.com>

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	other threads:[~2015-07-10  6:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-09  7:15 [Qemu-devel] [PATCH 00/10] target-i386 addressing cleanups Richard Henderson
2015-07-09  7:15 ` [Qemu-devel] [PATCH 01/10] target-i386: Create gen_lea_v_seg Richard Henderson
2015-07-09  7:15 ` [Qemu-devel] [PATCH 02/10] target-i386: Introduce mo_stacksize Richard Henderson
2015-07-09  7:15 ` [Qemu-devel] [PATCH 03/10] target-i386: Use gen_lea_v_seg in gen_lea_modrm Richard Henderson
2015-07-09  7:15 ` [Qemu-devel] [PATCH 04/10] target-i386: Use gen_lea_v_seg in stack subroutines Richard Henderson
2015-07-09  7:15 ` [Qemu-devel] [PATCH 05/10] target-i386: Access segs via TCG registers Richard Henderson
2015-07-09 13:30   ` Paolo Bonzini
2015-07-10  6:48     ` Richard Henderson [this message]
2015-07-09  7:15 ` [Qemu-devel] [PATCH 06/10] target-i386: Use gen_lea_v_seg in pusha/popa Richard Henderson
2015-07-09  7:15 ` [Qemu-devel] [PATCH 07/10] target-i386: Rewrite gen_enter inline Richard Henderson
2015-07-09  7:15 ` [Qemu-devel] [PATCH 08/10] target-i386: Rewrite leave Richard Henderson
2015-07-09  7:15 ` [Qemu-devel] [PATCH 09/10] target-i386: Tidy gen_add_A0_im Richard Henderson
2015-07-09  7:15 ` [Qemu-devel] [PATCH 10/10] target-i386: Deconstruct the cpu_T array Richard Henderson
2015-07-09 13:32 ` [Qemu-devel] [PATCH 00/10] target-i386 addressing cleanups Paolo Bonzini
2015-09-24  4:10 ` Richard Henderson
2015-09-25 16:56   ` Peter Maydell

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=559F6ABF.3090101@twiddle.net \
    --to=rth@twiddle.net \
    --cc=pbonzini@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).