CPUState *cs = CPU(cpu);
PSW oldpsw, newpsw;
- newpsw.mask = ldq_phys(cs->as, cpu->env.psa +
- offsetof(LowCore, program_new_psw));
- newpsw.addr = ldq_phys(cs->as, cpu->env.psa +
- offsetof(LowCore, program_new_psw) + 8);
+ newpsw.mask = ldq_be_phys(cs->as, cpu->env.psa +
+ offsetof(LowCore, program_new_psw));
+ newpsw.addr = ldq_be_phys(cs->as, cpu->env.psa +
+ offsetof(LowCore, program_new_psw) + 8);
oldpsw.mask = run->psw_mask;
oldpsw.addr = run->psw_addr;
/*
} else {
CPUState *cs = env_cpu(env);
if (type != PGM_ADDRESSING) {
- stq_phys(cs->as, env->psa + offsetof(LowCore, trans_exc_code), tec);
+ stq_be_phys(cs->as, env->psa + offsetof(LowCore, trans_exc_code),
+ tec);
}
trigger_pgm_exception(env, type);
}
g_assert(dxc <= 0xff);
#if !defined(CONFIG_USER_ONLY)
/* Store the DXC into the lowcore */
- stl_phys(env_cpu(env)->as,
- env->psa + offsetof(LowCore, data_exc_code), dxc);
+ stl_be_phys(env_cpu(env)->as,
+ env->psa + offsetof(LowCore, data_exc_code), dxc);
#endif
/* Store the DXC into the FPC if AFP is enabled */
g_assert(vxc <= 0xff);
#if !defined(CONFIG_USER_ONLY)
/* Always store the VXC into the lowcore, without AFP it is undefined */
- stl_phys(env_cpu(env)->as,
- env->psa + offsetof(LowCore, data_exc_code), vxc);
+ stl_be_phys(env_cpu(env)->as,
+ env->psa + offsetof(LowCore, data_exc_code), vxc);
#endif
/* Always store the VXC into the FPC, without AFP it is undefined */
uint8_t monitor_class, uintptr_t ra)
{
/* Store the Monitor Code and the Monitor Class Number into the lowcore */
- stq_phys(env_cpu(env)->as,
- env->psa + offsetof(LowCore, monitor_code), monitor_code);
- stw_phys(env_cpu(env)->as,
- env->psa + offsetof(LowCore, mon_class_num), monitor_class);
+ stq_be_phys(env_cpu(env)->as,
+ env->psa + offsetof(LowCore, monitor_code), monitor_code);
+ stw_be_phys(env_cpu(env)->as,
+ env->psa + offsetof(LowCore, mon_class_num), monitor_class);
tcg_s390_program_interrupt(env, PGM_MONITOR, ra);
}
inject_exc:
#if !defined(CONFIG_USER_ONLY)
if (exc != PGM_ADDRESSING) {
- stq_phys(env_cpu(env)->as, env->psa + offsetof(LowCore, trans_exc_code),
- env->tlb_fill_tec);
+ stq_be_phys(env_cpu(env)->as,
+ env->psa + offsetof(LowCore, trans_exc_code),
+ env->tlb_fill_tec);
}
if (exc == PGM_PAGE_TRANS) {
stb_phys(env_cpu(env)->as, env->psa + offsetof(LowCore, op_access_id),