qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: laurent@vivier.eu
Subject: [PATCH for-9.2 0/4] target/m68k: Implement fmove.p
Date: Sun, 11 Aug 2024 16:03:09 +1000	[thread overview]
Message-ID: <20240811060313.730410-1-richard.henderson@linaro.org> (raw)

Implement packed decimal real conversions.

This is perhaps too trivial, as it does not produce correctly rounded
results compared to the compiler.  I'm not sure how else to implement
this without using gmp, which seems a bit heavy-weight.

Perhaps we could do better with a compile-time table of powers of 10,
rather that the pile of runtime roundings that I use in this patch set.
If the host libc supports float128, we could probably leverage scanf
to produce properly rounded results, but that ignores other hosts.


r~


Richard Henderson (4):
  target/m68k: Introduce M68K_FEATURE_FPU_PACKED_DECIMAL
  target/m68k: Implement packed decimal real loads
  target/m68k: Implement packed decimal real stores
  tests/tcg/m68k: Add packed decimal tests

 target/m68k/cpu.h                |   2 +
 target/m68k/helper.h             |   3 +
 target/m68k/cpu.c                |   2 +
 target/m68k/fpu_helper.c         | 237 +++++++++++++++++++++++++++++++
 target/m68k/translate.c          |  49 +++++--
 tests/tcg/m68k/packeddecimal-1.c |  45 ++++++
 tests/tcg/m68k/packeddecimal-2.c |  42 ++++++
 tests/tcg/m68k/Makefile.target   |   2 +-
 8 files changed, 368 insertions(+), 14 deletions(-)
 create mode 100644 tests/tcg/m68k/packeddecimal-1.c
 create mode 100644 tests/tcg/m68k/packeddecimal-2.c

-- 
2.43.0



             reply	other threads:[~2024-08-11  6:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-11  6:03 Richard Henderson [this message]
2024-08-11  6:03 ` [PATCH 1/4] target/m68k: Introduce M68K_FEATURE_FPU_PACKED_DECIMAL Richard Henderson
2024-08-11  6:03 ` [PATCH 2/4] target/m68k: Implement packed decimal real loads Richard Henderson
2024-08-11  6:03 ` [PATCH 3/4] target/m68k: Implement packed decimal real stores Richard Henderson
2024-08-11  6:03 ` [PATCH 4/4] tests/tcg/m68k: Add packed decimal tests Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240811060313.730410-1-richard.henderson@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).