[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [Qemu-devel] [PATCH v2 13/32] s390x/tcg: Implement VECT
From: |
David Hildenbrand |
Subject: |
Re: [qemu-s390x] [Qemu-devel] [PATCH v2 13/32] s390x/tcg: Implement VECTOR LOAD MULTIPLE |
Date: |
Fri, 1 Mar 2019 17:33:53 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
On 01.03.19 17:26, Richard Henderson wrote:
> On 3/1/19 3:53 AM, David Hildenbrand wrote:
>> + /*
>> + * Check for possible access exceptions by trying to load the last
>> + * element. The first element will be checked first next.
>> + */
>> + t = tcg_temp_new_i64();
>> + gen_addi_and_wrap_i64(s, t, o->addr1, (v3 - v1) * 16 + 8);
>> + tcg_gen_qemu_ld_i64(t, t, get_mem_index(s), MO_TEQ);
>
> qemu_ld expands to enough code that it is a shame to discard this value and
> reload it during this loop. Perhaps load this to t2...
>
>> +
>> + for (;; v1++) {
>> + tcg_gen_qemu_ld_i64(t, o->addr1, get_mem_index(s), MO_TEQ);
>> + write_vec_element_i64(t, v1, 0, ES_64);
>
> Move v1 == v3 break here...
>
>> + gen_addi_and_wrap_i64(s, o->addr1, o->addr1, 8);
>> + tcg_gen_qemu_ld_i64(t, o->addr1, get_mem_index(s), MO_TEQ);
>> + write_vec_element_i64(t, v1, 1, ES_64);
>> + if (v1 == v3) {
>> + break;
>> + }
>> + gen_addi_and_wrap_i64(s, o->addr1, o->addr1, 8);
>> + }
>
> ... and store t2 into v3 element 1 after the loop.
Yes, makes perfect sense, thanks!
--
Thanks,
David / dhildenb
- [qemu-s390x] [PATCH v2 07/32] s390x/tcg: Implement VECTOR LOAD, (continued)
- [qemu-s390x] [PATCH v2 07/32] s390x/tcg: Implement VECTOR LOAD, David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 06/32] s390x/tcg: Implement VECTOR GENERATE MASK, David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 09/32] s390x/tcg: Implement VECTOR LOAD ELEMENT, David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 08/32] s390x/tcg: Implement VECTOR LOAD AND REPLICATE, David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 10/32] s390x/tcg: Implement VECTOR LOAD ELEMENT IMMEDIATE, David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 11/32] s390x/tcg: Implement VECTOR LOAD GR FROM VR ELEMENT, David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 13/32] s390x/tcg: Implement VECTOR LOAD MULTIPLE, David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 12/32] s390x/tcg: Implement VECTOR LOAD LOGICAL ELEMENT AND ZERO, David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 14/32] s390x/tcg: Implement VECTOR LOAD TO BLOCK BOUNDARY, David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 15/32] s390x/tcg: Implement VECTOR LOAD VR ELEMENT FROM GR, David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 16/32] s390x/tcg: Implement VECTOR LOAD VR FROM GRS DISJOINT, David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 18/32] s390x/tcg: Implement VECTOR MERGE (HIGH|LOW), David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 17/32] s390x/tcg: Implement VECTOR LOAD WITH LENGTH, David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 20/32] s390x/tcg: Implement VECTOR PERMUTE, David Hildenbrand, 2019/03/01