Re: [Qemu-devel] [PATCH v1 7/7] s390x/tcg: Implement LOAD COUNT TO BLOCK BOUNDARY

2019-02-25 Thread David Hildenbrand
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

Re: [Qemu-devel] [PATCH v1 7/7] s390x/tcg: Implement LOAD COUNT TO BLOCK BOUNDARY

2019-02-25 Thread Richard Henderson
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

Re: [Qemu-devel] [PATCH v1 7/7] s390x/tcg: Implement LOAD COUNT TO BLOCK BOUNDARY

2019-02-25 Thread David Hildenbrand
On 25.02.19 17:14, Richard Henderson wrote: > On 2/25/19 3:55 AM, David Hildenbrand wrote: >> +uint64_t HELPER(lcbb)(uint64_t addr, uint32_t m3) >> +{ >> +const uint32_t block_size = 1ul << (m3 + 6); >> +const uint64_t rounded_addr = ROUND_UP(addr, block_size); >> +uint32_t to_load = 16

Re: [Qemu-devel] [PATCH v1 7/7] s390x/tcg: Implement LOAD COUNT TO BLOCK BOUNDARY

2019-02-25 Thread Richard Henderson
On 2/25/19 3:55 AM, David Hildenbrand wrote: > +uint64_t HELPER(lcbb)(uint64_t addr, uint32_t m3) > +{ > +const uint32_t block_size = 1ul << (m3 + 6); > +const uint64_t rounded_addr = ROUND_UP(addr, block_size); > +uint32_t to_load = 16; > + > +if (rounded_addr != addr) { > +

[Qemu-devel] [PATCH v1 7/7] s390x/tcg: Implement LOAD COUNT TO BLOCK BOUNDARY

2019-02-25 Thread David Hildenbrand
Use a new CC helper to calculate the CC lazily if needed. While the PoP mentions that "A 32-bit unsigned binary integer" is placed into the first operand, there is no word telling that the other 32 bits (high part) are left untouched. Maybe the other 32-bit are unpredictable. So store 64 bit for no