All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] target/s390x: Implement DIVIDE TO INTEGER
@ 2026-01-27 15:31 Ilya Leoshkevich
  2026-01-27 15:31 ` [PATCH v2 1/4] target/s390x: Dump Floating-Point-Control Register Ilya Leoshkevich
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Ilya Leoshkevich @ 2026-01-27 15:31 UTC (permalink / raw)
  To: Thomas Huth, Richard Henderson
  Cc: David Hildenbrand, qemu-s390x, qemu-devel, Ilya Leoshkevich

v1: https://lore.kernel.org/qemu-devel/20260121222116.713325-1-iii@linux.ibm.com/
v1 -> v2: Move the implementatation to fpu/ and rewrite using
          FloatParts (Richard). I can't say I particularly like the way
          it looks, but at least most macros are gone and it survives
          fuzzing.
          Explain why we need -O0 for the test (Alex).
          New patch: s390_get_bfp_rounding_mode().
          Add a few comments with calculation examples to the test.

Hi,

This series implements DIVIDE TO INTEGER instruction, which is
required to run LuaJIT.

Patch 1 is a debugging helper, patch 2 is a small refactoring, patch 3
is the implementation.

Since the instruction is quite complex, I've extensively tested it
using a libFuzzer-based harness [1] that compares emulation with native
execution at ~15k exec/s. The tests (patch 4) use data generated
this way.

Best regards,
Ilya

Ilya Leoshkevich (4):
  target/s390x: Dump Floating-Point-Control Register
  target/s390x: Extract s390_get_bfp_rounding_mode()
  target/s390x: Implement DIVIDE TO INTEGER
  tests/tcg/s390x: Test DIVIDE TO INTEGER

 fpu/softfloat.c                     | 158 ++++++++++++++++++
 include/fpu/softfloat.h             |  11 ++
 target/s390x/cpu-dump.c             |   1 +
 target/s390x/helper.h               |   1 +
 target/s390x/tcg/fpu_helper.c       | 118 ++++++++++----
 target/s390x/tcg/insn-data.h.inc    |   5 +-
 target/s390x/tcg/translate.c        |  26 +++
 tests/tcg/s390x/Makefile.target     |   5 +
 tests/tcg/s390x/divide-to-integer.c | 242 ++++++++++++++++++++++++++++
 9 files changed, 535 insertions(+), 32 deletions(-)
 create mode 100644 tests/tcg/s390x/divide-to-integer.c

-- 
2.52.0



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

end of thread, other threads:[~2026-02-02  6:04 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-27 15:31 [PATCH v2 0/4] target/s390x: Implement DIVIDE TO INTEGER Ilya Leoshkevich
2026-01-27 15:31 ` [PATCH v2 1/4] target/s390x: Dump Floating-Point-Control Register Ilya Leoshkevich
2026-01-27 15:31 ` [PATCH v2 2/4] target/s390x: Extract s390_get_bfp_rounding_mode() Ilya Leoshkevich
2026-01-28  5:25   ` Richard Henderson
2026-01-27 15:31 ` [PATCH v2 3/4] target/s390x: Implement DIVIDE TO INTEGER Ilya Leoshkevich
2026-01-28  5:50   ` Richard Henderson
2026-01-28 13:19     ` Ilya Leoshkevich
2026-01-28 20:38       ` Richard Henderson
2026-01-29 18:24         ` Ilya Leoshkevich
2026-02-02  6:03           ` Richard Henderson
2026-01-27 15:31 ` [PATCH v2 4/4] tests/tcg/s390x: Test " Ilya Leoshkevich

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.