diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2017-06-01 00:01:12 +0200 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2017-06-06 15:20:42 -0700 |
commit | 01f8db88579bef0b6de9f48d0ad2617c5ca2696f (patch) | |
tree | 21f12b02533690ec6da9b74a290bd0c09adf99ee /target/s390x/mem_helper.c | |
parent | fdc0a7474aa271bdcf88dd63008fb10d8a4b4824 (diff) |
target/s390x: implement MOVE ZONES
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Message-Id: <20170531220129.27724-14-aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target/s390x/mem_helper.c')
-rw-r--r-- | target/s390x/mem_helper.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index facac4b6d7..10754dd52d 100644 --- a/target/s390x/mem_helper.c +++ b/target/s390x/mem_helper.c @@ -287,6 +287,19 @@ void HELPER(mvo)(CPUS390XState *env, uint32_t l, uint64_t dest, uint64_t src) } } +/* move zones */ +void HELPER(mvz)(CPUS390XState *env, uint32_t l, uint64_t dest, uint64_t src) +{ + uintptr_t ra = GETPC(); + int i; + + for (i = 0; i <= l; i++) { + uint8_t b = cpu_ldub_data_ra(env, dest + i, ra) & 0x0f; + b |= cpu_ldub_data_ra(env, src + i, ra) & 0xf0; + cpu_stb_data_ra(env, dest + i, b, ra); + } +} + /* compare unsigned byte arrays */ static uint32_t do_helper_clc(CPUS390XState *env, uint32_t l, uint64_t s1, uint64_t s2, uintptr_t ra) |