mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-01 06:21:52 -06:00
target/s390x: Use unwind data for helper_tre
Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
981a8ea0c5
commit
d46cd62ff8
2 changed files with 8 additions and 8 deletions
|
@ -744,9 +744,11 @@ void HELPER(tr)(CPUS390XState *env, uint32_t len, uint64_t array,
|
||||||
uint64_t HELPER(tre)(CPUS390XState *env, uint64_t array,
|
uint64_t HELPER(tre)(CPUS390XState *env, uint64_t array,
|
||||||
uint64_t len, uint64_t trans)
|
uint64_t len, uint64_t trans)
|
||||||
{
|
{
|
||||||
|
uintptr_t ra = GETPC();
|
||||||
uint8_t end = env->regs[0] & 0xff;
|
uint8_t end = env->regs[0] & 0xff;
|
||||||
uint64_t l = len;
|
uint64_t l = len;
|
||||||
uint64_t i;
|
uint64_t i;
|
||||||
|
uint32_t cc = 0;
|
||||||
|
|
||||||
if (!(env->psw.mask & PSW_MASK_64)) {
|
if (!(env->psw.mask & PSW_MASK_64)) {
|
||||||
array &= 0x7fffffff;
|
array &= 0x7fffffff;
|
||||||
|
@ -757,25 +759,24 @@ uint64_t HELPER(tre)(CPUS390XState *env, uint64_t array,
|
||||||
amount of work we're willing to do. For now, let's cap at 8k. */
|
amount of work we're willing to do. For now, let's cap at 8k. */
|
||||||
if (l > 0x2000) {
|
if (l > 0x2000) {
|
||||||
l = 0x2000;
|
l = 0x2000;
|
||||||
env->cc_op = 3;
|
cc = 3;
|
||||||
} else {
|
|
||||||
env->cc_op = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < l; i++) {
|
for (i = 0; i < l; i++) {
|
||||||
uint8_t byte, new_byte;
|
uint8_t byte, new_byte;
|
||||||
|
|
||||||
byte = cpu_ldub_data(env, array + i);
|
byte = cpu_ldub_data_ra(env, array + i, ra);
|
||||||
|
|
||||||
if (byte == end) {
|
if (byte == end) {
|
||||||
env->cc_op = 1;
|
cc = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
new_byte = cpu_ldub_data(env, trans + byte);
|
new_byte = cpu_ldub_data_ra(env, trans + byte, ra);
|
||||||
cpu_stb_data(env, array + i, new_byte);
|
cpu_stb_data_ra(env, array + i, new_byte, ra);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
env->cc_op = cc;
|
||||||
env->retxl = len - i;
|
env->retxl = len - i;
|
||||||
return array + i;
|
return array + i;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4078,7 +4078,6 @@ static ExitStatus op_tr(DisasContext *s, DisasOps *o)
|
||||||
|
|
||||||
static ExitStatus op_tre(DisasContext *s, DisasOps *o)
|
static ExitStatus op_tre(DisasContext *s, DisasOps *o)
|
||||||
{
|
{
|
||||||
potential_page_fault(s);
|
|
||||||
gen_helper_tre(o->out, cpu_env, o->out, o->out2, o->in2);
|
gen_helper_tre(o->out, cpu_env, o->out, o->out2, o->in2);
|
||||||
return_low128(o->out2);
|
return_low128(o->out2);
|
||||||
set_cc_static(s);
|
set_cc_static(s);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue