aboutsummaryrefslogtreecommitdiff
path: root/target/s390x/mem_helper.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2017-05-19 11:37:55 -0700
committerRichard Henderson <rth@twiddle.net>2017-06-06 14:34:31 -0700
commit84e1b98ba6444e69aeb989c38b3fd4e457ad31d8 (patch)
treecae8e8e085bea42a022b9696176309c84f2f3674 /target/s390x/mem_helper.c
parent498644e99f3c3aa41cf563a958b19a683cc18336 (diff)
target/s390x: Use unwind data for helper_unpk
Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Aurelien Jarno <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.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c
index d4ee364e4d..0701e10b00 100644
--- a/target/s390x/mem_helper.c
+++ b/target/s390x/mem_helper.c
@@ -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);
}
}