[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [Qemu-devel] [PATCH v1 31/41] s390x/tcg: Implement VECT
From: |
Richard Henderson |
Subject: |
Re: [qemu-s390x] [Qemu-devel] [PATCH v1 31/41] s390x/tcg: Implement VECTOR SHIFT LEFT DOUBLE BY BYTE |
Date: |
Fri, 12 Apr 2019 14:54:57 -1000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
On 4/11/19 12:08 AM, David Hildenbrand wrote:
> +static DisasJumpType op_vsldb(DisasContext *s, DisasOps *o)
> +{
> + int src_idx = get_field(s->fields, i4) & 0xf;
> +
> + if (src_idx == 0) {
> + gen_gvec_mov(get_field(s->fields, v1), get_field(s->fields, v2));
> + } else {
> + gen_gvec_3_ool(get_field(s->fields, v1), get_field(s->fields, v2),
> + get_field(s->fields, v3), src_idx,
> + gen_helper_gvec_vsldb);
> + return DISAS_NEXT;
You could also expand this inline using your new extract2 primitive.
int i4 = get_field(s->fields, i4);
int left_shift, right_shift;
left_shift = (i4 & 7) * 8;
right_shift = 64 - left_shift;
if ((i4 & 8) == 0) {
read_vec_element_i64(t0, get_field(s->fields, v2), 0, ES_64);
read_vec_element_i64(t1, get_field(s->fields, v2), 1, ES_64);
read_vec_element_i64(t2, get_field(s->fields, v3), 0, ES_64);
} else {
read_vec_element_i64(t0, get_field(s->fields, v2), 1, ES_64);
read_vec_element_i64(t1, get_field(s->fields, v3), 0, ES_64);
read_vec_element_i64(t2, get_field(s->fields, v3), 1, ES_64);
}
tcg_gen_extract2_i64(t0, t1, t0, right_shift);
tcg_gen_extract2_i64(t1, t2, t1, right_shift);
write_vec_element_i64(t0, get_field(s->fields, v1), 0, ES_64);
write_vec_element_i64(t1, get_field(s->fields, v1), 1, ES_64);
r~
- Re: [qemu-s390x] [Qemu-devel] [PATCH v1 36/41] s390x/tcg: Implement VECTOR SUBTRACT WITH BORROW INDICATION, (continued)
- [qemu-s390x] [PATCH v1 35/41] s390x/tcg: Implement VECTOR SUBTRACT COMPUTE BORROW INDICATION, David Hildenbrand, 2019/04/11
- [qemu-s390x] [PATCH v1 34/41] s390x/tcg: Implement VECTOR SUBTRACT, David Hildenbrand, 2019/04/11
- [qemu-s390x] [PATCH v1 33/41] s390x/tcg: Implement VECTOR SHIFT RIGHT LOGICAL *, David Hildenbrand, 2019/04/11
- [qemu-s390x] [PATCH v1 32/41] s390x/tcg: Implement VECTOR SHIFT RIGHT ARITHMETIC, David Hildenbrand, 2019/04/11
- [qemu-s390x] [PATCH v1 31/41] s390x/tcg: Implement VECTOR SHIFT LEFT DOUBLE BY BYTE, David Hildenbrand, 2019/04/11
- Re: [qemu-s390x] [Qemu-devel] [PATCH v1 31/41] s390x/tcg: Implement VECTOR SHIFT LEFT DOUBLE BY BYTE,
Richard Henderson <=
- [qemu-s390x] [PATCH v1 30/41] s390x/tcg: Implement VECTOR SHIFT LEFT (BY BYTE), David Hildenbrand, 2019/04/11
- [qemu-s390x] [PATCH v1 29/41] s390x/tcg: Implement VECTOR ELEMENT SHIFT, David Hildenbrand, 2019/04/11
- [qemu-s390x] [PATCH v1 28/41] s390x/tcg: Implement VECTOR ELEMENT ROTATE AND INSERT UNDER MASK, David Hildenbrand, 2019/04/11
- [qemu-s390x] [PATCH v1 26/41] s390x/tcg: Implement VECTOR POPULATION COUNT, David Hildenbrand, 2019/04/11