Changeset 14438


Ignore:
Timestamp:
Nov 20, 2010, 3:19:00 AM (9 years ago)
Author:
gb
Message:

enable_fp_exceptions() just before callback in callback_to_lisp().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/ppc-exceptions.c

    r14197 r14438  
    15411541  tcr->save_tsp = (LispObj*) ptr_from_lispobj(xpGPR(xp, tsp));
    15421542
     1543#ifdef DARWIN
     1544  enable_fp_exceptions();
     1545#endif
    15431546
    15441547
     
    27222725    ts.__srr1 &= ~MSR_FE0_FE1_MASK;
    27232726  }
    2724   /*
    2725      Hack-o-rama warning (isn't it about time for such a warning?):
    2726      pthread_kill() seems to want to lose the MSR's FE0/FE1 bits.
    2727      Our handler for lisp's use of pthread_kill() pushes a phony
    2728      lisp frame on the stack and force the context to resume at
    2729      the UUO in enable_fp_exceptions(); the "saveLR" field of that
    2730      lisp frame contains the -real- address that process_interrupt
    2731      should have returned to, and the fact that it's in a lisp
    2732      frame should convince the GC to notice that address if it
    2733      runs in the tiny time window between returning from our
    2734      interrupt handler and ... here.
    2735      If the top frame on the stack is a lisp frame, discard it
    2736      and set ts.srr0 to the saveLR field in that frame.  Otherwise,
    2737      just adjust ts.srr0 to skip over the UUO.
    2738   */
    2739   {
    2740     lisp_frame *tos = (lisp_frame *)ts.__r1,
    2741       *next_frame = tos->backlink;
    2742    
    2743     if (tos == (next_frame -1)) {
    2744       ts.__srr0 = tos->savelr;
    2745       ts.__r1 = (LispObj) next_frame;
    2746     } else {
    2747       ts.__srr0 += 4;
    2748     }
    2749   }
     2727 
     2728  ts.__srr0 += 4;
    27502729  thread_set_state(thread,
    27512730#ifdef PPC64
Note: See TracChangeset for help on using the changeset viewer.