[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 03/35] exec: Avoid direct references to Int128 pa
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH v4 03/35] exec: Avoid direct references to Int128 parts |
Date: |
Fri, 16 Sep 2016 10:46:25 -0700 |
Signed-off-by: Richard Henderson <address@hidden>
---
exec.c | 4 ++--
include/qemu/int128.h | 10 ++++++++++
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/exec.c b/exec.c
index c8389f9..cc2997e 100644
--- a/exec.c
+++ b/exec.c
@@ -320,9 +320,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 c598881..52aaf99 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);
--
2.5.5
- [Qemu-devel] [PATCH v4 00/35] cmpxchg-based emulation of atomics, Richard Henderson, 2016/09/16
- [Qemu-devel] [PATCH v4 01/35] atomics: add atomic_xor, Richard Henderson, 2016/09/16
- [Qemu-devel] [PATCH v4 02/35] atomics: add atomic_op_fetch variants, Richard Henderson, 2016/09/16
- [Qemu-devel] [PATCH v4 04/35] int128: Use __int128 if available, Richard Henderson, 2016/09/16
- [Qemu-devel] [PATCH v4 03/35] exec: Avoid direct references to Int128 parts,
Richard Henderson <=
- [Qemu-devel] [PATCH v4 05/35] int128: Add int128_make128, Richard Henderson, 2016/09/16
- [Qemu-devel] [PATCH v4 07/35] HACK: Always enable parallel_cpus, Richard Henderson, 2016/09/16
- [Qemu-devel] [PATCH v4 08/35] cputlb: Replace SHIFT with DATA_SIZE, Richard Henderson, 2016/09/16
- [Qemu-devel] [PATCH v4 10/35] cputlb: Remove includes from softmmu_template.h, Richard Henderson, 2016/09/16
- [Qemu-devel] [PATCH v4 09/35] cputlb: Move probe_write out of softmmu_template.h, Richard Henderson, 2016/09/16
- [Qemu-devel] [PATCH v4 12/35] cputlb: Tidy some macros, Richard Henderson, 2016/09/16
- [Qemu-devel] [PATCH v4 16/35] tcg: Emit barriers with parallel_cpus, Richard Henderson, 2016/09/16
- [Qemu-devel] [PATCH v4 11/35] cputlb: Move most of iotlb code out of line, Richard Henderson, 2016/09/16
- [Qemu-devel] [PATCH v4 17/35] target-i386: emulate LOCK'ed cmpxchg using cmpxchg helpers, Richard Henderson, 2016/09/16
- [Qemu-devel] [PATCH v4 19/35] target-i386: emulate LOCK'ed INC using atomic helper, Richard Henderson, 2016/09/16