* [Qemu-devel] [PATCH for-stable 0/5] target/ppc: VSX/xvxsigdp fixes for 4.0 stable
@ 2019-06-04 19:01 Mark Cave-Ayland
2019-06-04 19:01 ` [Qemu-devel] [PATCH for-stable 1/5] target/ppc: Fix xvabs[sd]p, xvnabs[sd]p, xvneg[sd]p, xvcpsgn[sd]p Mark Cave-Ayland
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Mark Cave-Ayland @ 2019-06-04 19:01 UTC (permalink / raw)
To: qemu-devel, qemu-ppc, qemu-stable, david
Nothing to see here - just Anton's patches fixing several issues with the
VSX native endian conversion patches from 4.0, plus a related bug in xvxsigdp
queued for 4.0 stable.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Anton Blanchard (5):
target/ppc: Fix xvabs[sd]p, xvnabs[sd]p, xvneg[sd]p, xvcpsgn[sd]p
target/ppc: Fix xvxsigdp
target/ppc: Fix xxbrq, xxbrw
target/ppc: Fix vsum2sws
target/ppc: Fix lxvw4x, lxvh8x and lxvb16x
target/ppc/int_helper.c | 2 +-
target/ppc/translate/vsx-impl.inc.c | 23 ++++++++++++-----------
2 files changed, 13 insertions(+), 12 deletions(-)
--
2.11.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH for-stable 1/5] target/ppc: Fix xvabs[sd]p, xvnabs[sd]p, xvneg[sd]p, xvcpsgn[sd]p
2019-06-04 19:01 [Qemu-devel] [PATCH for-stable 0/5] target/ppc: VSX/xvxsigdp fixes for 4.0 stable Mark Cave-Ayland
@ 2019-06-04 19:01 ` Mark Cave-Ayland
2019-06-04 19:01 ` [Qemu-devel] [PATCH for-stable 2/5] target/ppc: Fix xvxsigdp Mark Cave-Ayland
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Mark Cave-Ayland @ 2019-06-04 19:01 UTC (permalink / raw)
To: qemu-devel, qemu-ppc, qemu-stable, david
From: Anton Blanchard <anton@ozlabs.org>
We were using set_cpu_vsr*() when we should have used get_cpu_vsr*().
Fixes: 8b3b2d75c7c0 ("introduce get_cpu_vsr{l,h}() and set_cpu_vsr{l,h}() helpers for VSR register access")
Signed-off-by: Anton Blanchard <anton@ozlabs.org>
Message-Id: <20190509104912.6b754dff@kryten>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
target/ppc/translate/vsx-impl.inc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/ppc/translate/vsx-impl.inc.c b/target/ppc/translate/vsx-impl.inc.c
index 489b2436e4..1b483fc27e 100644
--- a/target/ppc/translate/vsx-impl.inc.c
+++ b/target/ppc/translate/vsx-impl.inc.c
@@ -858,8 +858,8 @@ static void glue(gen_, name)(DisasContext * ctx) \
xbh = tcg_temp_new_i64(); \
xbl = tcg_temp_new_i64(); \
sgm = tcg_temp_new_i64(); \
- set_cpu_vsrh(xB(ctx->opcode), xbh); \
- set_cpu_vsrl(xB(ctx->opcode), xbl); \
+ get_cpu_vsrh(xbh, xB(ctx->opcode)); \
+ get_cpu_vsrl(xbl, xB(ctx->opcode)); \
tcg_gen_movi_i64(sgm, sgn_mask); \
switch (op) { \
case OP_ABS: { \
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH for-stable 2/5] target/ppc: Fix xvxsigdp
2019-06-04 19:01 [Qemu-devel] [PATCH for-stable 0/5] target/ppc: VSX/xvxsigdp fixes for 4.0 stable Mark Cave-Ayland
2019-06-04 19:01 ` [Qemu-devel] [PATCH for-stable 1/5] target/ppc: Fix xvabs[sd]p, xvnabs[sd]p, xvneg[sd]p, xvcpsgn[sd]p Mark Cave-Ayland
@ 2019-06-04 19:01 ` Mark Cave-Ayland
2019-06-04 19:01 ` [Qemu-devel] [PATCH for-stable 3/5] target/ppc: Fix xxbrq, xxbrw Mark Cave-Ayland
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Mark Cave-Ayland @ 2019-06-04 19:01 UTC (permalink / raw)
To: qemu-devel, qemu-ppc, qemu-stable, david
From: Anton Blanchard <anton@ozlabs.org>
Fix a typo in xvxsigdp where we put both results into the lower
doubleword.
Fixes: dd977e4f45cb ("target/ppc: Optimize x[sv]xsigdp using deposit_i64()")
Signed-off-by: Anton Blanchard <anton@ozlabs.org>
Message-Id: <20190507004811.29968-1-anton@ozlabs.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
target/ppc/translate/vsx-impl.inc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/ppc/translate/vsx-impl.inc.c b/target/ppc/translate/vsx-impl.inc.c
index 1b483fc27e..96e4ff4411 100644
--- a/target/ppc/translate/vsx-impl.inc.c
+++ b/target/ppc/translate/vsx-impl.inc.c
@@ -1819,7 +1819,7 @@ static void gen_xvxsigdp(DisasContext *ctx)
tcg_gen_movi_i64(t0, 0x0010000000000000);
tcg_gen_movcond_i64(TCG_COND_EQ, t0, exp, zr, zr, t0);
tcg_gen_movcond_i64(TCG_COND_EQ, t0, exp, nan, zr, t0);
- tcg_gen_deposit_i64(xth, t0, xbl, 0, 52);
+ tcg_gen_deposit_i64(xtl, t0, xbl, 0, 52);
set_cpu_vsrl(xT(ctx->opcode), xtl);
tcg_temp_free_i64(t0);
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH for-stable 3/5] target/ppc: Fix xxbrq, xxbrw
2019-06-04 19:01 [Qemu-devel] [PATCH for-stable 0/5] target/ppc: VSX/xvxsigdp fixes for 4.0 stable Mark Cave-Ayland
2019-06-04 19:01 ` [Qemu-devel] [PATCH for-stable 1/5] target/ppc: Fix xvabs[sd]p, xvnabs[sd]p, xvneg[sd]p, xvcpsgn[sd]p Mark Cave-Ayland
2019-06-04 19:01 ` [Qemu-devel] [PATCH for-stable 2/5] target/ppc: Fix xvxsigdp Mark Cave-Ayland
@ 2019-06-04 19:01 ` Mark Cave-Ayland
2019-06-04 19:01 ` [Qemu-devel] [PATCH for-stable 4/5] target/ppc: Fix vsum2sws Mark Cave-Ayland
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Mark Cave-Ayland @ 2019-06-04 19:01 UTC (permalink / raw)
To: qemu-devel, qemu-ppc, qemu-stable, david
From: Anton Blanchard <anton@ozlabs.org>
Fix a typo in xxbrq and xxbrw where we put both results into the lower
doubleword.
Fixes: 8b3b2d75c7c0 ("introduce get_cpu_vsr{l,h}() and set_cpu_vsr{l,h}() helpers for VSR register access")
Signed-off-by: Anton Blanchard <anton@ozlabs.org>
Message-Id: <20190507004811.29968-3-anton@ozlabs.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
target/ppc/translate/vsx-impl.inc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/ppc/translate/vsx-impl.inc.c b/target/ppc/translate/vsx-impl.inc.c
index 96e4ff4411..7778d5d651 100644
--- a/target/ppc/translate/vsx-impl.inc.c
+++ b/target/ppc/translate/vsx-impl.inc.c
@@ -1192,7 +1192,7 @@ static void gen_xxbrq(DisasContext *ctx)
tcg_gen_bswap64_i64(xtl, xbh);
set_cpu_vsrl(xT(ctx->opcode), xtl);
tcg_gen_mov_i64(xth, t0);
- set_cpu_vsrl(xT(ctx->opcode), xth);
+ set_cpu_vsrh(xT(ctx->opcode), xth);
tcg_temp_free_i64(t0);
tcg_temp_free_i64(xth);
@@ -1220,7 +1220,7 @@ static void gen_xxbrw(DisasContext *ctx)
get_cpu_vsrl(xbl, xB(ctx->opcode));
gen_bswap32x4(xth, xtl, xbh, xbl);
- set_cpu_vsrl(xT(ctx->opcode), xth);
+ set_cpu_vsrh(xT(ctx->opcode), xth);
set_cpu_vsrl(xT(ctx->opcode), xtl);
tcg_temp_free_i64(xth);
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH for-stable 4/5] target/ppc: Fix vsum2sws
2019-06-04 19:01 [Qemu-devel] [PATCH for-stable 0/5] target/ppc: VSX/xvxsigdp fixes for 4.0 stable Mark Cave-Ayland
` (2 preceding siblings ...)
2019-06-04 19:01 ` [Qemu-devel] [PATCH for-stable 3/5] target/ppc: Fix xxbrq, xxbrw Mark Cave-Ayland
@ 2019-06-04 19:01 ` Mark Cave-Ayland
2019-06-04 19:01 ` [Qemu-devel] [PATCH for-stable 5/5] target/ppc: Fix lxvw4x, lxvh8x and lxvb16x Mark Cave-Ayland
2019-06-05 0:10 ` [Qemu-devel] [PATCH for-stable 0/5] target/ppc: VSX/xvxsigdp fixes for 4.0 stable David Gibson
5 siblings, 0 replies; 7+ messages in thread
From: Mark Cave-Ayland @ 2019-06-04 19:01 UTC (permalink / raw)
To: qemu-devel, qemu-ppc, qemu-stable, david
From: Anton Blanchard <anton@ozlabs.org>
A recent cleanup changed the pre zeroing of the result from 64 bit
to 32 bit operations:
- result.u64[i] = 0;
+ result.VsrW(i) = 0;
This corrupts the result.
Fixes: 60594fea298d ("target/ppc: remove various HOST_WORDS_BIGENDIAN hacks in int_helper.c")
Signed-off-by: Anton Blanchard <anton@ozlabs.org>
Message-Id: <20190507004811.29968-9-anton@ozlabs.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
target/ppc/int_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c
index 162add561e..6bd1d32b1d 100644
--- a/target/ppc/int_helper.c
+++ b/target/ppc/int_helper.c
@@ -2030,7 +2030,7 @@ void helper_vsum2sws(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)
for (i = 0; i < ARRAY_SIZE(r->u64); i++) {
int64_t t = (int64_t)b->VsrSW(upper + i * 2);
- result.VsrW(i) = 0;
+ result.VsrD(i) = 0;
for (j = 0; j < ARRAY_SIZE(r->u64); j++) {
t += a->VsrSW(2 * i + j);
}
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH for-stable 5/5] target/ppc: Fix lxvw4x, lxvh8x and lxvb16x
2019-06-04 19:01 [Qemu-devel] [PATCH for-stable 0/5] target/ppc: VSX/xvxsigdp fixes for 4.0 stable Mark Cave-Ayland
` (3 preceding siblings ...)
2019-06-04 19:01 ` [Qemu-devel] [PATCH for-stable 4/5] target/ppc: Fix vsum2sws Mark Cave-Ayland
@ 2019-06-04 19:01 ` Mark Cave-Ayland
2019-06-05 0:10 ` [Qemu-devel] [PATCH for-stable 0/5] target/ppc: VSX/xvxsigdp fixes for 4.0 stable David Gibson
5 siblings, 0 replies; 7+ messages in thread
From: Mark Cave-Ayland @ 2019-06-04 19:01 UTC (permalink / raw)
To: qemu-devel, qemu-ppc, qemu-stable, david
From: Anton Blanchard <anton@ozlabs.org>
During the conversion these instructions were incorrectly treated as
stores. We need to use set_cpu_vsr* and not get_cpu_vsr*.
Fixes: 8b3b2d75c7c0 ("introduce get_cpu_vsr{l,h}() and set_cpu_vsr{l,h}() helpers for VSR register access")
Signed-off-by: Anton Blanchard <anton@ozlabs.org>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Tested-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-Id: <20190524065345.25591-1-mark.cave-ayland@ilande.co.uk>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
target/ppc/translate/vsx-impl.inc.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/target/ppc/translate/vsx-impl.inc.c b/target/ppc/translate/vsx-impl.inc.c
index 7778d5d651..9e59e2a309 100644
--- a/target/ppc/translate/vsx-impl.inc.c
+++ b/target/ppc/translate/vsx-impl.inc.c
@@ -102,8 +102,7 @@ static void gen_lxvw4x(DisasContext *ctx)
}
xth = tcg_temp_new_i64();
xtl = tcg_temp_new_i64();
- get_cpu_vsrh(xth, xT(ctx->opcode));
- get_cpu_vsrl(xtl, xT(ctx->opcode));
+
gen_set_access_type(ctx, ACCESS_INT);
EA = tcg_temp_new();
@@ -126,6 +125,8 @@ static void gen_lxvw4x(DisasContext *ctx)
tcg_gen_addi_tl(EA, EA, 8);
tcg_gen_qemu_ld_i64(xtl, EA, ctx->mem_idx, MO_BEQ);
}
+ set_cpu_vsrh(xT(ctx->opcode), xth);
+ set_cpu_vsrl(xT(ctx->opcode), xtl);
tcg_temp_free(EA);
tcg_temp_free_i64(xth);
tcg_temp_free_i64(xtl);
@@ -185,8 +186,6 @@ static void gen_lxvh8x(DisasContext *ctx)
}
xth = tcg_temp_new_i64();
xtl = tcg_temp_new_i64();
- get_cpu_vsrh(xth, xT(ctx->opcode));
- get_cpu_vsrl(xtl, xT(ctx->opcode));
gen_set_access_type(ctx, ACCESS_INT);
EA = tcg_temp_new();
@@ -197,6 +196,8 @@ static void gen_lxvh8x(DisasContext *ctx)
if (ctx->le_mode) {
gen_bswap16x8(xth, xtl, xth, xtl);
}
+ set_cpu_vsrh(xT(ctx->opcode), xth);
+ set_cpu_vsrl(xT(ctx->opcode), xtl);
tcg_temp_free(EA);
tcg_temp_free_i64(xth);
tcg_temp_free_i64(xtl);
@@ -214,14 +215,14 @@ static void gen_lxvb16x(DisasContext *ctx)
}
xth = tcg_temp_new_i64();
xtl = tcg_temp_new_i64();
- get_cpu_vsrh(xth, xT(ctx->opcode));
- get_cpu_vsrl(xtl, xT(ctx->opcode));
gen_set_access_type(ctx, ACCESS_INT);
EA = tcg_temp_new();
gen_addr_reg_index(ctx, EA);
tcg_gen_qemu_ld_i64(xth, EA, ctx->mem_idx, MO_BEQ);
tcg_gen_addi_tl(EA, EA, 8);
tcg_gen_qemu_ld_i64(xtl, EA, ctx->mem_idx, MO_BEQ);
+ set_cpu_vsrh(xT(ctx->opcode), xth);
+ set_cpu_vsrl(xT(ctx->opcode), xtl);
tcg_temp_free(EA);
tcg_temp_free_i64(xth);
tcg_temp_free_i64(xtl);
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH for-stable 0/5] target/ppc: VSX/xvxsigdp fixes for 4.0 stable
2019-06-04 19:01 [Qemu-devel] [PATCH for-stable 0/5] target/ppc: VSX/xvxsigdp fixes for 4.0 stable Mark Cave-Ayland
` (4 preceding siblings ...)
2019-06-04 19:01 ` [Qemu-devel] [PATCH for-stable 5/5] target/ppc: Fix lxvw4x, lxvh8x and lxvb16x Mark Cave-Ayland
@ 2019-06-05 0:10 ` David Gibson
5 siblings, 0 replies; 7+ messages in thread
From: David Gibson @ 2019-06-05 0:10 UTC (permalink / raw)
To: Mark Cave-Ayland; +Cc: qemu-ppc, qemu-devel, qemu-stable
[-- Attachment #1: Type: text/plain, Size: 1001 bytes --]
On Tue, Jun 04, 2019 at 08:01:10PM +0100, Mark Cave-Ayland wrote:
> Nothing to see here - just Anton's patches fixing several issues with the
> VSX native endian conversion patches from 4.0, plus a related bug in xvxsigdp
> queued for 4.0 stable.
>
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
>
>
> Anton Blanchard (5):
> target/ppc: Fix xvabs[sd]p, xvnabs[sd]p, xvneg[sd]p, xvcpsgn[sd]p
> target/ppc: Fix xvxsigdp
> target/ppc: Fix xxbrq, xxbrw
> target/ppc: Fix vsum2sws
> target/ppc: Fix lxvw4x, lxvh8x and lxvb16x
>
> target/ppc/int_helper.c | 2 +-
> target/ppc/translate/vsx-impl.inc.c | 23 ++++++++++++-----------
> 2 files changed, 13 insertions(+), 12 deletions(-)
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-06-05 2:56 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-04 19:01 [Qemu-devel] [PATCH for-stable 0/5] target/ppc: VSX/xvxsigdp fixes for 4.0 stable Mark Cave-Ayland
2019-06-04 19:01 ` [Qemu-devel] [PATCH for-stable 1/5] target/ppc: Fix xvabs[sd]p, xvnabs[sd]p, xvneg[sd]p, xvcpsgn[sd]p Mark Cave-Ayland
2019-06-04 19:01 ` [Qemu-devel] [PATCH for-stable 2/5] target/ppc: Fix xvxsigdp Mark Cave-Ayland
2019-06-04 19:01 ` [Qemu-devel] [PATCH for-stable 3/5] target/ppc: Fix xxbrq, xxbrw Mark Cave-Ayland
2019-06-04 19:01 ` [Qemu-devel] [PATCH for-stable 4/5] target/ppc: Fix vsum2sws Mark Cave-Ayland
2019-06-04 19:01 ` [Qemu-devel] [PATCH for-stable 5/5] target/ppc: Fix lxvw4x, lxvh8x and lxvb16x Mark Cave-Ayland
2019-06-05 0:10 ` [Qemu-devel] [PATCH for-stable 0/5] target/ppc: VSX/xvxsigdp fixes for 4.0 stable David Gibson
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).