diff options
author | Richard Henderson <rth@twiddle.net> | 2017-05-19 11:43:08 -0700 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2017-06-06 14:34:31 -0700 |
commit | 981a8ea0c549df539962bf8c6253f73dde3cf1cc (patch) | |
tree | b5de7e33caf2e2dedfd6baf36a44c0ffc7b1b2d5 /target | |
parent | 84e1b98ba6444e69aeb989c38b3fd4e457ad31d8 (diff) | |
download | qemu-981a8ea0c549df539962bf8c6253f73dde3cf1cc.zip qemu-981a8ea0c549df539962bf8c6253f73dde3cf1cc.tar.gz qemu-981a8ea0c549df539962bf8c6253f73dde3cf1cc.tar.bz2 |
target/s390x: Use unwind data for helper_tr
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target')
-rw-r--r-- | target/s390x/mem_helper.c | 25 | ||||
-rw-r--r-- | target/s390x/translate.c | 1 |
2 files changed, 15 insertions, 11 deletions
diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 0701e10..b37a963 100644 --- a/target/s390x/mem_helper.c +++ b/target/s390x/mem_helper.c @@ -723,19 +723,24 @@ void HELPER(unpk)(CPUS390XState *env, uint32_t len, uint64_t dest, } } -void HELPER(tr)(CPUS390XState *env, uint32_t len, uint64_t array, - uint64_t trans) +static void do_helper_tr(CPUS390XState *env, uint32_t len, uint64_t array, + uint64_t trans, uintptr_t ra) { - int i; + uint32_t i; for (i = 0; i <= len; i++) { - uint8_t byte = cpu_ldub_data(env, array + i); - uint8_t new_byte = cpu_ldub_data(env, trans + byte); - - cpu_stb_data(env, array + i, new_byte); + uint8_t byte = cpu_ldub_data_ra(env, array + i, ra); + uint8_t new_byte = cpu_ldub_data_ra(env, trans + byte, ra); + cpu_stb_data_ra(env, array + i, new_byte, ra); } } +void HELPER(tr)(CPUS390XState *env, uint32_t len, uint64_t array, + uint64_t trans) +{ + return do_helper_tr(env, len, array, trans, GETPC()); +} + uint64_t HELPER(tre)(CPUS390XState *env, uint64_t array, uint64_t len, uint64_t trans) { @@ -1265,9 +1270,9 @@ uint32_t HELPER(ex)(CPUS390XState *env, uint32_t cc, uint64_t v1, get_address(env, 0, b2, d2), 0); break; case 0xc00: - helper_tr(env, l, get_address(env, 0, b1, d1), - get_address(env, 0, b2, d2)); - break; + do_helper_tr(env, l, get_address(env, 0, b1, d1), + get_address(env, 0, b2, d2), 0); + return cc; case 0xd00: cc = helper_trt(env, l, get_address(env, 0, b1, d1), get_address(env, 0, b2, d2)); diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 10262f5..e4da94d 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -4070,7 +4070,6 @@ static ExitStatus op_tprot(DisasContext *s, DisasOps *o) static ExitStatus op_tr(DisasContext *s, DisasOps *o) { TCGv_i32 l = tcg_const_i32(get_field(s->fields, l1)); - potential_page_fault(s); gen_helper_tr(cpu_env, l, o->addr1, o->in2); tcg_temp_free_i32(l); set_cc_static(s); |