qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-8.2 00/24] tcg: Introduce negsetcond opcodes
@ 2023-08-08  3:11 Richard Henderson
  2023-08-08  3:11 ` [PATCH 01/24] " Richard Henderson
                   ` (23 more replies)
  0 siblings, 24 replies; 59+ messages in thread
From: Richard Henderson @ 2023-08-08  3:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-arm, qemu-ppc, qemu-riscv, qemu-s390x

Introduce two new setcond opcode variants which produce -1 instead
of 1 when the condition.  For most of our hosts, producing -1 is
just as easy as 1, and avoid requiring a separate negate instruction.

Use the new opcode in tcg/tcg-op-gvec.c for integral expansion of
generic vector operations.  I looked through target/ for obvious
pairings of setcond and neg.


r~


Richard Henderson (24):
  tcg: Introduce negsetcond opcodes
  tcg: Use tcg_gen_negsetcond_*
  target/alpha: Use tcg_gen_movcond_i64 in gen_fold_mzero
  target/arm: Use tcg_gen_negsetcond_*
  target/m68k: Use tcg_gen_negsetcond_*
  target/openrisc: Use tcg_gen_negsetcond_*
  target/ppc: Use tcg_gen_negsetcond_*
  target/sparc: Use tcg_gen_movcond_i64 in gen_edge
  target/tricore: Replace gen_cond_w with tcg_gen_negsetcond_tl
  tcg/ppc: Implement negsetcond_*
  tcg/ppc: Use the Set Boolean Extension
  tcg/aarch64: Implement negsetcond_*
  tcg/arm: Implement negsetcond_i32
  tcg/riscv: Implement negsetcond_*
  tcg/s390x: Implement negsetcond_*
  tcg/sparc64: Implement negsetcond_*
  tcg/i386: Merge tcg_out_brcond{32,64}
  tcg/i386: Merge tcg_out_setcond{32,64}
  tcg/i386: Merge tcg_out_movcond{32,64}
  tcg/i386: Add cf parameter to tcg_out_cmp
  tcg/i386: Use CMP+SBB in tcg_out_setcond
  tcg/i386: Clear dest first in tcg_out_setcond if possible
  tcg/i386: Use shift in tcg_out_setcond
  tcg/i386: Implement negsetcond_*

 docs/devel/tcg-ops.rst                     |   6 +
 include/tcg/tcg-op-common.h                |   4 +
 include/tcg/tcg-op.h                       |   2 +
 include/tcg/tcg-opc.h                      |   2 +
 include/tcg/tcg.h                          |   1 +
 tcg/aarch64/tcg-target.h                   |   2 +
 tcg/arm/tcg-target.h                       |   1 +
 tcg/i386/tcg-target.h                      |   2 +
 tcg/loongarch64/tcg-target.h               |   3 +
 tcg/mips/tcg-target.h                      |   2 +
 tcg/ppc/tcg-target.h                       |   2 +
 tcg/riscv/tcg-target.h                     |   2 +
 tcg/s390x/tcg-target.h                     |   2 +
 tcg/sparc64/tcg-target.h                   |   2 +
 tcg/tci/tcg-target.h                       |   2 +
 target/alpha/translate.c                   |   7 +-
 target/arm/tcg/translate-a64.c             |  22 +-
 target/arm/tcg/translate.c                 |  12 +-
 target/m68k/translate.c                    |  24 +-
 target/openrisc/translate.c                |   6 +-
 target/sparc/translate.c                   |  17 +-
 target/tricore/translate.c                 |  16 +-
 tcg/optimize.c                             |  41 +++-
 tcg/tcg-op-gvec.c                          |   6 +-
 tcg/tcg-op.c                               |  42 +++-
 tcg/tcg.c                                  |   6 +
 target/ppc/translate/fixedpoint-impl.c.inc |   6 +-
 target/ppc/translate/vmx-impl.c.inc        |   8 +-
 tcg/aarch64/tcg-target.c.inc               |  12 +
 tcg/arm/tcg-target.c.inc                   |   9 +
 tcg/i386/tcg-target.c.inc                  | 265 +++++++++++++--------
 tcg/ppc/tcg-target.c.inc                   | 149 ++++++++----
 tcg/riscv/tcg-target.c.inc                 |  45 ++++
 tcg/s390x/tcg-target.c.inc                 |  78 ++++--
 tcg/sparc64/tcg-target.c.inc               |  36 ++-
 35 files changed, 572 insertions(+), 270 deletions(-)

-- 
2.34.1



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

end of thread, other threads:[~2023-08-15 13:17 UTC | newest]

Thread overview: 59+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-08  3:11 [PATCH for-8.2 00/24] tcg: Introduce negsetcond opcodes Richard Henderson
2023-08-08  3:11 ` [PATCH 01/24] " Richard Henderson
2023-08-10 16:12   ` Peter Maydell
2023-08-10 16:39     ` Richard Henderson
2023-08-08  3:11 ` [PATCH 02/24] tcg: Use tcg_gen_negsetcond_* Richard Henderson
2023-08-08 15:55   ` Peter Maydell
2023-08-08 16:04     ` Richard Henderson
2023-08-10 16:13   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 03/24] target/alpha: Use tcg_gen_movcond_i64 in gen_fold_mzero Richard Henderson
2023-08-10 16:19   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 04/24] target/arm: Use tcg_gen_negsetcond_* Richard Henderson
2023-08-10 16:22   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 05/24] target/m68k: " Richard Henderson
2023-08-10 16:24   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 06/24] target/openrisc: " Richard Henderson
2023-08-10 16:24   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 07/24] target/ppc: " Richard Henderson
2023-08-08 16:51   ` Daniel Henrique Barboza
2023-08-15 12:54   ` Nicholas Piggin
2023-08-08  3:11 ` [PATCH 08/24] target/sparc: Use tcg_gen_movcond_i64 in gen_edge Richard Henderson
2023-08-10 16:29   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 09/24] target/tricore: Replace gen_cond_w with tcg_gen_negsetcond_tl Richard Henderson
2023-08-08 15:42   ` Bastian Koppelmann
2023-08-08  3:11 ` [PATCH 10/24] tcg/ppc: Implement negsetcond_* Richard Henderson
2023-08-08 16:55   ` Daniel Henrique Barboza
2023-08-08  3:11 ` [PATCH 11/24] tcg/ppc: Use the Set Boolean Extension Richard Henderson
2023-08-08 16:56   ` Daniel Henrique Barboza
2023-08-15 13:16   ` Nicholas Piggin
2023-08-08  3:11 ` [PATCH 12/24] tcg/aarch64: Implement negsetcond_* Richard Henderson
2023-08-10 16:39   ` Peter Maydell
2023-08-10 16:55     ` Richard Henderson
2023-08-10 16:58       ` Peter Maydell
2023-08-10 17:01         ` Richard Henderson
2023-08-08  3:11 ` [PATCH 13/24] tcg/arm: Implement negsetcond_i32 Richard Henderson
2023-08-10 16:41   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 14/24] tcg/riscv: Implement negsetcond_* Richard Henderson
2023-08-08 16:47   ` Daniel Henrique Barboza
2023-08-08  3:11 ` [PATCH 15/24] tcg/s390x: " Richard Henderson
2023-08-08  3:11 ` [PATCH 16/24] tcg/sparc64: " Richard Henderson
2023-08-11 12:24   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 17/24] tcg/i386: Merge tcg_out_brcond{32,64} Richard Henderson
2023-08-11 10:20   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 18/24] tcg/i386: Merge tcg_out_setcond{32,64} Richard Henderson
2023-08-11 10:21   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 19/24] tcg/i386: Merge tcg_out_movcond{32,64} Richard Henderson
2023-08-11 10:22   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 20/24] tcg/i386: Add cf parameter to tcg_out_cmp Richard Henderson
2023-08-11 10:26   ` Peter Maydell
2023-08-11 10:45     ` Peter Maydell
2023-08-11 15:06       ` Richard Henderson
2023-08-12 17:21         ` Richard Henderson
2023-08-08  3:11 ` [PATCH 21/24] tcg/i386: Use CMP+SBB in tcg_out_setcond Richard Henderson
2023-08-11 12:07   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 22/24] tcg/i386: Clear dest first in tcg_out_setcond if possible Richard Henderson
2023-08-11 12:09   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 23/24] tcg/i386: Use shift in tcg_out_setcond Richard Henderson
2023-08-11 12:10   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 24/24] tcg/i386: Implement negsetcond_* Richard Henderson
2023-08-11 12:13   ` Peter Maydell

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).