[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 12/38] tcg: Add gvec expanders for variable shif
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 12/38] tcg: Add gvec expanders for variable shift |
Date: |
Tue, 23 Apr 2019 12:28:11 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
On 4/23/19 12:04 PM, David Hildenbrand wrote:
> In order to use this on s390x for VECTOR ELEMENT SHIFT, like
>
> +static DisasJumpType op_vesv(DisasContext *s, DisasOps *o)
> +{
> + const uint8_t es = get_field(s->fields, m4);
> + const uint8_t v1 = get_field(s->fields, v1);
> + const uint8_t v2 = get_field(s->fields, v2);
> + const uint8_t v3 = get_field(s->fields, v3);
> +
> + if (es > ES_64) {
> + gen_program_exception(s, PGM_SPECIFICATION);
> + return DISAS_NORETURN;
> + }
> +
> + switch (s->fields->op2) {
> + case 0x70:
> + gen_gvec_fn_3(shlv, es, v1, v2, v3);
> + break;
> + case 0x7a:
> + gen_gvec_fn_3(sarv, es, v1, v2, v3);
> + break;
> + case 0x78:
> + gen_gvec_fn_3(shrv, es, v1, v2, v3);
> + break;
> + default:
> + g_assert_not_reached();
> + }
> +
> + return DISAS_NEXT;
> +}
>
> We need to mask of invalid bits from the shift. Can that be added?
Yes, I do exactly this in patch 31 for target/ppc.
r~
- [Qemu-devel] [PATCH 05/38] tcg: Allow add_vec, sub_vec, neg_vec, not_vec to be expanded, (continued)
- [Qemu-devel] [PATCH 05/38] tcg: Allow add_vec, sub_vec, neg_vec, not_vec to be expanded, Richard Henderson, 2019/04/20
- [Qemu-devel] [PATCH 06/38] tcg: Promote tcg_out_{dup, dupi}_vec to backend interface, Richard Henderson, 2019/04/20
- [Qemu-devel] [PATCH 08/38] tcg: Add tcg_out_dupm_vec to the backend interface, Richard Henderson, 2019/04/20
- [Qemu-devel] [PATCH 10/38] tcg/aarch64: Implement tcg_out_dupm_vec, Richard Henderson, 2019/04/20
- [Qemu-devel] [PATCH 07/38] tcg: Manually expand INDEX_op_dup_vec, Richard Henderson, 2019/04/20
- [Qemu-devel] [PATCH 09/38] tcg/i386: Implement tcg_out_dupm_vec, Richard Henderson, 2019/04/20
- [Qemu-devel] [PATCH 11/38] tcg: Add INDEX_op_dup_mem_vec, Richard Henderson, 2019/04/20
- [Qemu-devel] [PATCH 12/38] tcg: Add gvec expanders for variable shift, Richard Henderson, 2019/04/20
[Qemu-devel] [PATCH 13/38] tcg/i386: Support vector variable shift opcodes, Richard Henderson, 2019/04/20
[Qemu-devel] [PATCH 14/38] tcg/aarch64: Support vector variable shift opcodes, Richard Henderson, 2019/04/20
[Qemu-devel] [PATCH 15/38] tcg: Implement tcg_gen_gvec_3i(), Richard Henderson, 2019/04/20
[Qemu-devel] [PATCH 17/38] tcg: Add gvec expanders for vector shift by scalar, Richard Henderson, 2019/04/20