aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2017-09-20 17:30:15 +0200
committerCornelia Huck <cohuck@redhat.com>2017-10-06 10:53:01 +0200
commit7634d658e601714a917d91367a27340ffa77c3db (patch)
treeaae188774ca7bee1c70d32894fe8b7d657ad80af /target
parent6b257354c4912d536b999ef32968b1cbb8add4f2 (diff)
downloadqemu-7634d658e601714a917d91367a27340ffa77c3db.zip
qemu-7634d658e601714a917d91367a27340ffa77c3db.tar.gz
qemu-7634d658e601714a917d91367a27340ffa77c3db.tar.bz2
s390x/tcg: move wrap_address() to internal.h
We want to use it in another file. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20170920153016.3858-3-david@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target')
-rw-r--r--target/s390x/internal.h14
-rw-r--r--target/s390x/mem_helper.c14
2 files changed, 14 insertions, 14 deletions
diff --git a/target/s390x/internal.h b/target/s390x/internal.h
index bc8f831..70d2b87 100644
--- a/target/s390x/internal.h
+++ b/target/s390x/internal.h
@@ -162,6 +162,20 @@ static inline uint8_t get_per_atmid(CPUS390XState *env)
((env->psw.mask & PSW_ASC_ACCREG) ? (1 << 2) : 0);
}
+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;
+}
+
/* CC optimization */
/* Instead of computing the condition codes after each x86 instruction,
diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c
index ec4760e..a254613 100644
--- a/target/s390x/mem_helper.c
+++ b/target/s390x/mem_helper.c
@@ -122,20 +122,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)
{