From: malc <av1474@comtv.ru>
To: Richard Henderson <rth@twiddle.net>
Cc: qemu-devel@nongnu.org, aurelien@aurel32.net, agraf@suse.de
Subject: [Qemu-devel] Re: [PATCH 2/7] tcg-ppc: Implement deposit operation.
Date: Tue, 11 Jan 2011 15:40:17 +0300 (MSK) [thread overview]
Message-ID: <alpine.LNX.2.00.1101111539010.1464@linmac> (raw)
In-Reply-To: <1294716228-9299-3-git-send-email-rth@twiddle.net>
On Mon, 10 Jan 2011, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <rth@twiddle.net>
> ---
> tcg/ppc/tcg-target.c | 17 ++++++++++++++++-
> tcg/ppc/tcg-target.h | 1 +
> 2 files changed, 17 insertions(+), 1 deletions(-)
>
> diff --git a/tcg/ppc/tcg-target.c b/tcg/ppc/tcg-target.c
> index 7970268..39aa4f1 100644
> --- a/tcg/ppc/tcg-target.c
> +++ b/tcg/ppc/tcg-target.c
> @@ -1611,6 +1611,21 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args,
> }
> break;
>
> + case INDEX_op_deposit_i32:
> + {
> + unsigned len = args[4];
> + unsigned lsb_ofs = args[3];
> + unsigned msb_ofs = 31 - lsb_ofs;
> +
> + tcg_out32 (s, RLWIMI
> + | RA(args[0])
> + | RS(args[2])
> + | SH(lsb_ofs)
> + | MB(msb_ofs - len + 1)
> + | ME(msb_ofs));
> + }
> + break;
> +
> case INDEX_op_add2_i32:
> if (args[0] == args[3] || args[0] == args[5]) {
> tcg_out32 (s, ADDC | TAB (0, args[2], args[4]));
> @@ -1829,9 +1844,9 @@ static const TCGTargetOpDef ppc_op_defs[] = {
> { INDEX_op_shl_i32, { "r", "r", "ri" } },
> { INDEX_op_shr_i32, { "r", "r", "ri" } },
> { INDEX_op_sar_i32, { "r", "r", "ri" } },
> -
> { INDEX_op_rotl_i32, { "r", "r", "ri" } },
> { INDEX_op_rotr_i32, { "r", "r", "ri" } },
> + { INDEX_op_deposit_i32, { "r", "0", "r" } },
>
Are you sure about "0" constraint?
> { INDEX_op_brcond_i32, { "r", "ri" } },
>
> diff --git a/tcg/ppc/tcg-target.h b/tcg/ppc/tcg-target.h
> index a1f8599..bbf38d5 100644
> --- a/tcg/ppc/tcg-target.h
> +++ b/tcg/ppc/tcg-target.h
> @@ -92,6 +92,7 @@ enum {
> #define TCG_TARGET_HAS_eqv_i32
> #define TCG_TARGET_HAS_nand_i32
> #define TCG_TARGET_HAS_nor_i32
> +#define TCG_TARGET_HAS_deposit_i32
>
> #define TCG_AREG0 TCG_REG_R27
>
>
--
mailto:av1474@comtv.ru
next prev parent reply other threads:[~2011-01-11 12:40 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-11 3:23 [Qemu-devel] [PATCH 0/7] Define "deposit" tcg operation, v2 Richard Henderson
2011-01-11 3:23 ` [Qemu-devel] [PATCH 1/7] tcg: Define "deposit" as an optional operation Richard Henderson
2011-01-11 23:45 ` Aurelien Jarno
2011-01-12 11:00 ` Edgar E. Iglesias
2011-01-11 3:23 ` [Qemu-devel] [PATCH 2/7] tcg-ppc: Implement deposit operation Richard Henderson
2011-01-11 12:40 ` malc [this message]
2011-01-11 16:32 ` [Qemu-devel] " Richard Henderson
2011-01-11 19:11 ` malc
2011-01-11 3:23 ` [Qemu-devel] [PATCH 3/7] tcg-hppa: " Richard Henderson
2011-01-11 3:23 ` [Qemu-devel] [PATCH 4/7] tcg-ia64: " Richard Henderson
2011-01-11 3:23 ` [Qemu-devel] [PATCH 5/7] tcg-i386: " Richard Henderson
2011-01-25 12:27 ` Edgar E. Iglesias
2011-01-25 16:13 ` Richard Henderson
2011-01-25 16:48 ` Edgar E. Iglesias
2011-01-25 22:07 ` Richard Henderson
2011-01-26 8:53 ` Edgar E. Iglesias
2011-01-26 9:23 ` Alexander Graf
2011-01-26 15:50 ` Richard Henderson
2011-01-26 16:00 ` Alexander Graf
2011-01-26 16:34 ` Avi Kivity
2011-01-26 16:40 ` Richard Henderson
2011-01-26 16:50 ` Alexander Graf
2011-01-26 18:21 ` Richard Henderson
2011-01-26 18:27 ` Alexander Graf
2011-01-26 18:55 ` Richard Henderson
2011-01-26 19:01 ` Alexander Graf
2011-01-26 19:05 ` Richard Henderson
2011-01-26 19:09 ` Alexander Graf
2011-01-26 19:19 ` Richard Henderson
2011-01-26 19:27 ` Alexander Graf
2011-01-31 8:33 ` Aurelien Jarno
2011-02-08 18:05 ` Richard Henderson
2011-02-09 7:41 ` [Qemu-devel] " Paolo Bonzini
2011-02-09 17:24 ` Blue Swirl
2011-01-11 3:23 ` [Qemu-devel] [PATCH 6/7] target-i386: Use " Richard Henderson
2011-01-12 11:01 ` Edgar E. Iglesias
2011-01-20 11:06 ` Aurelien Jarno
2011-01-11 3:23 ` [Qemu-devel] [PATCH 7/7] target-ppc: " Richard Henderson
2011-01-11 23:45 ` [Qemu-devel] [PATCH 0/7] Define "deposit" tcg operation, v2 Aurelien Jarno
2011-01-20 11:31 ` Edgar E. Iglesias
-- strict thread matches above, loose matches on Subject: below --
2011-01-07 22:42 [Qemu-devel] [PATCH 0/7] Define "deposit" tcg operation Richard Henderson
2011-01-07 22:42 ` [Qemu-devel] [PATCH 2/7] tcg-ppc: Implement deposit operation Richard Henderson
2011-01-07 23:33 ` [Qemu-devel] " malc
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=alpine.LNX.2.00.1101111539010.1464@linmac \
--to=av1474@comtv.ru \
--cc=agraf@suse.de \
--cc=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).