qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 11/20] tcg/i386: Implement avx512 immediate rotate


From: Richard Henderson
Subject: Re: [PATCH 11/20] tcg/i386: Implement avx512 immediate rotate
Date: Thu, 3 Feb 2022 12:26:32 +1100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

On 2/3/22 01:05, Alex Bennée wrote:
Is there any reason why gen_shift couldn't be pushed into a helper
function so we just had:

     static void tcg_out_vec_shift(s, vece, insn, sub, a0, a1, a2) {
         tcg_debug_assert(vece != MO_8);
         if (type == TCG_TYPE_V256) {
             insn |= P_VEXL;
         }
         tcg_out_vex_modrm(s, insn, sub, a0, a1);
         tcg_out8(s, a2);
     }

     ...

     case INDEX_op_rotli_vec:
         insn = OPC_PSHIFTD_Ib | P_EVEX;  /* VPROL[DQ] */
         if (vece == MO_64) {
             insn |= P_VEXW;
         }
         tcg_out_vec_shift(s, vece, insn, 1, a0, a1, a2);
         break;

Surely the compiler would inline if needed (and even if it didn't it the
code generation that critical we care about a few cycles)?

Yes, I suppose I could pull out a helper or two.
Just one of those things where something used to be cleaner, and then the code 
grew.

r~




reply via email to

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