qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [EXTERNAL]Re: Proposal for amending TCG interface namin


From: BALATON Zoltan
Subject: Re: [Qemu-devel] [EXTERNAL]Re: Proposal for amending TCG interface naming scheme
Date: Tue, 20 Aug 2019 18:21:05 +0200 (CEST)
User-agent: Alpine 2.03 (LMD 1266 2009-07-14)

Hello,

Sorry to comment on this without really knowing what is it about but maybe my view is not completely useless if this is to be understood by people who don't know anything about it. If it is not useful just ignore.

On Tue, 20 Aug 2019, Richard Henderson wrote:
Would it be clearer to use the x86 instruction name: SHRD (SHift Right 
Doubleword)?

Not unless you name it shr32 or something like that. SHRD does not look meaningful without knowing the instruction and elsewhere you use bit numbers instead of b, w, d letters. (I don't know if shr32 is actually a good name for this op, just commenting on the naming itself.)

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

Again this might look familiar to those knowing AArch64 but not to someone who does not know that. Maybe zext sext is a bit more decypherable.

In general I think it would be best to name these to describe what they do not necessarily following any other ISA naming because that's only useful for those who know those particular instructions so maybe it should be consistent within TCG and does not have to match what CPUs call it.

Regards,
BALATON Zoltan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]