From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: "Jiaxun Yang" <jiaxun.yang@flygoat.com>,
"Aurelien Jarno" <aurelien@aurel32.net>,
"Aleksandar Rikalo" <aleksandar.rikalo@syrmia.com>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: Re: [PATCH v2 7/7] target/mips: Convert Loongson [D]MULT[U].G opcodes to decodetree
Date: Sat, 26 Oct 2024 12:30:13 -0300 [thread overview]
Message-ID: <5c894c2c-0b63-4b18-8c6c-07e65e703cae@linaro.org> (raw)
In-Reply-To: <47fa4915-4bc9-665a-5679-4dafc03a5c62@linaro.org>
On 31/8/23 21:29, Richard Henderson wrote:
> On 8/31/23 13:30, Philippe Mathieu-Daudé wrote:
>> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>
>> Convert the following opcodes to decodetree:
>>
>> - MULT.G - multiply 32-bit signed integers
>> - MULTU.G - multiply 32-bit unsigned integers
>> - DMULT.G - multiply 64-bit signed integers
>> - DMULTU.G - multiply 64-bit unsigned integers
>>
>> Now that all opcodes from the extension have been converted, we
>> can remove completely gen_loongson_integer() and its 2 calls in
>> decode_opc_special2_legacy() and decode_opc_special3_legacy().
>>
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>
>
>> + if (is_double) {
>> + if (TARGET_LONG_BITS != 64) {
>> + return false;
>> + }
>> + check_mips_64(s);
>> + }
>
> This preserves existing behaviour vs
>
>> -#if defined(TARGET_MIPS64)
>> - case OPC_DMULT_G_2E:
>> - case OPC_DMULT_G_2F:
>> - tcg_gen_mul_tl(cpu_gpr[rd], t0, t1);
>> - break;
>> - case OPC_DMULTU_G_2E:
>> - case OPC_DMULTU_G_2F:
>> - tcg_gen_mul_tl(cpu_gpr[rd], t0, t1);
>> - break;
>> -#endif
>
> this ifdef. But it doesn't seem quite right.
>
> It's a behaviour change between qemu-system-mips and qemu-system-mips64
> for the same cpu. Returning false allows another insn to match instead.
> But we have identified the insn, it just isn't legal.
Indeed.
> Anyway, aren't all of these loongson cpus 64-bit?
The Loongson-1 cores family is 32-bit but AFAICT it doesn't implement
the Loongson Extension, which appeared with the Loongson-2 family,
which is 64-bit. QEMU only implement the Loongson-2/3 families, both
64-bit.
I'll post a cleanup patch on top, since this series is already fully
reviewed.
Thanks!
Phil.
prev parent reply other threads:[~2024-10-26 15:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-31 20:30 [PATCH v2 0/7] target/mips: Convert Loongson LEXT opcodes to decodetree Philippe Mathieu-Daudé
2023-08-31 20:30 ` [PATCH v2 1/7] target/mips: Simplify Loongson MULTU.G opcode Philippe Mathieu-Daudé
2023-08-31 23:53 ` Richard Henderson
2023-08-31 20:30 ` [PATCH v2 2/7] target/mips: Re-introduce OPC_ADDUH_QB_DSP and OPC_MUL_PH_DSP Philippe Mathieu-Daudé
2023-08-31 20:30 ` [PATCH v2 3/7] target/mips: Convert Loongson DDIV.G opcodes to decodetree Philippe Mathieu-Daudé
2023-08-31 20:30 ` [PATCH v2 4/7] target/mips: Convert Loongson DIV.G " Philippe Mathieu-Daudé
2023-08-31 20:30 ` [PATCH v2 5/7] target/mips: Convert Loongson [D]DIVU.G " Philippe Mathieu-Daudé
2023-08-31 20:30 ` [PATCH v2 6/7] target/mips: Convert Loongson [D]MOD[U].G " Philippe Mathieu-Daudé
2023-08-31 20:30 ` [PATCH v2 7/7] target/mips: Convert Loongson [D]MULT[U].G " Philippe Mathieu-Daudé
2023-09-01 0:29 ` Richard Henderson
2024-10-26 15:30 ` 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=5c894c2c-0b63-4b18-8c6c-07e65e703cae@linaro.org \
--to=philmd@linaro.org \
--cc=aleksandar.rikalo@syrmia.com \
--cc=aurelien@aurel32.net \
--cc=f4bug@amsat.org \
--cc=jiaxun.yang@flygoat.com \
--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).