[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [Qemu-devel] [PATCH v1 7/7] s390x/tcg: Implement LOAD C
From: |
David Hildenbrand |
Subject: |
Re: [qemu-s390x] [Qemu-devel] [PATCH v1 7/7] s390x/tcg: Implement LOAD COUNT TO BLOCK BOUNDARY |
Date: |
Mon, 25 Feb 2019 20:55:08 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
On 25.02.19 17:40, Richard Henderson wrote:
> On 2/25/19 8:17 AM, David Hildenbrand wrote:
>> On 25.02.19 17:14, Richard Henderson wrote:
>>> I don't understand all of this "blocksize" business, when they are all
>>> powers
>>> of two, and the maximum value returned is 16.
>>>
>>> As far as I can see, the result is obtained by -(addr | -16) regardless of
>>> the
>>> value of m3.
>>
>> Let's assume we have addr = 63;
>>
>> Assume block size is 64:
>> -> to_load = 1
>>
>> Assume block size is 128:
>> -> to_load = 16
>>
>> Or am i missing something?
>
> No, just me.
>
> You can still do the computation inline, with
>
> tcg_gen_ori_i64(tmp, addr, -blocksize);
> tcg_gen_neg_i64(tmp, tmp);
> sixteen = tcg_const_i64(16);
> tcg_gen_umin_i64(tmp, sixteen);
>
Nice trick, works fine, thanks :)
>
> r~
>
--
Thanks,
David / dhildenb
- Re: [qemu-s390x] [Qemu-devel] [PATCH v1 3/7] s390x/tcg: Clarify terminology in vec_reg_offset(), (continued)
[qemu-s390x] [PATCH v1 6/7] s390x/tcg: Implement LOAD LENGTHENED short HFP to long HFP, David Hildenbrand, 2019/02/25
[qemu-s390x] [PATCH v1 1/7] s390x/tcg: RXE has an optional M3 field, David Hildenbrand, 2019/02/25
[qemu-s390x] [PATCH v1 2/7] s390x/tcg: Simplify disassembler operands initialization, David Hildenbrand, 2019/02/25