]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
exec: Avoid direct references to Int128 parts
authorRichard Henderson <rth@twiddle.net>
Wed, 29 Jun 2016 22:48:03 +0000 (15:48 -0700)
committerRichard Henderson <rth@twiddle.net>
Wed, 26 Oct 2016 15:29:00 +0000 (08:29 -0700)
Reviewed-by: Emilio G. Cota <cota@braap.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
exec.c
include/qemu/int128.h

diff --git a/exec.c b/exec.c
index 587b489eefd5f70b1506469dc5698c9a2cfb51fc..4c84389b565af1c06eccb9429b7635f92b544d5f 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -352,9 +352,9 @@ static inline bool section_covers_addr(const MemoryRegionSection *section,
     /* Memory topology clips a memory region to [0, 2^64); size.hi > 0 means
      * the section must cover the entire address space.
      */
-    return section->size.hi ||
+    return int128_gethi(section->size) ||
            range_covers_byte(section->offset_within_address_space,
-                             section->size.lo, addr);
+                             int128_getlo(section->size), addr);
 }
 
 static MemoryRegionSection *phys_page_find(PhysPageEntry lp, hwaddr addr,
index c5988813df4cd766ac99f5f7afac4473e41c48af..52aaf998113f7e5c81b5c68a920da8de187a82d7 100644 (file)
@@ -20,6 +20,16 @@ static inline uint64_t int128_get64(Int128 a)
     return a.lo;
 }
 
+static inline uint64_t int128_getlo(Int128 a)
+{
+    return a.lo;
+}
+
+static inline int64_t int128_gethi(Int128 a)
+{
+    return a.hi;
+}
+
 static inline Int128 int128_zero(void)
 {
     return int128_make64(0);