From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: Pierrick Bouvier <pierrick.bouvier@linaro.org>,
Anton Johansson <anjo@rev.ng>, Helge Deller <deller@gmx.de>
Subject: Re: [PATCH 9/9] target/hppa: Replace MO_TE -> MO_BE
Date: Wed, 15 Oct 2025 19:09:08 +0200 [thread overview]
Message-ID: <155aadcd-5044-443c-a647-02c5e3d92ad6@linaro.org> (raw)
In-Reply-To: <2079231a-e7e9-4b1f-80a6-b60e2431c8e1@linaro.org>
On 9/10/25 19:04, Richard Henderson wrote:
> On 10/9/25 03:10, Philippe Mathieu-Daudé wrote:
>> We only build the PA-RISC targets using big endianness order:
>>
>> $ git grep TARGET_BIG_ENDIAN configs/targets/hppa-*
>> configs/targets/hppa-linux-user.mak:5:TARGET_BIG_ENDIAN=y
>> configs/targets/hppa-softmmu.mak:2:TARGET_BIG_ENDIAN=y
>>
>> Therefore the MO_TE definition always expands to MO_BE. Use the
>> latter to simplify.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>> target/hppa/translate.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/target/hppa/translate.c b/target/hppa/translate.c
>> index 6fec63cb433..c9009441ad0 100644
>> --- a/target/hppa/translate.c
>> +++ b/target/hppa/translate.c
>> @@ -106,7 +106,7 @@ typedef struct DisasContext {
>> static inline MemOp mo_endian(DisasContext *ctx)
>> {
>> - return MO_TE;
>> + return MO_BE;
>> }
>> /* Note that ssm/rsm instructions number PSW_W and PSW_E
>> differently. */
>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>
> Indeed. Like ppc64, hppa always defaults to big-endian and has a PSW
> bit to enable little-endian. (Which we don't implement, and quite
> possibly was never implemented in any hardware.)
Indeed, per parisc2.0.pdf:
PSW_E
Little endian memory access enable. When 0, all memory references
are big endian. When 1, all memory references are little endian.
Implementation of this bit is optional. If it is not implemented,
all memory references are big endian and this bit is a reserved bit.
I'll squash:
/* The PSW_E bit sets the (little) endianness, but we don't
implement it. */
Thanks,
Phil.
next prev parent reply other threads:[~2025-10-15 17:11 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-09 10:10 [PATCH 0/9] target/hppa: Remove use of MO_TE definition Philippe Mathieu-Daudé
2025-10-09 10:10 ` [PATCH 1/9] target/hppa: Use hwaddr type for HPPATLBEntry::pa Philippe Mathieu-Daudé
2025-10-09 16:54 ` Richard Henderson
2025-10-09 10:10 ` [PATCH 2/9] target/hppa: Have hppa_form_gva*() return vaddr type Philippe Mathieu-Daudé
2025-10-09 16:57 ` Richard Henderson
2025-10-09 10:10 ` [PATCH 3/9] target/hppa: Explode MO_TExx -> MO_TE | MO_xx Philippe Mathieu-Daudé
2025-10-09 16:58 ` Richard Henderson
2025-10-09 10:10 ` [PATCH 4/9] target/hppa: Conceal MO_TE within do_load() Philippe Mathieu-Daudé
2025-10-09 16:58 ` Richard Henderson
2025-10-09 10:10 ` [PATCH 5/9] target/hppa: Conceal MO_TE within do_load_32/64() Philippe Mathieu-Daudé
2025-10-09 16:59 ` Richard Henderson
2025-10-09 10:10 ` [PATCH 6/9] target/hppa: Conceal MO_TE within do_store() Philippe Mathieu-Daudé
2025-10-09 16:59 ` Richard Henderson
2025-10-09 10:10 ` [PATCH 7/9] target/hppa: Conceal MO_TE within do_store_32/64() Philippe Mathieu-Daudé
2025-10-09 16:59 ` Richard Henderson
2025-10-09 10:10 ` [PATCH 8/9] target/hppa: Introduce mo_endian() helper Philippe Mathieu-Daudé
2025-10-09 17:01 ` Richard Henderson
2025-10-09 10:10 ` [PATCH 9/9] target/hppa: Replace MO_TE -> MO_BE Philippe Mathieu-Daudé
2025-10-09 17:04 ` Richard Henderson
2025-10-15 17:09 ` Philippe Mathieu-Daudé [this message]
2025-10-15 17:09 ` [PATCH 0/9] target/hppa: Remove use of MO_TE definition 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=155aadcd-5044-443c-a647-02c5e3d92ad6@linaro.org \
--to=philmd@linaro.org \
--cc=anjo@rev.ng \
--cc=deller@gmx.de \
--cc=pierrick.bouvier@linaro.org \
--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).