qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 7/7] target/s390x: Hoist some computation in access_memmove


From: David Hildenbrand
Subject: Re: [PATCH 7/7] target/s390x: Hoist some computation in access_memmove
Date: Wed, 11 Jan 2023 11:22:55 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0

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.henderson@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 <david@redhat.com>

--
Thanks,

David / dhildenb




reply via email to

[Prev in Thread] Current Thread [Next in Thread]