mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-09-06 18:05:37 +00:00
target-s390: Convert SERVC
Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
7ab938d706
commit
dc458df91d
|
@ -80,7 +80,7 @@ DEF_HELPER_FLAGS_5(calc_cc, TCG_CALL_NO_RWG_SE, i32, env, i32, i64, i64, i64)
|
|||
DEF_HELPER_FLAGS_2(sfpc, TCG_CALL_NO_RWG, void, env, i64)
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
DEF_HELPER_3(servc, i32, env, i32, i64)
|
||||
DEF_HELPER_3(servc, i32, env, i64, i64)
|
||||
DEF_HELPER_4(diag, i64, env, i32, i64, i64)
|
||||
DEF_HELPER_3(load_psw, void, env, i64, i64)
|
||||
DEF_HELPER_FLAGS_2(spx, TCG_CALL_NO_RWG, void, env, i64)
|
||||
|
|
|
@ -641,6 +641,8 @@
|
|||
C(0xb20d, PTLB, S, Z, 0, 0, 0, 0, ptlb, 0)
|
||||
/* RESET REFERENCE BIT EXTENDED */
|
||||
C(0xb22a, RRBE, RRE, Z, 0, r2_o, 0, 0, rrbe, 0)
|
||||
/* SERVICE CALL LOGICAL PROCESSOR (PV hypercall) */
|
||||
C(0xb220, SERVC, RRE, Z, r1_o, r2_o, 0, 0, servc, 0)
|
||||
/* SET ADDRESSING MODE */
|
||||
/* We only do 64-bit, so accept this as a no-op.
|
||||
Let SAM24 and SAM31 signal illegal instruction. */
|
||||
|
|
|
@ -88,11 +88,9 @@ void program_interrupt(CPUS390XState *env, uint32_t code, int ilen)
|
|||
}
|
||||
|
||||
/* SCLP service call */
|
||||
uint32_t HELPER(servc)(CPUS390XState *env, uint32_t r1, uint64_t r2)
|
||||
uint32_t HELPER(servc)(CPUS390XState *env, uint64_t r1, uint64_t r2)
|
||||
{
|
||||
int r;
|
||||
|
||||
r = sclp_service_call(r1, r2);
|
||||
int r = sclp_service_call(r1, r2);
|
||||
if (r < 0) {
|
||||
program_interrupt(env, -r, 4);
|
||||
return 0;
|
||||
|
|
|
@ -1022,27 +1022,7 @@ static void disas_b2(CPUS390XState *env, DisasContext *s, int op,
|
|||
uint32_t insn)
|
||||
{
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
TCGv_i64 tmp;
|
||||
TCGv_i32 tmp32_1;
|
||||
int r1, r2;
|
||||
|
||||
r1 = (insn >> 4) & 0xf;
|
||||
r2 = insn & 0xf;
|
||||
|
||||
LOG_DISAS("disas_b2: op 0x%x r1 %d r2 %d\n", op, r1, r2);
|
||||
|
||||
switch (op) {
|
||||
case 0x20: /* SERVC R1,R2 [RRE] */
|
||||
/* SCLP Service call (PV hypercall) */
|
||||
check_privileged(s);
|
||||
potential_page_fault(s);
|
||||
tmp32_1 = load_reg32(r2);
|
||||
tmp = load_reg(r1);
|
||||
gen_helper_servc(cc_op, cpu_env, tmp32_1, tmp);
|
||||
set_cc_static(s);
|
||||
tcg_temp_free_i32(tmp32_1);
|
||||
tcg_temp_free_i64(tmp);
|
||||
break;
|
||||
default:
|
||||
#endif
|
||||
LOG_DISAS("illegal b2 operation 0x%x\n", op);
|
||||
|
@ -2701,6 +2681,15 @@ static ExitStatus op_sqxb(DisasContext *s, DisasOps *o)
|
|||
}
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
static ExitStatus op_servc(DisasContext *s, DisasOps *o)
|
||||
{
|
||||
check_privileged(s);
|
||||
potential_page_fault(s);
|
||||
gen_helper_servc(cc_op, cpu_env, o->in2, o->in1);
|
||||
set_cc_static(s);
|
||||
return NO_EXIT;
|
||||
}
|
||||
|
||||
static ExitStatus op_sigp(DisasContext *s, DisasOps *o)
|
||||
{
|
||||
TCGv_i32 r1 = tcg_const_i32(get_field(s->fields, r1));
|
||||
|
|
Loading…
Reference in a new issue