573 |
); |
); |
574 |
} |
} |
575 |
} |
} |
576 |
|
#elif defined(__ia64) |
577 |
|
struct fptr { |
578 |
|
void *ip; |
579 |
|
void *gp; |
580 |
|
} fp; |
581 |
|
|
582 |
|
fp.ip = tc_ptr; |
583 |
|
fp.gp = code_gen_buffer + 2 * (1 << 20); |
584 |
|
(*(void (*)(void)) &fp)(); |
585 |
#else |
#else |
586 |
gen_func(); |
gen_func(); |
587 |
#endif |
#endif |
1126 |
is_write, |
is_write, |
1127 |
&uc->uc_sigmask, puc); |
&uc->uc_sigmask, puc); |
1128 |
} |
} |
1129 |
|
|
1130 |
|
#elif defined(__ia64) |
1131 |
|
|
1132 |
|
#ifndef __ISR_VALID |
1133 |
|
/* This ought to be in <bits/siginfo.h>... */ |
1134 |
|
# define __ISR_VALID 1 |
1135 |
|
# define si_flags _sifields._sigfault._si_pad0 |
1136 |
|
#endif |
1137 |
|
|
1138 |
|
int cpu_signal_handler(int host_signum, struct siginfo *info, void *puc) |
1139 |
|
{ |
1140 |
|
struct ucontext *uc = puc; |
1141 |
|
unsigned long ip; |
1142 |
|
int is_write = 0; |
1143 |
|
|
1144 |
|
ip = uc->uc_mcontext.sc_ip; |
1145 |
|
switch (host_signum) { |
1146 |
|
case SIGILL: |
1147 |
|
case SIGFPE: |
1148 |
|
case SIGSEGV: |
1149 |
|
case SIGBUS: |
1150 |
|
case SIGTRAP: |
1151 |
|
if (info->si_code && (info->si_flags & __ISR_VALID)) |
1152 |
|
/* ISR.W (write-access) is bit 33: */ |
1153 |
|
is_write = (info->si_isr >> 33) & 1; |
1154 |
|
break; |
1155 |
|
|
1156 |
|
default: |
1157 |
|
break; |
1158 |
|
} |
1159 |
|
return handle_cpu_signal(ip, (unsigned long)info->si_addr, |
1160 |
|
is_write, |
1161 |
|
&uc->uc_sigmask, puc); |
1162 |
|
} |
1163 |
|
|
1164 |
#else |
#else |
1165 |
|
|