All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL 0/3] tcg patch queue
@ 2022-06-02 15:13 Richard Henderson
  2022-06-02 15:13 ` [PULL 1/3] tcg: Add tcg_gen_mov_ptr Richard Henderson
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Richard Henderson @ 2022-06-02 15:13 UTC (permalink / raw)
  To: qemu-devel

The following changes since commit 1e62a82574fc28e64deca589a23cf55ada2e1a7d:

  Merge tag 'm68k-for-7.1-pull-request' of https://github.com/vivier/qemu-m68k into staging (2022-06-02 06:30:24 -0700)

are available in the Git repository at:

  https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20220602

for you to fetch changes up to 94bcc91b2e95e02ec57ed18d5a5e7cb75aa19a50:

  tcg/aarch64: Fix illegal insn from out-of-range shli (2022-06-02 08:09:46 -0700)

----------------------------------------------------------------
Add tcg_gen_mov_ptr.
Fix tcg/i386 encoding of avx512 vpsraq.
Fix tcg/aarch64 handling of out-of-range shli.

----------------------------------------------------------------
Richard Henderson (3):
      tcg: Add tcg_gen_mov_ptr
      tcg/i386: Fix encoding of OPC_VPSRAQ for INDEX_op_sars_vec
      tcg/aarch64: Fix illegal insn from out-of-range shli

 include/tcg/tcg-op.h         | 5 +++++
 tcg/aarch64/tcg-target.c.inc | 2 +-
 tcg/i386/tcg-target.c.inc    | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PULL 1/3] tcg: Add tcg_gen_mov_ptr
  2022-06-02 15:13 [PULL 0/3] tcg patch queue Richard Henderson
@ 2022-06-02 15:13 ` Richard Henderson
  2022-06-02 15:13 ` [PULL 2/3] tcg/i386: Fix encoding of OPC_VPSRAQ for INDEX_op_sars_vec Richard Henderson
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2022-06-02 15:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Matheus Ferst

Add an interface to perform moves between TCGv_ptr.

Reviewed-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 include/tcg/tcg-op.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/tcg/tcg-op.h b/include/tcg/tcg-op.h
index b09b8b4a05..209e168305 100644
--- a/include/tcg/tcg-op.h
+++ b/include/tcg/tcg-op.h
@@ -1288,6 +1288,11 @@ static inline void tcg_gen_addi_ptr(TCGv_ptr r, TCGv_ptr a, intptr_t b)
     glue(tcg_gen_addi_,PTR)((NAT)r, (NAT)a, b);
 }
 
+static inline void tcg_gen_mov_ptr(TCGv_ptr d, TCGv_ptr s)
+{
+    glue(tcg_gen_mov_,PTR)((NAT)d, (NAT)s);
+}
+
 static inline void tcg_gen_brcondi_ptr(TCGCond cond, TCGv_ptr a,
                                        intptr_t b, TCGLabel *label)
 {
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PULL 2/3] tcg/i386: Fix encoding of OPC_VPSRAQ for INDEX_op_sars_vec
  2022-06-02 15:13 [PULL 0/3] tcg patch queue Richard Henderson
  2022-06-02 15:13 ` [PULL 1/3] tcg: Add tcg_gen_mov_ptr Richard Henderson
@ 2022-06-02 15:13 ` Richard Henderson
  2022-06-02 15:13 ` [PULL 3/3] tcg/aarch64: Fix illegal insn from out-of-range shli Richard Henderson
  2022-06-02 16:41 ` [PULL 0/3] tcg patch queue Richard Henderson
  3 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2022-06-02 15:13 UTC (permalink / raw)
  To: qemu-devel

We wanted the VPSRAQ variant with the scalar vector shift operand,
not the variant with an immediate operand.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1022
Fixes: 47b331b2a8da ("tcg/i386: Implement avx512 scalar shift")
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 tcg/i386/tcg-target.c.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc
index b5c6159853..d52206ba4d 100644
--- a/tcg/i386/tcg-target.c.inc
+++ b/tcg/i386/tcg-target.c.inc
@@ -375,7 +375,7 @@ static bool tcg_target_const_match(int64_t val, TCGType type, int ct)
 #define OPC_PSLLQ       (0xf3 | P_EXT | P_DATA16)
 #define OPC_PSRAW       (0xe1 | P_EXT | P_DATA16)
 #define OPC_PSRAD       (0xe2 | P_EXT | P_DATA16)
-#define OPC_VPSRAQ      (0x72 | P_EXT | P_DATA16 | P_VEXW | P_EVEX)
+#define OPC_VPSRAQ      (0xe2 | P_EXT | P_DATA16 | P_VEXW | P_EVEX)
 #define OPC_PSRLW       (0xd1 | P_EXT | P_DATA16)
 #define OPC_PSRLD       (0xd2 | P_EXT | P_DATA16)
 #define OPC_PSRLQ       (0xd3 | P_EXT | P_DATA16)
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PULL 3/3] tcg/aarch64: Fix illegal insn from out-of-range shli
  2022-06-02 15:13 [PULL 0/3] tcg patch queue Richard Henderson
  2022-06-02 15:13 ` [PULL 1/3] tcg: Add tcg_gen_mov_ptr Richard Henderson
  2022-06-02 15:13 ` [PULL 2/3] tcg/i386: Fix encoding of OPC_VPSRAQ for INDEX_op_sars_vec Richard Henderson
@ 2022-06-02 15:13 ` Richard Henderson
  2022-06-02 16:41 ` [PULL 0/3] tcg patch queue Richard Henderson
  3 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2022-06-02 15:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Joel Stanley

The masking in tcg_out_shl was incorrect, producing an
illegal instruction, rather than merely unspecified results
for the out-of-range shift.

Tested-by: Joel Stanley <joel@jms.id.au>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1051
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 tcg/aarch64/tcg-target.c.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc
index 61e284bb5c..d997f7922a 100644
--- a/tcg/aarch64/tcg-target.c.inc
+++ b/tcg/aarch64/tcg-target.c.inc
@@ -1261,7 +1261,7 @@ static inline void tcg_out_shl(TCGContext *s, TCGType ext,
 {
     int bits = ext ? 64 : 32;
     int max = bits - 1;
-    tcg_out_ubfm(s, ext, rd, rn, bits - (m & max), max - (m & max));
+    tcg_out_ubfm(s, ext, rd, rn, (bits - m) & max, (max - m) & max);
 }
 
 static inline void tcg_out_shr(TCGContext *s, TCGType ext,
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PULL 0/3] tcg patch queue
  2022-06-02 15:13 [PULL 0/3] tcg patch queue Richard Henderson
                   ` (2 preceding siblings ...)
  2022-06-02 15:13 ` [PULL 3/3] tcg/aarch64: Fix illegal insn from out-of-range shli Richard Henderson
@ 2022-06-02 16:41 ` Richard Henderson
  3 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2022-06-02 16:41 UTC (permalink / raw)
  To: qemu-devel

On 6/2/22 08:13, Richard Henderson wrote:
> The following changes since commit 1e62a82574fc28e64deca589a23cf55ada2e1a7d:
> 
>    Merge tag 'm68k-for-7.1-pull-request' of https://github.com/vivier/qemu-m68k into staging (2022-06-02 06:30:24 -0700)
> 
> are available in the Git repository at:
> 
>    https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20220602
> 
> for you to fetch changes up to 94bcc91b2e95e02ec57ed18d5a5e7cb75aa19a50:
> 
>    tcg/aarch64: Fix illegal insn from out-of-range shli (2022-06-02 08:09:46 -0700)
> 
> ----------------------------------------------------------------
> Add tcg_gen_mov_ptr.
> Fix tcg/i386 encoding of avx512 vpsraq.
> Fix tcg/aarch64 handling of out-of-range shli.

Applied, thanks.  Please update https://wiki.qemu.org/ChangeLog/7.1 as appropriate.


r~



> 
> ----------------------------------------------------------------
> Richard Henderson (3):
>        tcg: Add tcg_gen_mov_ptr
>        tcg/i386: Fix encoding of OPC_VPSRAQ for INDEX_op_sars_vec
>        tcg/aarch64: Fix illegal insn from out-of-range shli
> 
>   include/tcg/tcg-op.h         | 5 +++++
>   tcg/aarch64/tcg-target.c.inc | 2 +-
>   tcg/i386/tcg-target.c.inc    | 2 +-
>   3 files changed, 7 insertions(+), 2 deletions(-)



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-06-02 16:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-02 15:13 [PULL 0/3] tcg patch queue Richard Henderson
2022-06-02 15:13 ` [PULL 1/3] tcg: Add tcg_gen_mov_ptr Richard Henderson
2022-06-02 15:13 ` [PULL 2/3] tcg/i386: Fix encoding of OPC_VPSRAQ for INDEX_op_sars_vec Richard Henderson
2022-06-02 15:13 ` [PULL 3/3] tcg/aarch64: Fix illegal insn from out-of-range shli Richard Henderson
2022-06-02 16:41 ` [PULL 0/3] tcg patch queue Richard Henderson

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.