From: Huang Tao <eric.huang@linux.alibaba.com>
To: Richard Henderson <richard.henderson@linaro.org>,
Daniel Henrique Barboza <dbarboza@ventanamicro.com>,
qemu-devel@nongnu.org
Cc: qemu-riscv@nongnu.org, zhiwei_liu@linux.alibaba.com,
liwei1518@gmail.com, bin.meng@windriver.com,
alistair.francis@wdc.com, palmer@dabbelt.com
Subject: Re: [PATCH 2/4] target/riscv: Add right functions to set agnostic elements
Date: Wed, 20 Mar 2024 10:41:26 +0800 [thread overview]
Message-ID: <c7487e4c-2d9a-42db-b920-30f1463e8a34@linux.alibaba.com> (raw)
In-Reply-To: <675f13e6-4030-4099-a97b-f5bd38d030e9@linaro.org>
I will rewrite the patch, and send a new version soon.
Thanks,
Huang Tao
On 2024/3/20 07:32, Richard Henderson wrote:
> On 3/19/24 11:57, Daniel Henrique Barboza wrote:
>> This seems correct but a bit over complicated at first glance. I
>> wonder if we have
>> something simpler already done somewhere.
>>
>> Richard, does ARM (or any other arch) do anything of the sort? Aside
>> from more trivial
>> byte swaps using bswap64() I didn't find anything similar.
>
> No, nothing quite like.
>
>> We recently posted a big endian related fix here:
>>
>> [PATCH for 9.0 v15 03/10] target/riscv/vector_helper.c: fix 'vmvr_v'
>> memcpy endianess
>>
>> But not sure how to apply it here.
>
> It's almost exactly the same, only with memset instead of memcpy.
>
> if (HOST_BIG_ENDIAN && idx % 8 != 0) {
> uint32_t j = ROUND_UP(idx, 8);
> memset(vd + H(j - 1), -1, j - idx);
> idx = j;
> }
> memset(vd + idx, -1, tot - idx);
>
>
> I'll note that you don't need to change the api of vext_set_elems_1s
> -- so most of these patches are not required.
>
>
> r~
next prev parent reply other threads:[~2024-03-20 2:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 9:20 [PATCH 0/4] target/riscv: Fix the element agnostic function problem Huang Tao
2024-03-06 9:20 ` [PATCH 1/4] target/riscv: Rename vext_set_elems_1s function Huang Tao
2024-03-19 21:37 ` Daniel Henrique Barboza
2024-03-06 9:20 ` [PATCH 2/4] target/riscv: Add right functions to set agnostic elements Huang Tao
2024-03-19 21:57 ` Daniel Henrique Barboza
2024-03-19 23:32 ` Richard Henderson
2024-03-20 2:41 ` Huang Tao [this message]
2024-03-06 9:20 ` [PATCH 3/4] target/riscv: Replace element agnostic for vector instructions Huang Tao
2024-03-06 9:20 ` [PATCH 4/4] target/riscv: Delete the former element agnostic function Huang Tao
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=c7487e4c-2d9a-42db-b920-30f1463e8a34@linux.alibaba.com \
--to=eric.huang@linux.alibaba.com \
--cc=alistair.francis@wdc.com \
--cc=bin.meng@windriver.com \
--cc=dbarboza@ventanamicro.com \
--cc=liwei1518@gmail.com \
--cc=palmer@dabbelt.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=zhiwei_liu@linux.alibaba.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).