qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stuart Brady <sdb@zubnet.me.uk>
To: Richard Henderson <rth@twiddle.net>
Cc: qemu-devel@nongnu.org, Aurelien Jarno <aurelien@aurel32.net>,
	Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH 3/7] tcg-hppa: Implement deposit operation.
Date: Fri, 7 Jan 2011 23:35:03 +0000	[thread overview]
Message-ID: <20110107233503.GA20743@zubnet.me.uk> (raw)
In-Reply-To: <1294440183-885-4-git-send-email-rth@twiddle.net>

On Fri, Jan 07, 2011 at 02:42:59PM -0800, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <rth@twiddle.net>
> ---
>  tcg/hppa/tcg-target.c |   58 +++++++++++++++++++++++++++++++++++++++++++-----
>  tcg/hppa/tcg-target.h |    1 +
>  2 files changed, 53 insertions(+), 6 deletions(-)
> 
> diff --git a/tcg/hppa/tcg-target.c b/tcg/hppa/tcg-target.c
> index 7f4653e..2c5df57 100644
> --- a/tcg/hppa/tcg-target.c
> +++ b/tcg/hppa/tcg-target.c
> @@ -467,6 +467,22 @@ static inline void tcg_out_dep(TCGContext *s, int ret, int arg,
>                | INSN_SHDEP_CP(31 - ofs) | INSN_DEP_LEN(len));
>  }
>  
> +static inline void tcg_out_depi(TCGContext *s, int ret, int arg,
                                                               ^^^
> +                                unsigned ofs, unsigned len)
> +{
> +    assert(ofs < 32 && len <= 32 - ofs);
> +    tcg_out32(s, INSN_DEPI | INSN_R2(ret) | INSN_IM5(val)
                                                        ^^^

The parameter should be named val, too.

[...]

>  static void tcg_out_shl(TCGContext *s, int ret, int arg, int creg)
> @@ -1407,6 +1420,38 @@ static inline void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args,
>          }
>          break;
>  
> +    case INDEX_op_deposit_i32:
> +        {
> +            unsigned ofs = args[3] >> 8, len = args[3] & 0xff;
> +            int arg2 = args[2];
> +            int arg1 = args[1];
> +            int arg0 = args[0];
> +
> +            if (const_args[1]) {

Surely const_args[1] && arg1 == 0?

> +                if (const_args[2]) {
> +                    tcg_out_movi(s, TCG_TYPE_I32, arg0,
> +                                 (arg2 & ((1u << len) - 1)) << ofs);
> +                } else {
> +                    tcg_out_zdep(s, arg0, arg2, ofs, len);
> +                }

Otherwise, looks good at first glance.

It'll be a few days before I can test on an HPPA box, though.

Cheers,
-- 
Stuart Brady

  reply	other threads:[~2011-01-07 23:35 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-07 22:42 [Qemu-devel] [PATCH 0/7] Define "deposit" tcg operation Richard Henderson
2011-01-07 22:42 ` [Qemu-devel] [PATCH 1/7] tcg: Define "deposit" as an optional operation Richard Henderson
2011-01-07 23:48   ` Stuart Brady
2011-01-09 21:38   ` Aurelien Jarno
2011-01-09 22:45     ` 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
2011-01-07 22:42 ` [Qemu-devel] [PATCH 3/7] tcg-hppa: " Richard Henderson
2011-01-07 23:35   ` Stuart Brady [this message]
2011-01-07 23:41     ` Richard Henderson
2011-01-07 22:43 ` [Qemu-devel] [PATCH 4/7] tcg-ia64: " Richard Henderson
2011-01-09 22:04   ` [Qemu-devel] " Aurelien Jarno
2011-01-07 22:43 ` [Qemu-devel] [PATCH 5/7] tcg-i386: " Richard Henderson
2011-01-09 21:53   ` [Qemu-devel] " Aurelien Jarno
2011-01-09 22:55     ` Richard Henderson
2011-01-10  0:16       ` Aurelien Jarno
2011-01-10  0:43         ` Richard Henderson
2011-01-10 16:52           ` Aurelien Jarno
2011-01-10 18:37       ` Aurelien Jarno
2011-01-10 19:19         ` Richard Henderson
2011-01-07 22:43 ` [Qemu-devel] [PATCH 6/7] target-i386: Use " Richard Henderson
2011-01-07 22:43 ` [Qemu-devel] [PATCH 7/7] target-ppc: " Richard Henderson
2011-01-07 23:10 ` [Qemu-devel] [PATCH 0/7] Define "deposit" tcg operation Peter Maydell
2011-01-07 23:37   ` Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
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 3/7] tcg-hppa: Implement deposit operation Richard Henderson

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=20110107233503.GA20743@zubnet.me.uk \
    --to=sdb@zubnet.me.uk \
    --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).