qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/23] tcg: Introduce negsetcond opcodes
@ 2023-08-18 22:13 Richard Henderson
  2023-08-18 22:13 ` [PATCH v2 01/23] " Richard Henderson
                   ` (22 more replies)
  0 siblings, 23 replies; 31+ messages in thread
From: Richard Henderson @ 2023-08-18 22:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Thomas Huth, 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.

Changes for v2:
  * Drop "tcg/i386: Add cf parameter to tcg_out_cmp" patch.

Patches needing review:
  15: tcg/s390x: Implement negsetcond_*


r~


Cc: Thomas Huth <thuth@redhat.com>
Cc: qemu-s390x@nongnu.org


Richard Henderson (23):
  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: 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                  | 255 +++++++++++++--------
 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, 567 insertions(+), 265 deletions(-)

-- 
2.34.1



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

end of thread, other threads:[~2023-08-21  7:23 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-18 22:13 [PATCH v2 00/23] tcg: Introduce negsetcond opcodes Richard Henderson
2023-08-18 22:13 ` [PATCH v2 01/23] " Richard Henderson
2023-08-18 22:13 ` [PATCH v2 02/23] tcg: Use tcg_gen_negsetcond_* Richard Henderson
2023-08-21  7:10   ` Philippe Mathieu-Daudé
2023-08-18 22:13 ` [PATCH v2 03/23] target/alpha: Use tcg_gen_movcond_i64 in gen_fold_mzero Richard Henderson
2023-08-18 22:13 ` [PATCH v2 04/23] target/arm: Use tcg_gen_negsetcond_* Richard Henderson
2023-08-18 22:13 ` [PATCH v2 05/23] target/m68k: " Richard Henderson
2023-08-21  7:11   ` Philippe Mathieu-Daudé
2023-08-18 22:13 ` [PATCH v2 06/23] target/openrisc: " Richard Henderson
2023-08-21  7:12   ` Philippe Mathieu-Daudé
2023-08-18 22:13 ` [PATCH v2 07/23] target/ppc: " Richard Henderson
2023-08-18 22:13 ` [PATCH v2 08/23] target/sparc: Use tcg_gen_movcond_i64 in gen_edge Richard Henderson
2023-08-18 22:13 ` [PATCH v2 09/23] target/tricore: Replace gen_cond_w with tcg_gen_negsetcond_tl Richard Henderson
2023-08-21  7:13   ` Philippe Mathieu-Daudé
2023-08-18 22:13 ` [PATCH v2 10/23] tcg/ppc: Implement negsetcond_* Richard Henderson
2023-08-18 22:13 ` [PATCH v2 11/23] tcg/ppc: Use the Set Boolean Extension Richard Henderson
2023-08-18 22:13 ` [PATCH v2 12/23] tcg/aarch64: Implement negsetcond_* Richard Henderson
2023-08-18 22:13 ` [PATCH v2 13/23] tcg/arm: Implement negsetcond_i32 Richard Henderson
2023-08-18 22:13 ` [PATCH v2 14/23] tcg/riscv: Implement negsetcond_* Richard Henderson
2023-08-18 22:13 ` [PATCH v2 15/23] tcg/s390x: " Richard Henderson
2023-08-18 22:13 ` [PATCH v2 16/23] tcg/sparc64: " Richard Henderson
2023-08-18 22:13 ` [PATCH v2 17/23] tcg/i386: Merge tcg_out_brcond{32,64} Richard Henderson
2023-08-21  7:21   ` Philippe Mathieu-Daudé
2023-08-18 22:13 ` [PATCH v2 18/23] tcg/i386: Merge tcg_out_setcond{32,64} Richard Henderson
2023-08-21  7:22   ` Philippe Mathieu-Daudé
2023-08-18 22:13 ` [PATCH v2 19/23] tcg/i386: Merge tcg_out_movcond{32,64} Richard Henderson
2023-08-21  7:22   ` Philippe Mathieu-Daudé
2023-08-18 22:13 ` [PATCH v2 20/23] tcg/i386: Use CMP+SBB in tcg_out_setcond Richard Henderson
2023-08-18 22:13 ` [PATCH v2 21/23] tcg/i386: Clear dest first in tcg_out_setcond if possible Richard Henderson
2023-08-18 22:13 ` [PATCH v2 22/23] tcg/i386: Use shift in tcg_out_setcond Richard Henderson
2023-08-18 22:13 ` [PATCH v2 23/23] tcg/i386: Implement negsetcond_* Richard Henderson

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