|
From: | Richard Henderson |
Subject: | Re: [Qemu-devel] [PATCH 16/26] target/s390x: implement COMPARE LOGICAL LONG |
Date: | Fri, 26 May 2017 08:32:53 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 |
On 05/25/2017 02:04 PM, Aurelien Jarno wrote:
- if (srclen) { - v1 = cpu_ldub_data_ra(env, src, ra); + if (*srclen) { + v1 = cpu_ldub_data_ra(env, *src, ra); } - if (destlen) { - v2 = cpu_ldub_data_ra(env, dest, ra); + if (*destlen) { + v2 = cpu_ldub_data_ra(env, *dest, ra); }if (v1 != v2) {@@ -746,16 +743,55 @@ uint32_t HELPER(clcle)(CPUS390XState *env, uint32_t r1, uint64_t a2, break; }- if (srclen) {- src++; - srclen--; + if (*srclen) { + *src += 1; + *srclen -= 1; } - if (destlen) { - dest++; - destlen--; + if (*destlen) { + *dest += 1; + *destlen -= 1; } }
If you don't access these as pointers in the inner loop like this, the compiler will give you better code without needing to force the function to be inlined.
Naming convention comment still applies. Otherwise, Reviewed-by: Richard Henderson <address@hidden> r~
[Prev in Thread] | Current Thread | [Next in Thread] |