void spapr_register_hypercall(target_ulong opcode, spapr_hcall_fn fn)

{

    spapr_hcall_fn *slot;



    if (opcode <= MAX_HCALL_OPCODE) {

        assert((opcode & 0x3) == 0);



        slot = &papr_hypercall_table[opcode / 4];

    } else {

        assert((opcode >= KVMPPC_HCALL_BASE) && (opcode <= KVMPPC_HCALL_MAX));





        slot = &kvmppc_hypercall_table[opcode - KVMPPC_HCALL_BASE];

    }



    assert(!(*slot) || (fn == *slot));

    *slot = fn;

}

void spapr_register_hypercall(target_ulong opcode, spapr_hcall_fn fn)

{

    spapr_hcall_fn *slot;



    if (opcode <= MAX_HCALL_OPCODE) {

        assert((opcode & 0x3) == 0);



        slot = &papr_hypercall_table[opcode / 4];

    } else {

        assert((opcode >= KVMPPC_HCALL_BASE) && (opcode <= KVMPPC_HCALL_MAX));





        slot = &kvmppc_hypercall_table[opcode - KVMPPC_HCALL_BASE];

    }



    assert(!(*slot) || (fn == *slot));

    *slot = fn;

}

void FUNC_0(target_ulong VAR_0, spapr_hcall_fn VAR_1)

{

    spapr_hcall_fn *slot;



    if (VAR_0 <= MAX_HCALL_OPCODE) {

        assert((VAR_0 & 0x3) == 0);



        slot = &papr_hypercall_table[VAR_0 / 4];

    } else {

        assert((VAR_0 >= KVMPPC_HCALL_BASE) && (VAR_0 <= KVMPPC_HCALL_MAX));





        slot = &kvmppc_hypercall_table[VAR_0 - KVMPPC_HCALL_BASE];

    }



    assert(!(*slot) || (VAR_1 == *slot));

    *slot = VAR_1;

}

void FUNC_0(target_ulong VAR_0, spapr_hcall_fn VAR_1)
{ spapr_hcall_fn *slot; if (VAR_0 <= MAX_HCALL_OPCODE) { assert((VAR_0 & 0x3) == 0); slot = &papr_hypercall_table[VAR_0 / 4]; } else { assert((VAR_0 >= KVMPPC_HCALL_BASE) && (VAR_0 <= KVMPPC_HCALL_MAX)); slot = &kvmppc_hypercall_table[VAR_0 - KVMPPC_HCALL_BASE]; } assert(!(*slot) || (VAR_1 == *slot)); *slot = VAR_1; }