From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: laurent@vivier.eu, "Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [PATCH v4 24/24] target/m68k: Implement FPIAR
Date: Wed, 5 Mar 2025 01:55:46 +0100 [thread overview]
Message-ID: <d4f22c7c-66cd-4dc3-b024-7f6e9626b72e@linaro.org> (raw)
In-Reply-To: <34beaac3-405b-47bb-b12a-91a0dd3e9f5b@linaro.org>
On 3/3/25 21:40, Richard Henderson wrote:
> On 3/3/25 10:39, Philippe Mathieu-Daudé wrote:
>> Hi Richard,
>>
>> On 24/2/25 18:14, Richard Henderson wrote:
>>> So far, this is only read-as-written.
>>>
>>> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2497
>>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>>> ---
>>> target/m68k/cpu.h | 1 +
>>> target/m68k/cpu.c | 23 ++++++++++++++++++++++-
>>> target/m68k/helper.c | 14 ++++++++------
>>> target/m68k/translate.c | 3 ++-
>>> 4 files changed, 33 insertions(+), 8 deletions(-)
>>
>>
>>> diff --git a/target/m68k/helper.c b/target/m68k/helper.c
>>> index 6e3bb96762..bc787cbf05 100644
>>> --- a/target/m68k/helper.c
>>> +++ b/target/m68k/helper.c
>>> @@ -45,8 +45,8 @@ static int cf_fpu_gdb_get_reg(CPUState *cs,
>>> GByteArray *mem_buf, int n)
>>> return gdb_get_reg32(mem_buf, env->fpcr);
>>> case 9: /* fpstatus */
>>> return gdb_get_reg32(mem_buf, env->fpsr);
>>> - case 10: /* fpiar, not implemented */
>>> - return gdb_get_reg32(mem_buf, 0);
>>> + case 10: /* fpiar */
>>> + return gdb_get_reg32(mem_buf, env->fpiar);
>>> }
>>> return 0;
>>> }
>>> @@ -69,7 +69,8 @@ static int cf_fpu_gdb_set_reg(CPUState *cs, uint8_t
>>> *mem_buf, int n)
>>> case 9: /* fpstatus */
>>> env->fpsr = ldl_be_p(mem_buf);
>>> return 4;
>>> - case 10: /* fpiar, not implemented */
>>> + case 10: /* fpiar */
>>> + env->fpiar = ldl_p(mem_buf);
>>
>> Should we consider target endianness?
>
> I am. Are you suggesting that the TARGET_BIG_ENDIAN shorthand be
> eliminated entirely, even from target-specific code?
As we figured earlier, while ldl_p() is expanded as ldl_be_p() for
m68k, it is easier to review using the expanded form, as done
previously in this file in commit 3a76d302047:
commit 3a76d302047ce4518cedef7a9feca1238a00f97b
Author: Philippe Mathieu-Daudé <philmd@linaro.org>
Date: Fri Oct 4 13:30:34 2024 -0300
target/m68k: Use explicit big-endian LD/ST API
The M68K architecture uses big endianness. Directly use
the big-endian LD/ST API.
So using ldl_be_p():
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Regards,
Phil.
prev parent reply other threads:[~2025-03-05 0:56 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-24 17:14 [PATCH v4 00/24] target/m68k: fpu improvements Richard Henderson
2025-02-24 17:14 ` [PATCH v4 01/24] target/m68k: Add FPSR exception bit defines Richard Henderson
2025-03-03 18:34 ` Philippe Mathieu-Daudé
2025-02-24 17:14 ` [PATCH v4 02/24] target/m68k: Restore fp rounding mode on vm load Richard Henderson
2025-02-24 17:14 ` [PATCH v4 03/24] target/m68k: Keep FPSR up-to-date Richard Henderson
2025-02-24 17:14 ` [PATCH v4 04/24] target/m68k: Update FPSR.EXC Richard Henderson
2025-03-03 18:34 ` Philippe Mathieu-Daudé
2025-02-24 17:14 ` [PATCH v4 05/24] target/m68k: Update FPSR for FMOVECR Richard Henderson
2025-02-24 17:14 ` [PATCH v4 06/24] target/m68k: Introduce M68K_FEATURE_FPU_PACKED_DECIMAL Richard Henderson
2025-02-24 17:14 ` [PATCH v4 07/24] target/m68k: Merge gen_ea into SRC_EA and DEST_EA Richard Henderson
2025-02-24 17:14 ` [PATCH v4 08/24] target/m68k: Use g_assert_not_reached in gen_lea_mode and gen_ea_mode Richard Henderson
2025-02-24 17:14 ` [PATCH v4 09/24] target/m68k: Use OS_UNSIZED in LEA, PEA, JMP Richard Henderson
2025-02-24 17:14 ` [PATCH v4 10/24] target/m68k: Move pre-dec/post-inc to gen_lea_mode Richard Henderson
2025-02-24 17:14 ` [PATCH v4 11/24] target/m68k: Split gen_ea_mode for load/store Richard Henderson
2025-02-24 17:14 ` [PATCH v4 12/24] target/m68k: Remove env argument to gen_lea_indexed Richard Henderson
2025-02-24 17:14 ` [PATCH v4 13/24] target/m68k: Remove env argument to gen_lea_mode Richard Henderson
2025-02-24 17:14 ` [PATCH v4 14/24] target/m68k: Remove env argument to gen_load_mode Richard Henderson
2025-02-24 17:14 ` [PATCH v4 15/24] target/m68k: Remove env argument to gen_store_mode Richard Henderson
2025-02-24 17:14 ` [PATCH v4 16/24] target/m68k: Remove env argument to gen_ea_mode_fp Richard Henderson
2025-02-24 17:14 ` [PATCH v4 17/24] target/m68k: Split gen_ea_mode_fp for load/store Richard Henderson
2025-02-24 17:14 ` [PATCH v4 18/24] target/m68k: Move gen_addr_fault into gen_{load, store}_mode_fp Richard Henderson
2025-02-24 17:14 ` [PATCH v4 19/24] target/m68k: Merge gen_load_fp, gen_load_mode_fp Richard Henderson
2025-02-24 17:14 ` [PATCH v4 20/24] target/m68k: Merge gen_store_fp, gen_store_mode_fp Richard Henderson
2025-02-24 17:14 ` [PATCH v4 21/24] target/m68k: Implement packed decimal real loads and stores Richard Henderson
2025-02-24 17:14 ` [PATCH v4 22/24] tests/tcg/m68k: Add packed decimal tests Richard Henderson
2025-02-24 17:14 ` [PATCH v4 23/24] target/m68k: Make vmstate variables static Richard Henderson
2025-02-24 17:14 ` [PATCH v4 24/24] target/m68k: Implement FPIAR Richard Henderson
2025-03-03 18:39 ` Philippe Mathieu-Daudé
2025-03-03 20:40 ` Richard Henderson
2025-03-05 0:55 ` Philippe Mathieu-Daudé [this message]
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=d4f22c7c-66cd-4dc3-b024-7f6e9626b72e@linaro.org \
--to=philmd@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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).