All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Blue Swirl <blauwirbel@gmail.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [PATCH v2] tcg-i386: Introduce limited deposit support
Date: Thu, 29 Sep 2011 07:58:13 -0700	[thread overview]
Message-ID: <4E848785.6090604@twiddle.net> (raw)
In-Reply-To: <4E84570F.3040103@siemens.com>

On 09/29/2011 04:31 AM, Jan Kiszka wrote:
> x86 cannot provide an optimized generic deposit implementation. But at
> least for a few special cases, namely for writing bits 0..7, 8..15, and
> 0..15, versions using only a single instruction are feasible.
> Introducing such limited support improves emulating 16-bit x86 code on
> x86, but also rarer cases where 32-bit or 64-bit code accesses bytes or
> words.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> 
> Changes in v2:
>  - introduce restricting predicates TCG_TARGET_deposit_i32/64_valid
>    to decide if deposit support can be used
>  - express register constraints via new 'Q' symbol

That's what I had in mind, yes.

The only thing that's missing now is a default version of 

> +#define TCG_TARGET_deposit_i32_valid(ofs, len) \
> +    (((ofs) == 0 && (len) == 8) || ((ofs) == 8 && (len) == 8) || \
> +     ((ofs) == 0 && (len) == 16))
> +#define TCG_TARGET_deposit_i64_valid    TCG_TARGET_deposit_i32_valid

These.


r~

  reply	other threads:[~2011-09-29 14:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-28 12:28 [Qemu-devel] [PATCH] tcg-i386: Introduce specific deposit helpers Jan Kiszka
2011-09-28 14:26 ` Richard Henderson
2011-09-28 14:33   ` Jan Kiszka
2011-09-28 15:19     ` Richard Henderson
2011-09-28 22:07       ` Jan Kiszka
2011-09-28 22:47         ` Richard Henderson
2011-09-29 11:31           ` [Qemu-devel] [PATCH v2] tcg-i386: Introduce limited deposit support Jan Kiszka
2011-09-29 14:58             ` Richard Henderson [this message]
2011-09-29 15:19               ` Jan Kiszka
2011-09-29 15:23                 ` [Qemu-devel] [PATCH v3] " Jan Kiszka
2011-09-29 16:11                   ` Richard Henderson
2011-09-29 16:52                     ` [Qemu-devel] [PATCH v4] " Jan Kiszka
2011-09-29 19:50                       ` Richard Henderson
2011-10-01 12:06                       ` Blue Swirl

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=4E848785.6090604@twiddle.net \
    --to=rth@twiddle.net \
    --cc=aurelien@aurel32.net \
    --cc=blauwirbel@gmail.com \
    --cc=jan.kiszka@siemens.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.