Commit 90cb94935228cc064f99fe98e70a8ea5deefb689

Authored by bellard
1 parent db6e6ed7

s390 bits


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1530 c046a42c-6fe2-441c-8c8c-71466251a162
cpu-exec.c
... ... @@ -1280,6 +1280,23 @@ int cpu_signal_handler(int host_signum, struct siginfo *info, void *puc)
1280 1280 &uc->uc_sigmask, puc);
1281 1281 }
1282 1282  
  1283 +#elif defined(__s390__)
  1284 +
  1285 +int cpu_signal_handler(int host_signum, struct siginfo *info,
  1286 + void *puc)
  1287 +{
  1288 + struct ucontext *uc = puc;
  1289 + unsigned long pc;
  1290 + int is_write;
  1291 +
  1292 + pc = uc->uc_mcontext.psw.addr;
  1293 + /* XXX: compute is_write */
  1294 + is_write = 0;
  1295 + return handle_cpu_signal(pc, (unsigned long)info->si_addr,
  1296 + is_write,
  1297 + &uc->uc_sigmask, puc);
  1298 +}
  1299 +
1283 1300 #else
1284 1301  
1285 1302 #error host CPU specific signal handler needed
... ...
dyngen-exec.h
... ... @@ -218,6 +218,7 @@ extern int __op_jmp0, __op_jmp1, __op_jmp2, __op_jmp3;
218 218 #endif
219 219 #ifdef __s390__
220 220 #define EXIT_TB() asm volatile ("br %r14")
  221 +#define GOTO_LABEL_PARAM(n) asm volatile ("b " ASM_NAME(__op_gen_label) #n)
221 222 #endif
222 223 #ifdef __alpha__
223 224 #define EXIT_TB() asm volatile ("ret")
... ...
... ... @@ -532,6 +532,15 @@ int64_t cpu_get_real_ticks(void)
532 532 return val;
533 533 }
534 534  
  535 +#elif defined(__s390__)
  536 +
  537 +int64_t cpu_get_real_ticks(void)
  538 +{
  539 + int64_t val;
  540 + asm volatile("stck 0(%1)" : "=m" (val) : "a" (&val) : "cc");
  541 + return val;
  542 +}
  543 +
535 544 #else
536 545 #error unsupported CPU
537 546 #endif
... ...