int cpu_signal_handler(int host_signum, void *pinfo, void *puc)

{

    siginfo_t *info = pinfo;

    ucontext_t *uc = puc;

    unsigned long ip;

    int is_write = 0;



    ip = uc->uc_mcontext.sc_ip;

    switch (host_signum) {

    case SIGILL:

    case SIGFPE:

    case SIGSEGV:

    case SIGBUS:

    case SIGTRAP:

        if (info->si_code && (info->si_segvflags & __ISR_VALID)) {

            /* ISR.W (write-access) is bit 33:  */

            is_write = (info->si_isr >> 33) & 1;

        }

        break;



    default:

        break;

    }

    return handle_cpu_signal(ip, (unsigned long)info->si_addr,

                             is_write,

                             (sigset_t *)&uc->uc_sigmask);

}

int cpu_signal_handler(int host_signum, void *pinfo, void *puc)

{

    siginfo_t *info = pinfo;

    ucontext_t *uc = puc;

    unsigned long ip;

    int is_write = 0;



    ip = uc->uc_mcontext.sc_ip;

    switch (host_signum) {

    case SIGILL:

    case SIGFPE:

    case SIGSEGV:

    case SIGBUS:

    case SIGTRAP:

        if (info->si_code && (info->si_segvflags & __ISR_VALID)) {

            

            is_write = (info->si_isr >> 33) & 1;

        }

        break;



    default:

        break;

    }

    return handle_cpu_signal(ip, (unsigned long)info->si_addr,

                             is_write,

                             (sigset_t *)&uc->uc_sigmask);

}

int FUNC_0(int VAR_0, void *VAR_1, void *VAR_2)

{

    siginfo_t *info = VAR_1;

    ucontext_t *uc = VAR_2;

    unsigned long VAR_3;

    int VAR_4 = 0;



    VAR_3 = uc->uc_mcontext.sc_ip;

    switch (VAR_0) {

    case SIGILL:

    case SIGFPE:

    case SIGSEGV:

    case SIGBUS:

    case SIGTRAP:

        if (info->si_code && (info->si_segvflags & __ISR_VALID)) {

            

            VAR_4 = (info->si_isr >> 33) & 1;

        }

        break;



    default:

        break;

    }

    return handle_cpu_signal(VAR_3, (unsigned long)info->si_addr,

                             VAR_4,

                             (sigset_t *)&uc->uc_sigmask);

}

int FUNC_0(int VAR_0, void *VAR_1, void *VAR_2)
{ siginfo_t *info = VAR_1; ucontext_t *uc = VAR_2; unsigned long VAR_3; int VAR_4 = 0; VAR_3 = uc->uc_mcontext.sc_ip; switch (VAR_0) { case SIGILL:
case SIGFPE:
case SIGSEGV:
case SIGBUS:
case SIGTRAP:
if (info->si_code && (info->si_segvflags & __ISR_VALID)) { VAR_4 = (info->si_isr >> 33) & 1; } break; default:
break; } return handle_cpu_signal(VAR_3, (unsigned long)info->si_addr,
VAR_4,
(sigset_t *)&uc->uc_sigmask); }