[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [Qemu-devel] [PATCH v1 2/2] s390x/tcg: Store only the n
From: |
Richard Henderson |
Subject: |
Re: [qemu-s390x] [Qemu-devel] [PATCH v1 2/2] s390x/tcg: Store only the necessary amount of doublewords for STFLE |
Date: |
Fri, 31 May 2019 10:05:49 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 |
On 5/31/19 9:56 AM, David Hildenbrand wrote:
> @@ -678,7 +678,7 @@ uint32_t HELPER(stfle)(CPUS390XState *env, uint64_t addr)
>
> prepare_stfl();
> max_bytes = ROUND_UP(used_stfl_bytes, 8);
> - for (i = 0; i < count_bytes; ++i) {
> + for (i = 0; i < MIN(count_bytes, max_bytes); ++i) {
Before the loop, please put something like
/*
* The PoP says that doublewords beyond the highest-numbered
* facility bit may or may not be stored. However, existing
* hardware appears to not store the words, and existing
* software appears to depend on that.
*/
with that,
Reviewed-by: Richard Henderson <address@hidden>
r~