From: Richard Henderson <richard.henderson@linaro.org>
To: Aleksandar Markovic <amarkovic@wavecomp.com>,
Peter Maydell <peter.maydell@linaro.org>
Cc: Cornelia Huck <cohuck@redhat.com>,
Eduardo Habkost <ehabkost@redhat.com>,
Sagar Karandikar <sagark@eecs.berkeley.edu>,
David Hildenbrand <david@redhat.com>,
Bastian Koppelmann <kbastian@mail.uni-paderborn.de>,
Palmer Dabbelt <palmer@sifive.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Laurent Vivier <laurent@vivier.eu>,
Max Filippov <jcmvbkbc@gmail.com>,
Alistair Francis <alistair.francis@wdc.com>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
Paolo Bonzini <pbonzini@redhat.com>, Stefan Weil <sw@weilnetz.de>,
"aurelien@aurel32.net" <aurelien@aurel32.net>,
David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [EXTERNAL]Re: Proposal for amending TCG interface naming scheme
Date: Tue, 20 Aug 2019 08:37:18 -0700 [thread overview]
Message-ID: <1fc18db5-abd4-80be-11ee-209dfd4a55f4@linaro.org> (raw)
In-Reply-To: <BN6PR2201MB1251C78A16D557867586FFD4C6AB0@BN6PR2201MB1251.namprd22.prod.outlook.com>
On 8/20/19 6:49 AM, Aleksandar Markovic wrote:
>> From: Peter Maydell <peter.maydell@linaro.org>
>> On Tue, 20 Aug 2019 at 13:50, Aleksandar Markovic
>> <amarkovic@wavecomp.com> wrote:
>>> The idea is to provide significant "lexicographic" distance between those > groups of functions, rather than having the similar name (wiht common root > "ext) for all of them.
>>
>> The current naming of the extract/sextract TCG ops is intended to keep
>> them in line with the extract32/sextract32/extract64/sextract64 utility
>> functions in bitops.h. I think those ones are reasonably named. The
>> other ops are a bit more ad-hoc in naming, admittedly...
>>
>
> How about
>
> tcg_gen_extract2_i32
> tcg_gen_extract2_i64
> tcg_gen_extract2_tl
> tcg_gen_extrl_i64_i32
> tcg_gen_extrh_i64_i32
> tcg_gen_ext_i32_i64
> tcg_gen_extu_i32_i64
>
> to
>
> tcg_gen_gather_i32
> tcg_gen_gather_i64
> tcg_gen_gather_tl
I'm not sure how "gather" applies. To me this sounds like a vector
scatter/gather operation, where N different addresses are used to load the N
elements of the vector.
When extract2 was named, I was only thinking "extract" because of how the
AArch64 instruction that implements this operation is named (EXTR), and "extr"
itself was already taken. We did ask for naming suggestions at the time, but
no better ideas were floated...
Would it be clearer to use the x86 instruction name: SHRD (SHift Right Doubleword)?
> tcg_gen_pick_l_i64_i32
> tcg_gen_pick_h_i64_i32
Hmm, "pick" doesn't mean anything to me. Which makes it better than "gather",
but only just.
We do have a couple of related operations: tcg_gen_trunc_i64_tl and
tcg_gen_trunc_tl_i32. It's easy to see tcg_gen_extrl_i64_i32 as "truncate",
because that's what it does. But it's harder to see tcg_gen_extrh_i64_i32 as
"truncate high". Is tcg_gen_shr32_trunc_i64_i32 too unwieldy?
Or perhaps we could leave these alone. Changing the others gives us the
desired (or at least increased) lexicographic distance.
> tcg_gen_extend_s_i32_i64
> tcg_gen_extend_0_i32_i64
These should not drift too far from the other extension names,
tcg_gen_ext{8,16}{u,s}_i32
tcg_gen_ext{8,16,32}{u,s}_i64
What if we use the AArch64 mnemonics: zxt (zero-extend) and sxt (sign-extend)?
This would give us
tcg_gen_zxt8_i32
tcg_gen_sxt8_i32
(etc)
tcg_gen_zxt_i32_i64
tcg_gen_sxt_i32_i64
r~
next prev parent reply other threads:[~2019-08-20 15:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-20 12:49 [Qemu-devel] Proposal for amending TCG interface naming scheme Aleksandar Markovic
2019-08-20 13:21 ` Peter Maydell
2019-08-20 13:49 ` [Qemu-devel] [EXTERNAL]Re: " Aleksandar Markovic
2019-08-20 15:37 ` Richard Henderson [this message]
2019-08-20 16:15 ` Aleksandar Markovic
2019-08-20 16:47 ` Richard Henderson
2019-08-20 16:21 ` BALATON Zoltan
2019-08-20 16:38 ` Aleksandar Markovic
2019-08-20 16:44 ` David Hildenbrand
2019-08-20 16:47 ` Peter Maydell
2019-08-20 17:57 ` Aleksandar Markovic
2019-08-20 16:48 ` Laurent Vivier
2019-08-20 16:52 ` Aleksandar Markovic
2019-08-20 17:02 ` Aleksandar Markovic
2019-08-20 18:08 ` David Hildenbrand
2019-08-21 16:29 ` Philippe Mathieu-Daudé
2019-08-20 16:46 ` David Hildenbrand
2019-08-21 16:15 ` Philippe Mathieu-Daudé
2019-09-09 9:10 ` Aleksandar Markovic
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=1fc18db5-abd4-80be-11ee-209dfd4a55f4@linaro.org \
--to=richard.henderson@linaro.org \
--cc=alistair.francis@wdc.com \
--cc=amarkovic@wavecomp.com \
--cc=aurelien@aurel32.net \
--cc=cohuck@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=david@redhat.com \
--cc=edgar.iglesias@gmail.com \
--cc=ehabkost@redhat.com \
--cc=jcmvbkbc@gmail.com \
--cc=kbastian@mail.uni-paderborn.de \
--cc=laurent@vivier.eu \
--cc=palmer@sifive.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=sagark@eecs.berkeley.edu \
--cc=sw@weilnetz.de \
/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).