Commit 84e1b98b authored by Richard Henderson's avatar Richard Henderson

target/s390x: Use unwind data for helper_unpk

Reviewed-by: 's avatarThomas Huth <thuth@redhat.com>
Reviewed-by: 's avatarAurelien Jarno <aurelien@aurel32.net>
Signed-off-by: 's avatarRichard Henderson <rth@twiddle.net>
parent 498644e9
......@@ -679,6 +679,7 @@ uint64_t HELPER(cksm)(CPUS390XState *env, uint64_t r1,
void HELPER(unpk)(CPUS390XState *env, uint32_t len, uint64_t dest,
uint64_t src)
{
uintptr_t ra = GETPC();
int len_dest = len >> 4;
int len_src = len & 0xf;
uint8_t b;
......@@ -688,8 +689,8 @@ void HELPER(unpk)(CPUS390XState *env, uint32_t len, uint64_t dest,
src += len_src;
/* last byte is special, it only flips the nibbles */
b = cpu_ldub_data(env, src);
cpu_stb_data(env, dest, (b << 4) | (b >> 4));
b = cpu_ldub_data_ra(env, src, ra);
cpu_stb_data_ra(env, dest, (b << 4) | (b >> 4), ra);
src--;
len_src--;
......@@ -699,7 +700,7 @@ void HELPER(unpk)(CPUS390XState *env, uint32_t len, uint64_t dest,
uint8_t cur_byte = 0;
if (len_src > 0) {
cur_byte = cpu_ldub_data(env, src);
cur_byte = cpu_ldub_data_ra(env, src, ra);
}
len_dest--;
......@@ -718,7 +719,7 @@ void HELPER(unpk)(CPUS390XState *env, uint32_t len, uint64_t dest,
/* zone bits */
cur_byte |= 0xf0;
cpu_stb_data(env, dest, cur_byte);
cpu_stb_data_ra(env, dest, cur_byte, ra);
}
}
......
......@@ -4099,7 +4099,6 @@ static ExitStatus op_trt(DisasContext *s, DisasOps *o)
static ExitStatus op_unpk(DisasContext *s, DisasOps *o)
{
TCGv_i32 l = tcg_const_i32(get_field(s->fields, l1));
potential_page_fault(s);
gen_helper_unpk(cpu_env, l, o->addr1, o->in2);
tcg_temp_free_i32(l);
return NO_EXIT;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment