From: Richard Henderson <richard.henderson@linaro.org>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: laurent@vivier.eu, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Subject: Re: [PATCH v2 3/4] target/m68k: Implement packed decimal real stores
Date: Fri, 16 Aug 2024 18:08:01 +1000 [thread overview]
Message-ID: <a04f056e-4903-4001-879c-6cd4329701f3@linaro.org> (raw)
In-Reply-To: <f2c4d863-1c54-4f28-9215-2d9d55d0de03@linaro.org>
On 8/16/24 16:37, Philippe Mathieu-Daudé wrote:
> Hi Richard,
>
> On 12/8/24 02:44, Richard Henderson wrote:
>> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2488
>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>> ---
>> target/m68k/helper.h | 1 +
>> target/m68k/fpu_helper.c | 112 +++++++++++++++++++++++++++++++++++++++
>> target/m68k/translate.c | 27 ++++++++--
>> 3 files changed, 137 insertions(+), 3 deletions(-)
>>
>> diff --git a/target/m68k/helper.h b/target/m68k/helper.h
>> index 2c71361451..21af6adb39 100644
>> --- a/target/m68k/helper.h
>> +++ b/target/m68k/helper.h
>> @@ -127,6 +127,7 @@ DEF_HELPER_3(chk, void, env, s32, s32)
>> DEF_HELPER_4(chk2, void, env, s32, s32, s32)
>> DEF_HELPER_FLAGS_3(load_pdr_to_fx80, TCG_CALL_NO_RWG, void, env, fp, tl)
>> +DEF_HELPER_FLAGS_4(store_fx80_to_pdr, TCG_CALL_NO_RWG, void, env, tl, fp, int)
>> #if !defined(CONFIG_USER_ONLY)
>> DEF_HELPER_3(ptest, void, env, i32, i32)
>> diff --git a/target/m68k/fpu_helper.c b/target/m68k/fpu_helper.c
>> index 50b0e36cbe..0c9c3b7b64 100644
>> --- a/target/m68k/fpu_helper.c
>> +++ b/target/m68k/fpu_helper.c
>> @@ -750,6 +750,29 @@ void HELPER(fcosh)(CPUM68KState *env, FPReg *res, FPReg *val)
>> res->d = floatx80_cosh(val->d, &env->fp_status);
>> }
>> +/* 10**0 through 10**18 */
>> +static const int64_t i64_pow10[] = {
>> + 1ll,
>> + 10ll,
>> + 100ll,
>> + 1000ll,
>> + 10000ll,
>> + 100000ll,
>> + 1000000ll,
>> + 10000000ll,
>> + 100000000ll,
>> + 1000000000ll,
>> + 10000000000ll,
>> + 100000000000ll,
>> + 1000000000000ll,
>> + 10000000000000ll,
>> + 100000000000000ll,
>> + 1000000000000000ll,
>> + 10000000000000000ll,
>> + 100000000000000000ll,
>> + 1000000000000000000ll,
>
> 10**18 is never used, is that expected?
A previous version did.
> Could we define KFACTOR_MAX = 17 and use it as
> array size?
Seems reasonable.
>> @@ -119,6 +119,8 @@ typedef struct DisasContext {
>> int done_mac;
>> int writeback_mask;
>> TCGv writeback[8];
>> + uint16_t insn;
>> + uint16_t ext;
>
> Maybe worth commenting here what this field is used for?
Ok.
r~
next prev parent reply other threads:[~2024-08-16 8:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-12 0:44 [PATCH for-9.2 v2 0/4] target/m68k: Implement fmove.p Richard Henderson
2024-08-12 0:44 ` [PATCH v2 1/4] target/m68k: Introduce M68K_FEATURE_FPU_PACKED_DECIMAL Richard Henderson
2024-08-12 5:55 ` Philippe Mathieu-Daudé
2024-08-12 0:44 ` [PATCH v2 2/4] target/m68k: Implement packed decimal real loads Richard Henderson
2024-08-12 5:54 ` Philippe Mathieu-Daudé
2024-08-12 0:44 ` [PATCH v2 3/4] target/m68k: Implement packed decimal real stores Richard Henderson
2024-08-16 6:37 ` Philippe Mathieu-Daudé
2024-08-16 8:08 ` Richard Henderson [this message]
2024-08-12 0:44 ` [PATCH v2 4/4] tests/tcg/m68k: Add packed decimal tests Richard Henderson
2024-08-12 6:01 ` Philippe Mathieu-Daudé
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=a04f056e-4903-4001-879c-6cd4329701f3@linaro.org \
--to=richard.henderson@linaro.org \
--cc=laurent@vivier.eu \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=philmd@linaro.org \
--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).