From: Aurelien Jarno <aurelien@aurel32.net>
To: Jia Liu <proljc@gmail.com>
Cc: qemu-trivial@nongnu.org, "陳韋任 (Wei-Ren Chen)" <chenwj@iis.sinica.edu.tw>
Subject: Re: [Qemu-trivial] [PATCH] Possible wrong microMIPS opcode encoding
Date: Wed, 14 Nov 2012 17:56:07 +0100 [thread overview]
Message-ID: <20121114165607.GB5877@ohm.aurel32.net> (raw)
In-Reply-To: <0E9C0C71-C831-482F-9555-2CC2088B2F27@gmail.com>
On Wed, Nov 14, 2012 at 01:38:44PM +0800, Jia Liu wrote:
> Hi guys,
>
> On Nov 14, 2012, at 10:49 AM, 陳韋任 (Wei-Ren Chen) <chenwj@iis.sinica.edu.tw> wrote:
>
> > Hi all,
> >
> > While reading microMIPS decoding, I found a possible wrong opcode
> > encoding. According to [1] page 337, the bits 13..12 for MULTU is
> > 0x01 rather than 0x00. Please review, thanks.
> >
> > [1] MIPS Architecture for Programmers VolumeIV-e: The MIPS DSP
> > Application-Specific Extension to the microMIPS32 Architecture
> >
> > Signed-off-by: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>
> > ---
> > target-mips/translate.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/target-mips/translate.c b/target-mips/translate.c
> > index f6fc0c2..01b48fa 100644
> > --- a/target-mips/translate.c
> > +++ b/target-mips/translate.c
> > @@ -10385,7 +10385,7 @@ enum {
> >
> > /* bits 13..12 for 0x32 */
> > MULT_ACC = 0x0,
> > - MULTU_ACC = 0x0,
> > + MULTU_ACC = 0x1,
> >
> > /* bits 15..12 for 0x2c */
> > SEB = 0x2,
> > --
> > 1.7.12.3
>
>
> try this, it is a example using exist frame.
>
> diff --git a/target-mips/translate.c b/target-mips/translate.c
> index f6fc0c2..04b2aae 100644
> --- a/target-mips/translate.c
> +++ b/target-mips/translate.c
> @@ -10371,6 +10371,8 @@ enum {
> MFC0 = 0x03,
> MTC0 = 0x0b,
>
> + MICRODSP_ABSQ_S_QB_OP = 0x04;
> +
> /* bits 13..12 for 0x01 */
> MFHI_ACC = 0x0,
> MFLO_ACC = 0x1,
> @@ -10452,6 +10454,9 @@ enum {
> MFLO32 = 0x1,
> MTHI32 = 0x2,
> MTLO32 = 0x3,
> +
> + /* bits 15..12 for MICRODSP_ABSQ_S_QB_OP */
> + MICRODSP_ABSQ_S_QB = 0x00;
> };
>
> /* POOL32B encoding of minor opcode field (bits 15..12) */
> @@ -11274,6 +11279,14 @@ static void gen_pool32axf (CPUMIPSState *env, DisasContext *ctx, int rt, int rs,
> goto pool32axf_invalid;
> }
> break;
> + case MICRODSP_ABSQ_S_QB_OP:
> + switch (minor) {
> + case MICRODSP_ABSQ_S_QB: // ABSQ_S_QB
> + break;
> + default:
> + goto pool32axf_invalid;
> + }
> + break;
> default:
> pool32axf_invalid:
> MIPS_INVAL("pool32axf");
>
I don't really understand what this patch is supposed to do compared to
the original bug report and patch.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
next prev parent reply other threads:[~2012-11-14 16:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-14 2:49 [Qemu-trivial] [PATCH] Possible wrong microMIPS opcode encoding 陳韋任 (Wei-Ren Chen)
2012-11-14 5:38 ` Jia Liu
2012-11-14 16:56 ` Aurelien Jarno [this message]
2012-11-14 23:51 ` 陳韋任 (Wei-Ren Chen)
2012-11-14 16:45 ` Aurelien Jarno
2012-11-14 23:57 ` 陳韋任 (Wei-Ren Chen)
2012-11-15 13:53 ` Aurelien Jarno
2012-11-16 1:26 ` 陳韋任 (Wei-Ren Chen)
2012-11-15 1:17 ` 陳韋任 (Wei-Ren Chen)
2012-11-15 13:56 ` Aurelien Jarno
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=20121114165607.GB5877@ohm.aurel32.net \
--to=aurelien@aurel32.net \
--cc=chenwj@iis.sinica.edu.tw \
--cc=proljc@gmail.com \
--cc=qemu-trivial@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.