target/s390x: Use unwind data for helper_testblock
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
75d6240c59
commit
aef2b01a50
@ -939,6 +939,7 @@ void HELPER(stctl)(CPUS390XState *env, uint32_t r1, uint64_t a2, uint32_t r3)
|
|||||||
|
|
||||||
uint32_t HELPER(testblock)(CPUS390XState *env, uint64_t real_addr)
|
uint32_t HELPER(testblock)(CPUS390XState *env, uint64_t real_addr)
|
||||||
{
|
{
|
||||||
|
uintptr_t ra = GETPC();
|
||||||
CPUState *cs = CPU(s390_env_get_cpu(env));
|
CPUState *cs = CPU(s390_env_get_cpu(env));
|
||||||
uint64_t abs_addr;
|
uint64_t abs_addr;
|
||||||
int i;
|
int i;
|
||||||
@ -947,12 +948,14 @@ uint32_t HELPER(testblock)(CPUS390XState *env, uint64_t real_addr)
|
|||||||
abs_addr = mmu_real2abs(env, real_addr) & TARGET_PAGE_MASK;
|
abs_addr = mmu_real2abs(env, real_addr) & TARGET_PAGE_MASK;
|
||||||
if (!address_space_access_valid(&address_space_memory, abs_addr,
|
if (!address_space_access_valid(&address_space_memory, abs_addr,
|
||||||
TARGET_PAGE_SIZE, true)) {
|
TARGET_PAGE_SIZE, true)) {
|
||||||
|
cpu_restore_state(cs, ra);
|
||||||
program_interrupt(env, PGM_ADDRESSING, 4);
|
program_interrupt(env, PGM_ADDRESSING, 4);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check low-address protection */
|
/* Check low-address protection */
|
||||||
if ((env->cregs[0] & CR0_LOWPROT) && real_addr < 0x2000) {
|
if ((env->cregs[0] & CR0_LOWPROT) && real_addr < 0x2000) {
|
||||||
|
cpu_restore_state(cs, ra);
|
||||||
program_interrupt(env, PGM_PROTECTION, 4);
|
program_interrupt(env, PGM_PROTECTION, 4);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -4047,7 +4047,6 @@ static ExitStatus op_tcxb(DisasContext *s, DisasOps *o)
|
|||||||
static ExitStatus op_testblock(DisasContext *s, DisasOps *o)
|
static ExitStatus op_testblock(DisasContext *s, DisasOps *o)
|
||||||
{
|
{
|
||||||
check_privileged(s);
|
check_privileged(s);
|
||||||
potential_page_fault(s);
|
|
||||||
gen_helper_testblock(cc_op, cpu_env, o->in2);
|
gen_helper_testblock(cc_op, cpu_env, o->in2);
|
||||||
set_cc_static(s);
|
set_cc_static(s);
|
||||||
return NO_EXIT;
|
return NO_EXIT;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user