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~
