[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v1 4/6] target/s390x: move wrap_address to cpu.h
From: |
David Hildenbrand |
Subject: |
[Qemu-devel] [PATCH v1 4/6] target/s390x: move wrap_address to cpu.h |
Date: |
Fri, 21 Jul 2017 14:56:07 +0200 |
Signed-off-by: David Hildenbrand <address@hidden>
---
target/s390x/cpu.h | 14 ++++++++++++++
target/s390x/mem_helper.c | 14 --------------
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h
index 4f7c6b7..13df41c 100644
--- a/target/s390x/cpu.h
+++ b/target/s390x/cpu.h
@@ -409,6 +409,20 @@ static inline uint64_t cpu_mmu_idx_to_asc(int mmu_idx)
}
}
+static inline uint64_t wrap_address(CPUS390XState *env, uint64_t a)
+{
+ if (!(env->psw.mask & PSW_MASK_64)) {
+ if (!(env->psw.mask & PSW_MASK_32)) {
+ /* 24-Bit mode */
+ a &= 0x00ffffff;
+ } else {
+ /* 31-Bit mode */
+ a &= 0x7fffffff;
+ }
+ }
+ return a;
+}
+
static inline void cpu_get_tb_cpu_state(CPUS390XState* env, target_ulong *pc,
target_ulong *cs_base, uint32_t *flags)
{
diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c
index cdc78aa..369d291 100644
--- a/target/s390x/mem_helper.c
+++ b/target/s390x/mem_helper.c
@@ -110,20 +110,6 @@ static inline void cpu_stsize_data_ra(CPUS390XState *env,
uint64_t addr,
}
}
-static inline uint64_t wrap_address(CPUS390XState *env, uint64_t a)
-{
- if (!(env->psw.mask & PSW_MASK_64)) {
- if (!(env->psw.mask & PSW_MASK_32)) {
- /* 24-Bit mode */
- a &= 0x00ffffff;
- } else {
- /* 31-Bit mode */
- a &= 0x7fffffff;
- }
- }
- return a;
-}
-
static void fast_memset(CPUS390XState *env, uint64_t dest, uint8_t byte,
uint32_t l, uintptr_t ra)
{
--
2.9.4
[Qemu-devel] [PATCH v1 5/6] target/s390x: add basic MSA features, David Hildenbrand, 2017/07/21
[Qemu-devel] [PATCH v1 6/6] target/s390x: various alignment check, David Hildenbrand, 2017/07/21
Re: [Qemu-devel] [PATCH v1 0/6] target/s390x: tcg improvments + MSA functions, no-reply, 2017/07/21
Re: [Qemu-devel] [PATCH v1 0/6] target/s390x: tcg improvments + MSA functions, Richard Henderson, 2017/07/23
Re: [Qemu-devel] [PATCH v1 0/6] target/s390x: tcg improvments + MSA functions, Cornelia Huck, 2017/07/25