From: Ralf Baechle <ralf@linux-mips.org>
To: Aleksandar Markovic <aleksandar.markovic@rt-rk.com>
Cc: linux-mips@linux-mips.org, james.hogan@imgtec.com,
paul.burton@imgtec.com, leonid.yegoshin@imgtec.com,
douglas.leung@imgtec.com, aleksandar.markovic@imgtec.com,
petar.jovanovic@imgtec.com, miodrag.dinic@imgtec.com,
goran.ferenc@imgtec.com
Subject: Re: [PATCH 1/3] MIPS: r2-on-r6-emu: Fix BLEZL and BGTZL identification
Date: Wed, 22 Mar 2017 16:03:19 +0100 [thread overview]
Message-ID: <20170322150319.GA14889@linux-mips.org> (raw)
In-Reply-To: <1489419397-25291-2-git-send-email-aleksandar.markovic@rt-rk.com>
On Mon, Mar 13, 2017 at 04:36:35PM +0100, Aleksandar Markovic wrote:
> From: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
>
> Fix the problem of inaccurate identification of instructions BLEZL and
> BGTZL in R2 emulation code by making sure all necessary encoding
> specifications are met.
>
> Previously, certain R6 instructions could be identified as BLEZL or
> BGTZL. R2 emulation routine didn't take into account that both BLEZL
> and BGTZL instructions require their rt field (bits 20 to 16 of
> instruction encoding) to be 0, and that, at same time, if the value in
> that field is not 0, the encoding may represent a legitimate MIPS R6
> instruction.
>
> This means that a problem could occur after emulation optimization,
> when emulation routine tried to pipeline emulation, picked up a next
> candidate, and subsequently misrecognized an R6 instruction as BLEZL
> or BGTZL.
>
> It should be said that for single pass strategy, the problem does not
> happen because CPU doesn't trap on branch-compacts which share opcode
> space with BLEZL/BGTZL (but have rt field != 0, of course).
>
> Signed-off-by: Leonid Yegoshin <leonid.yegoshin@imgtec.com>
> Signed-off-by: Miodrag Dinic <miodrag.dinic@imgtech.com>
> Signed-off-by: Aleksandar Markovic <aleksandar.markovic@imgtech.com>
> Reported-by: Douglas Leung <douglas.leung@imgtec.com>
> Reviewed-by: Paul Burton <paul.burton@imgtec.com>
Thanks for sorting out the review comments on v1.
Applied,
Ralf
next prev parent reply other threads:[~2017-03-22 15:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-13 15:36 [PATCH 0/3] MIPS: Fix some R2/FP emulation issues Aleksandar Markovic
2017-03-13 15:36 ` [PATCH 1/3] MIPS: r2-on-r6-emu: Fix BLEZL and BGTZL identification Aleksandar Markovic
2017-03-22 15:03 ` Ralf Baechle [this message]
2017-03-13 15:36 ` [PATCH 2/3] MIPS: r2-on-r6-emu: Clear BLTZALL and BGEZALL debugfs counters Aleksandar Markovic
2017-03-22 15:05 ` Ralf Baechle
2017-03-13 15:36 ` [PATCH 3/3] MIPS: math-emu: Fix BC1EQZ and BC1NEZ condition handling Aleksandar Markovic
2017-03-22 15:05 ` Ralf Baechle
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=20170322150319.GA14889@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=aleksandar.markovic@imgtec.com \
--cc=aleksandar.markovic@rt-rk.com \
--cc=douglas.leung@imgtec.com \
--cc=goran.ferenc@imgtec.com \
--cc=james.hogan@imgtec.com \
--cc=leonid.yegoshin@imgtec.com \
--cc=linux-mips@linux-mips.org \
--cc=miodrag.dinic@imgtec.com \
--cc=paul.burton@imgtec.com \
--cc=petar.jovanovic@imgtec.com \
/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.