Changeset 12815


Ignore:
Timestamp:
Sep 11, 2009, 5:07:02 PM (10 years ago)
Author:
rme
Message:

Lisp kernel support for watching/unwatching objects on x8632.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/x86-gc.c

    r12807 r12815  
    29092909}
    29102910
     2911#ifdef X8664
    29112912static void
    29122913wp_update_xp(ExceptionInformation *xp, LispObj old, LispObj new)
     
    29142915  natural *regs = (natural *)xpGPRvector(xp);
    29152916
    2916 #ifdef X8664
    29172917  wp_maybe_update(&regs[Iarg_z], old, new);
    29182918  wp_maybe_update(&regs[Iarg_y], old, new);
     
    29262926  wp_maybe_update(&regs[Itemp1], old, new);
    29272927  wp_maybe_update(&regs[Itemp2], old, new);
    2928 #endif
    29292928
    29302929#if 0
     
    29352934  update_locref(&(regs[Iip]));
    29362935#endif
    2937 
    2938 }
     2936}
     2937#else
     2938static void
     2939wp_update_xp(ExceptionInformation *xp, LispObj old, LispObj new, natural node_regs_mask)
     2940{
     2941  natural *regs = (natural *)xpGPRvector(xp);
     2942
     2943  if (node_regs_mask & (1<<0)) wp_maybe_update(&regs[REG_EAX], old, new);
     2944  if (node_regs_mask & (1<<1)) wp_maybe_update(&regs[REG_ECX], old, new);
     2945
     2946  if (regs[REG_EFL] & EFL_DF) {
     2947    /* then EDX is an imm reg */
     2948    ;
     2949  } else
     2950    if (node_regs_mask & (1<<2)) wp_maybe_update(&regs[REG_EDX], old, new);
     2951
     2952  if (node_regs_mask & (1<<3)) wp_maybe_update(&regs[REG_EBX], old, new);
     2953  if (node_regs_mask & (1<<4)) wp_maybe_update(&regs[REG_ESP], old, new);
     2954  if (node_regs_mask & (1<<5)) wp_maybe_update(&regs[REG_EBP], old, new);
     2955  if (node_regs_mask & (1<<6)) wp_maybe_update(&regs[REG_ESI], old, new);
     2956  if (node_regs_mask & (1<<7)) wp_maybe_update(&regs[REG_EDI], old, new);
     2957  /* we shouldn't watch functions, so no need to update PC */
     2958}
     2959#endif
    29392960
    29402961static void
     
    29442965  ExceptionInformation *xp;
    29452966
    2946 #ifdef X8664
    29472967  xp = tcr->gc_context;
    29482968  if (xp) {
     2969#ifdef X8664
    29492970    wp_update_xp(xp, old, new);
     2971#else
     2972    wp_update_xp(xp, old, new, tcr->node_regs_mask);
     2973    wp_maybe_update(&tcr->save0, old, new);
     2974    wp_maybe_update(&tcr->save1, old, new);
     2975    wp_maybe_update(&tcr->save2, old, new);
     2976    wp_maybe_update(&tcr->save3, old, new);
     2977    wp_maybe_update(&tcr->next_method_context, old, new);
     2978#endif
    29502979  }
    29512980  for (xframes = tcr->xframe; xframes; xframes = xframes->prev) {
     2981#ifdef X8664
    29522982    wp_update_xp(xframes->curr, old, new);
    2953   }
    2954 #endif
     2983#else
     2984    wp_update_xp(xframes->curr, old, new, xframes->node_regs_mask);
     2985#endif
     2986  }
    29552987}
    29562988
Note: See TracChangeset for help on using the changeset viewer.