- if (cpu_mode_is64bit()) {
- assert(sizeof(x86_sframe_compat32_t) % 16 == 0);
- iss_zone = zinit(sizeof(x86_sframe64_t),
- thread_max * sizeof(x86_sframe64_t),
- THREAD_CHUNK * sizeof(x86_sframe64_t),
- "x86_64 saved state");
-
- ids_zone = zinit(sizeof(x86_debug_state64_t),
- thread_max * sizeof(x86_debug_state64_t),
- THREAD_CHUNK * sizeof(x86_debug_state64_t),
- "x86_64 debug state");
-
- } else {
- iss_zone = zinit(sizeof(x86_sframe32_t),
- thread_max * sizeof(x86_sframe32_t),
- THREAD_CHUNK * sizeof(x86_sframe32_t),
- "x86 saved state");
- ids_zone = zinit(sizeof(x86_debug_state32_t),
- thread_max * (sizeof(x86_debug_state32_t)),
- THREAD_CHUNK * (sizeof(x86_debug_state32_t)),
- "x86 debug state");
- }
- fpu_module_init();
-}
-
-
-#if defined(__i386__)
-/*
- * Some routines for debugging activation code
- */
-static void dump_handlers(thread_t);
-void dump_regs(thread_t);
-int dump_act(thread_t thr_act);
-
-static void
-dump_handlers(thread_t thr_act)
-{
- ReturnHandler *rhp = thr_act->handlers;
- int counter = 0;
-
- printf("\t");
- while (rhp) {
- if (rhp == &thr_act->special_handler){
- if (rhp->next)
- printf("[NON-Zero next ptr(%p)]", rhp->next);
- printf("special_handler()->");
- break;
- }
- printf("hdlr_%d(%p)->", counter, rhp->handler);
- rhp = rhp->next;
- if (++counter > 32) {
- printf("Aborting: HUGE handler chain\n");
- break;
- }
- }
- printf("HLDR_NULL\n");
-}
-
-void
-dump_regs(thread_t thr_act)
-{
- if (thread_is_64bit(thr_act)) {
- x86_saved_state64_t *ssp;
-
- ssp = USER_REGS64(thr_act);