On 4/11/19 12:08 AM, David Hildenbrand wrote:
> +static DisasJumpType op_vaccc(DisasContext *s, DisasOps *o)
> +{
> + if (get_field(s->fields, m5) != ES_128) {
> + gen_program_exception(s, PGM_SPECIFICATION);
> + return DISAS_NORETURN;
> + }
> +
> + gen_gvec_4_ool(get_field(s->fields, v1), get_field(s->fields, v2),
> + get_field(s->fields, v3), get_field(s->fields, v4), 0,
> + gen_helper_gvec_vaccc128);
> + return DISAS_NEXT;
> +}
An inline expansion could be
One possible expansion is
tcg_gen_andi_i64(tl, cl, 1);
tcg_gen_add2_i64(tl, th, tl, zero, al, zero);
tcg_gen_add2_i64(tl, th, tl, th, bl, zero);
tcg_gen_add2_i64(tl, th, th, zero, ah, zero);
tcg_gen_add2_i64(tl, th, tl, th, bl, zero);
/* carry out in th */
This is 8 insns for the addition vs the hw optimal 6, but we're not exactly an
optimizing compiler either. ;-)
r~