From: "aurelien@aurel32.net" <aurelien@aurel32.net>
To: "Jovanovic, Petar" <petarj@mips.com>
Cc: Dongxue Zhang <elta.era@gmail.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"chenwj@iis.sinica.edu.tw" <chenwj@iis.sinica.edu.tw>,
"rth@twiddle.net" <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH 2/3] Make-repl_ph-to-sign-extended-to-target_long
Date: Tue, 1 Jan 2013 11:59:49 +0100 [thread overview]
Message-ID: <20130101105949.GD16659@ohm.aurel32.net> (raw)
In-Reply-To: <874D219413C17C42B1D2E0432B92BE5CBBE2911A@exchdb03.mips.com>
On Tue, Dec 11, 2012 at 03:06:35PM +0000, Jovanovic, Petar wrote:
> lgtm, though I wish there was a test for this in repl_ph.c.
>
> + cc Aurelien J.
>
> Petar
> ________________________________________
> From: Dongxue Zhang [elta.era@gmail.com]
> Sent: Tuesday, December 11, 2012 3:28 PM
> To: qemu-devel@nongnu.org
> Cc: chenwj@iis.sinica.edu.tw; Jovanovic, Petar; rth@twiddle.net; Dongxue Zhang
> Subject: [PATCH 2/3] Make-repl_ph-to-sign-extended-to-target_long
>
> The immediate value is 9bits, should sign-extend to 16bits. The return value to
> register should sign-extend to target_long, as Richard says, removing an
> unnecessary cast works fun.
>
> Signed-off-by: Dongxue Zhang <elta.era@gmail.com>
> ---
> target-mips/translate.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/target-mips/translate.c b/target-mips/translate.c
> index 65e6725..1701ca3 100644
> --- a/target-mips/translate.c
> +++ b/target-mips/translate.c
> @@ -13769,9 +13769,10 @@ static void gen_mipsdsp_bitinsn(CPUMIPSState *env, DisasContext *ctx,
> check_dsp(ctx);
> {
> imm = (ctx->opcode >> 16) & 0x03FF;
> + imm = (int16_t)(imm << 6) >> 6;
> tcg_gen_movi_tl(cpu_gpr[ret], \
> (target_long)((int32_t)imm << 16 | \
> - (uint32_t)(uint16_t)imm));
> + (uint16_t)imm));
> }
> break;
> case OPC_REPLV_PH:
Thanks, I have applied the patch after fixing the subject.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
next prev parent reply other threads:[~2013-01-01 11:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-11 14:28 [Qemu-devel] [PATCH 1/3] Fix my email address Dongxue Zhang
2012-12-11 14:28 ` [Qemu-devel] [PATCH 2/3] Make-repl_ph-to-sign-extended-to-target_long Dongxue Zhang
2012-12-11 15:06 ` Jovanovic, Petar
2013-01-01 10:59 ` aurelien [this message]
2012-12-11 15:13 ` Markus Armbruster
2012-12-11 18:39 ` Andreas Färber
2012-12-12 6:43 ` Dongxue Zhang
2012-12-12 23:19 ` Jovanovic, Petar
2012-12-11 14:28 ` [Qemu-devel] [PATCH 3/3] Fix-gen_HILO-to-make-it-adapt-each-arch-which-use-acc Dongxue Zhang
2013-01-01 11:15 ` Aurelien Jarno
2012-12-11 17:25 ` [Qemu-devel] [PATCH 1/3] Fix my email address Stefan Weil
[not found] ` <CAEomy4TXVE572yE_cbaDgr5EQ+wo-+9vaC2mNrqAYg2u+02mww@mail.gmail.com>
2012-12-12 22:02 ` Stefan Weil
2012-12-13 7:00 ` 陳韋任 (Wei-Ren Chen)
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=20130101105949.GD16659@ohm.aurel32.net \
--to=aurelien@aurel32.net \
--cc=chenwj@iis.sinica.edu.tw \
--cc=elta.era@gmail.com \
--cc=petarj@mips.com \
--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 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.