From: Richard Henderson Date: Wed, 29 Jun 2016 22:48:03 +0000 (-0700) Subject: exec: Avoid direct references to Int128 parts X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.2~10^2~14^2~5^2~91^2~46 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=258dfaaad05a5fbe32a142b794e1df3e16501d0e;p=sdk%2Femulator%2Fqemu.git exec: Avoid direct references to Int128 parts Reviewed-by: Emilio G. Cota Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- diff --git a/exec.c b/exec.c index 587b489eef..4c84389b56 100644 --- 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, diff --git a/include/qemu/int128.h b/include/qemu/int128.h index c5988813df..52aaf99811 100644 --- a/include/qemu/int128.h +++ b/include/qemu/int128.h @@ -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);