On 09.01.23 21:18, Richard Henderson wrote:
Ensure that the total length is in a local variable
across the byte loop.  Compute size1 difference once.

Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
---
  target/s390x/tcg/mem_helper.c | 13 +++++++------
  1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c
index 92eb6564c3..5f0dd67985 100644
--- a/target/s390x/tcg/mem_helper.c
+++ b/target/s390x/tcg/mem_helper.c
@@ -299,16 +299,17 @@ static void access_set_byte(CPUS390XState *env, 
S390Access *access,
  static void access_memmove(CPUS390XState *env, S390Access *desta,
                             S390Access *srca, uintptr_t ra)
  {
+    int len = desta->size1 + desta->size2;
      int diff;

I guess I'd have called "diff" something like "size1_diff" to make the comparisons easier to digest.

Reviewed-by: David Hildenbrand <da...@redhat.com>

--
Thanks,

David / dhildenb


Reply via email to