exec: Avoid direct references to Int128 parts

Backports commit 258dfaaad05a5fbe32a142b794e1df3e16501d0e from qemu
This commit is contained in:
Richard Henderson 2018-02-27 11:01:41 -05:00 committed by Lioncash
parent ba1c63572e
commit 4fdbe94eea
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7
2 changed files with 12 additions and 2 deletions

View file

@ -299,9 +299,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,

View file

@ -23,6 +23,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);