From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: "Peter A. G. Crosthwaite" <peter.crosthwaite@petalogix.com>
Cc: david.holsgrove@petalogix.com, qemu-devel@nongnu.org,
john.williams@petalogix.com
Subject: Re: [Qemu-devel] [RFC PATCH V1 1/2] target-microblaze: impelemented swapx instructions
Date: Fri, 18 May 2012 12:21:09 +0200 [thread overview]
Message-ID: <20120518102109.GB32158@zapo> (raw)
In-Reply-To: <c5218e1f2075107abacf86f226da845ae810361a.1337232850.git.peter.crosthwaite@petalogix.com>
On Thu, May 17, 2012 at 03:37:49PM +1000, Peter A. G. Crosthwaite wrote:
> Implemented the swapb and swaph byte/halfword reversal instructions added
> to microblaze v8.30
>
> Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
Applied, thanks Peter
> ---
> target-microblaze/translate.c | 12 +++++++++++-
> 1 files changed, 11 insertions(+), 1 deletions(-)
>
> diff --git a/target-microblaze/translate.c b/target-microblaze/translate.c
> index 742b395..a362938 100644
> --- a/target-microblaze/translate.c
> +++ b/target-microblaze/translate.c
> @@ -743,7 +743,7 @@ static void dec_bit(DisasContext *dc)
> unsigned int op;
> int mem_index = cpu_mmu_index(dc->env);
>
> - op = dc->ir & ((1 << 8) - 1);
> + op = dc->ir & ((1 << 9) - 1);
> switch (op) {
> case 0x21:
> /* src. */
> @@ -825,6 +825,16 @@ static void dec_bit(DisasContext *dc)
> gen_helper_clz(cpu_R[dc->rd], cpu_R[dc->ra]);
> }
> break;
> + case 0x1e0:
> + /* swapb */
> + LOG_DIS("swapb r%d r%d\n", dc->rd, dc->ra);
> + tcg_gen_bswap32_i32(cpu_R[dc->rd], cpu_R[dc->ra]);
> + break;
> + case 0x1e1:
> + /*swaph */
> + LOG_DIS("swaph r%d r%d\n", dc->rd, dc->ra);
> + tcg_gen_rotri_i32(cpu_R[dc->rd], cpu_R[dc->ra], 16);
> + break;
> default:
> cpu_abort(dc->env, "unknown bit oc=%x op=%x rd=%d ra=%d rb=%d\n",
> dc->pc, op, dc->rd, dc->ra, dc->rb);
> --
> 1.7.3.2
>
next prev parent reply other threads:[~2012-05-18 10:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-17 5:37 [Qemu-devel] [RFC PATCH V1 0/2] Microblaze CPU model v8.30 updates Peter A. G. Crosthwaite
2012-05-17 5:37 ` [Qemu-devel] [RFC PATCH V1 1/2] target-microblaze: impelemented swapx instructions Peter A. G. Crosthwaite
2012-05-18 10:21 ` Edgar E. Iglesias [this message]
2012-05-17 5:37 ` [Qemu-devel] [RFC PATCH V1 2/2] target-microblaze: lwx/swx: first implementation Peter A. G. Crosthwaite
2012-05-18 10:36 ` Edgar E. Iglesias
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=20120518102109.GB32158@zapo \
--to=edgar.iglesias@gmail.com \
--cc=david.holsgrove@petalogix.com \
--cc=john.williams@petalogix.com \
--cc=peter.crosthwaite@petalogix.com \
--cc=qemu-devel@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 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).