target-s390: Implement LURA, LURAG, STURG
Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
81822c2f42
commit
9c3fd85b14
@ -111,5 +111,8 @@ DEF_HELPER_FLAGS_2(sacf, TCG_CALL_NO_WG, void, env, i64)
|
||||
DEF_HELPER_FLAGS_3(ipte, TCG_CALL_NO_RWG, void, env, i64, i64)
|
||||
DEF_HELPER_FLAGS_1(ptlb, TCG_CALL_NO_RWG, void, env)
|
||||
DEF_HELPER_2(lra, i64, env, i64)
|
||||
DEF_HELPER_FLAGS_2(lura, TCG_CALL_NO_WG, i64, env, i64)
|
||||
DEF_HELPER_FLAGS_2(lurag, TCG_CALL_NO_WG, i64, env, i64)
|
||||
DEF_HELPER_FLAGS_3(stura, TCG_CALL_NO_WG, void, env, i64, i64)
|
||||
DEF_HELPER_FLAGS_3(sturg, TCG_CALL_NO_WG, void, env, i64, i64)
|
||||
#endif
|
||||
|
@ -739,6 +739,9 @@
|
||||
C(0xb100, LRA, RX_a, Z, 0, a2, r1, 0, lra, 0)
|
||||
C(0xe313, LRAY, RXY_a, LD, 0, a2, r1, 0, lra, 0)
|
||||
C(0xe303, LRAG, RXY_a, Z, 0, a2, r1, 0, lra, 0)
|
||||
/* LOAD USING REAL ADDRESS */
|
||||
C(0xb24b, LURA, RRE, Z, 0, r2, new, r1_32, lura, 0)
|
||||
C(0xb905, LURAG, RRE, Z, 0, r2, r1, 0, lurag, 0)
|
||||
/* MOVE TO PRIMARY */
|
||||
C(0xda00, MVCP, SS_d, Z, la1, a2, 0, 0, mvcp, 0)
|
||||
/* MOVE TO SECONDARY */
|
||||
@ -796,6 +799,7 @@
|
||||
C(0xad00, STOSM, SI, Z, la1, 0, 0, 0, stnosm, 0)
|
||||
/* STORE USING REAL ADDRESS */
|
||||
C(0xb246, STURA, RRE, Z, r1_o, r2_o, 0, 0, stura, 0)
|
||||
C(0xb925, STURG, RRE, Z, r1_o, r2_o, 0, 0, sturg, 0)
|
||||
/* TEST PROTECTION */
|
||||
C(0xe501, TPROT, SSE, Z, la1, a2, 0, 0, tprot, 0)
|
||||
|
||||
|
@ -1034,6 +1034,21 @@ void HELPER(ptlb)(CPUS390XState *env)
|
||||
tlb_flush(CPU(cpu), 1);
|
||||
}
|
||||
|
||||
/* load using real address */
|
||||
uint64_t HELPER(lura)(CPUS390XState *env, uint64_t addr)
|
||||
{
|
||||
CPUState *cs = CPU(s390_env_get_cpu(env));
|
||||
|
||||
return (uint32_t)ldl_phys(cs->as, get_address(env, 0, 0, addr));
|
||||
}
|
||||
|
||||
uint64_t HELPER(lurag)(CPUS390XState *env, uint64_t addr)
|
||||
{
|
||||
CPUState *cs = CPU(s390_env_get_cpu(env));
|
||||
|
||||
return ldq_phys(cs->as, get_address(env, 0, 0, addr));
|
||||
}
|
||||
|
||||
/* store using real address */
|
||||
void HELPER(stura)(CPUS390XState *env, uint64_t addr, uint64_t v1)
|
||||
{
|
||||
@ -1042,6 +1057,13 @@ void HELPER(stura)(CPUS390XState *env, uint64_t addr, uint64_t v1)
|
||||
stl_phys(cs->as, get_address(env, 0, 0, addr), (uint32_t)v1);
|
||||
}
|
||||
|
||||
void HELPER(sturg)(CPUS390XState *env, uint64_t addr, uint64_t v1)
|
||||
{
|
||||
CPUState *cs = CPU(s390_env_get_cpu(env));
|
||||
|
||||
stq_phys(cs->as, get_address(env, 0, 0, addr), v1);
|
||||
}
|
||||
|
||||
/* load real address */
|
||||
uint64_t HELPER(lra)(CPUS390XState *env, uint64_t addr)
|
||||
{
|
||||
|
@ -2478,6 +2478,24 @@ static ExitStatus op_lm64(DisasContext *s, DisasOps *o)
|
||||
return NO_EXIT;
|
||||
}
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
static ExitStatus op_lura(DisasContext *s, DisasOps *o)
|
||||
{
|
||||
check_privileged(s);
|
||||
potential_page_fault(s);
|
||||
gen_helper_lura(o->out, cpu_env, o->in2);
|
||||
return NO_EXIT;
|
||||
}
|
||||
|
||||
static ExitStatus op_lurag(DisasContext *s, DisasOps *o)
|
||||
{
|
||||
check_privileged(s);
|
||||
potential_page_fault(s);
|
||||
gen_helper_lurag(o->out, cpu_env, o->in2);
|
||||
return NO_EXIT;
|
||||
}
|
||||
#endif
|
||||
|
||||
static ExitStatus op_mov2(DisasContext *s, DisasOps *o)
|
||||
{
|
||||
o->out = o->in2;
|
||||
@ -3364,6 +3382,14 @@ static ExitStatus op_stura(DisasContext *s, DisasOps *o)
|
||||
gen_helper_stura(cpu_env, o->in2, o->in1);
|
||||
return NO_EXIT;
|
||||
}
|
||||
|
||||
static ExitStatus op_sturg(DisasContext *s, DisasOps *o)
|
||||
{
|
||||
check_privileged(s);
|
||||
potential_page_fault(s);
|
||||
gen_helper_sturg(cpu_env, o->in2, o->in1);
|
||||
return NO_EXIT;
|
||||
}
|
||||
#endif
|
||||
|
||||
static ExitStatus op_st8(DisasContext *s, DisasOps *o)
|
||||
|
Loading…
Reference in New Issue
Block a user