* [Qemu-devel] [PULL 1.5 0/2] ppc patch queue 2013-05-08
@ 2013-05-08 18:24 Alexander Graf
2013-05-08 18:24 ` [Qemu-devel] [PATCH 1/2] PPC: Fix rldcl Alexander Graf
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Alexander Graf @ 2013-05-08 18:24 UTC (permalink / raw)
To: qemu-ppc; +Cc: Blue Swirl, Aurelien Jarno, qemu-devel, Anthony Liguori
Hi Blue / Aurelien,
This is my current patch queue for ppc with fixes that need to go into 1.5.
Please pull.
Alex
The following changes since commit c0f5f9ce86ddca0a7d7ca60012059a5a18aa9c07:
Petar Jovanovic (1):
target-mips: fix incorrect behaviour for INSV
are available in the git repository at:
git://github.com/agraf/qemu.git ppc-for-upstream
Alexander Graf (2):
PPC: Fix rldcl
PPC: Depend behavior of cmp instructions only on instruction encoding
target-ppc/translate.c | 34 ++++++++++++++++------------------
1 files changed, 16 insertions(+), 18 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 1/2] PPC: Fix rldcl
2013-05-08 18:24 [Qemu-devel] [PULL 1.5 0/2] ppc patch queue 2013-05-08 Alexander Graf
@ 2013-05-08 18:24 ` Alexander Graf
2013-05-08 18:24 ` [Qemu-devel] [PATCH 2/2] PPC: Depend behavior of cmp instructions only on instruction encoding Alexander Graf
2013-05-08 20:35 ` [Qemu-devel] [PULL 1.5 0/2] ppc patch queue 2013-05-08 Aurelien Jarno
2 siblings, 0 replies; 4+ messages in thread
From: Alexander Graf @ 2013-05-08 18:24 UTC (permalink / raw)
To: qemu-ppc; +Cc: Blue Swirl, Aurelien Jarno, qemu-devel, Anthony Liguori
The implementation for rldcl tried to always fetch its
parameters from the opcode, even though the opcode was
already passed in in decoded and different forms.
Use the parameters instead, fixing rldcl.
Reported-by: Torbjorn Granlund <tg@gmplib.org>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
target-ppc/translate.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index 0886f4d..a018616 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -1733,8 +1733,6 @@ static inline void gen_rldnm(DisasContext *ctx, uint32_t mb, uint32_t me)
{
TCGv t0;
- mb = MB(ctx->opcode);
- me = ME(ctx->opcode);
t0 = tcg_temp_new();
tcg_gen_andi_tl(t0, cpu_gpr[rB(ctx->opcode)], 0x3f);
tcg_gen_rotl_tl(t0, cpu_gpr[rS(ctx->opcode)], t0);
--
1.6.0.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 2/2] PPC: Depend behavior of cmp instructions only on instruction encoding
2013-05-08 18:24 [Qemu-devel] [PULL 1.5 0/2] ppc patch queue 2013-05-08 Alexander Graf
2013-05-08 18:24 ` [Qemu-devel] [PATCH 1/2] PPC: Fix rldcl Alexander Graf
@ 2013-05-08 18:24 ` Alexander Graf
2013-05-08 20:35 ` [Qemu-devel] [PULL 1.5 0/2] ppc patch queue 2013-05-08 Aurelien Jarno
2 siblings, 0 replies; 4+ messages in thread
From: Alexander Graf @ 2013-05-08 18:24 UTC (permalink / raw)
To: qemu-ppc; +Cc: Blue Swirl, Aurelien Jarno, qemu-devel, Anthony Liguori
When running an L=1 cmp instruction on a 64bit PPC CPU with SF off, it
still behaves identical to what it does when SF is on. Remove the implicit
difference in the code.
Also, on most 32bit CPUs we should always treat the compare as 32bit
compare, as the CPU will ignore the L bit. This is not true for e500mc,
but that's up for a different patch.
Reported-by: Torbjorn Granlund <tg@gmplib.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
target-ppc/translate.c | 32 ++++++++++++++++----------------
1 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index a018616..4590c6f 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -675,48 +675,48 @@ static inline void gen_set_Rc0(DisasContext *ctx, TCGv reg)
/* cmp */
static void gen_cmp(DisasContext *ctx)
{
- if (NARROW_MODE(ctx) || !(ctx->opcode & 0x00200000)) {
- gen_op_cmp32(cpu_gpr[rA(ctx->opcode)], cpu_gpr[rB(ctx->opcode)],
- 1, crfD(ctx->opcode));
- } else {
+ if ((ctx->opcode & 0x00200000) && (ctx->insns_flags & PPC_64B)) {
gen_op_cmp(cpu_gpr[rA(ctx->opcode)], cpu_gpr[rB(ctx->opcode)],
1, crfD(ctx->opcode));
+ } else {
+ gen_op_cmp32(cpu_gpr[rA(ctx->opcode)], cpu_gpr[rB(ctx->opcode)],
+ 1, crfD(ctx->opcode));
}
}
/* cmpi */
static void gen_cmpi(DisasContext *ctx)
{
- if (NARROW_MODE(ctx) || !(ctx->opcode & 0x00200000)) {
- gen_op_cmpi32(cpu_gpr[rA(ctx->opcode)], SIMM(ctx->opcode),
- 1, crfD(ctx->opcode));
- } else {
+ if ((ctx->opcode & 0x00200000) && (ctx->insns_flags & PPC_64B)) {
gen_op_cmpi(cpu_gpr[rA(ctx->opcode)], SIMM(ctx->opcode),
1, crfD(ctx->opcode));
+ } else {
+ gen_op_cmpi32(cpu_gpr[rA(ctx->opcode)], SIMM(ctx->opcode),
+ 1, crfD(ctx->opcode));
}
}
/* cmpl */
static void gen_cmpl(DisasContext *ctx)
{
- if (NARROW_MODE(ctx) || !(ctx->opcode & 0x00200000)) {
- gen_op_cmp32(cpu_gpr[rA(ctx->opcode)], cpu_gpr[rB(ctx->opcode)],
- 0, crfD(ctx->opcode));
- } else {
+ if ((ctx->opcode & 0x00200000) && (ctx->insns_flags & PPC_64B)) {
gen_op_cmp(cpu_gpr[rA(ctx->opcode)], cpu_gpr[rB(ctx->opcode)],
0, crfD(ctx->opcode));
+ } else {
+ gen_op_cmp32(cpu_gpr[rA(ctx->opcode)], cpu_gpr[rB(ctx->opcode)],
+ 0, crfD(ctx->opcode));
}
}
/* cmpli */
static void gen_cmpli(DisasContext *ctx)
{
- if (NARROW_MODE(ctx) || !(ctx->opcode & 0x00200000)) {
- gen_op_cmpi32(cpu_gpr[rA(ctx->opcode)], UIMM(ctx->opcode),
- 0, crfD(ctx->opcode));
- } else {
+ if ((ctx->opcode & 0x00200000) && (ctx->insns_flags & PPC_64B)) {
gen_op_cmpi(cpu_gpr[rA(ctx->opcode)], UIMM(ctx->opcode),
0, crfD(ctx->opcode));
+ } else {
+ gen_op_cmpi32(cpu_gpr[rA(ctx->opcode)], UIMM(ctx->opcode),
+ 0, crfD(ctx->opcode));
}
}
--
1.6.0.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PULL 1.5 0/2] ppc patch queue 2013-05-08
2013-05-08 18:24 [Qemu-devel] [PULL 1.5 0/2] ppc patch queue 2013-05-08 Alexander Graf
2013-05-08 18:24 ` [Qemu-devel] [PATCH 1/2] PPC: Fix rldcl Alexander Graf
2013-05-08 18:24 ` [Qemu-devel] [PATCH 2/2] PPC: Depend behavior of cmp instructions only on instruction encoding Alexander Graf
@ 2013-05-08 20:35 ` Aurelien Jarno
2 siblings, 0 replies; 4+ messages in thread
From: Aurelien Jarno @ 2013-05-08 20:35 UTC (permalink / raw)
To: Alexander Graf; +Cc: Blue Swirl, qemu-ppc, qemu-devel, Anthony Liguori
On Wed, May 08, 2013 at 08:24:46PM +0200, Alexander Graf wrote:
> Hi Blue / Aurelien,
>
> This is my current patch queue for ppc with fixes that need to go into 1.5.
>
> Please pull.
>
> Alex
>
>
> The following changes since commit c0f5f9ce86ddca0a7d7ca60012059a5a18aa9c07:
> Petar Jovanovic (1):
> target-mips: fix incorrect behaviour for INSV
>
> are available in the git repository at:
>
> git://github.com/agraf/qemu.git ppc-for-upstream
>
> Alexander Graf (2):
> PPC: Fix rldcl
> PPC: Depend behavior of cmp instructions only on instruction encoding
>
> target-ppc/translate.c | 34 ++++++++++++++++------------------
> 1 files changed, 16 insertions(+), 18 deletions(-)
>
Thanks, pulled.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-05-08 20:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-08 18:24 [Qemu-devel] [PULL 1.5 0/2] ppc patch queue 2013-05-08 Alexander Graf
2013-05-08 18:24 ` [Qemu-devel] [PATCH 1/2] PPC: Fix rldcl Alexander Graf
2013-05-08 18:24 ` [Qemu-devel] [PATCH 2/2] PPC: Depend behavior of cmp instructions only on instruction encoding Alexander Graf
2013-05-08 20:35 ` [Qemu-devel] [PULL 1.5 0/2] ppc patch queue 2013-05-08 Aurelien Jarno
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.