Changeset 9585


Ignore:
Timestamp:
May 23, 2008, 4:11:02 AM (11 years ago)
Author:
rme
Message:

forward_xp, mark_xp: Pay attention to node_regs_mask, and account for
the fact that the bits in the node reg mask don't correspond to the
order of registers in the mcontext.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ia32/lisp-kernel/x86-gc.c

    r9542 r9585  
    17201720#else
    17211721void
    1722 mark_xp(ExceptionInformation *xp, unsigned char node_regs_mask)
     1722mark_xp(ExceptionInformation *xp, natural node_regs_mask)
    17231723{
    17241724  natural *regs = (natural *) xpGPRvector(xp), dnode;
     
    17261726  int i;
    17271727
    1728   for (i = 0; i < 8; i++)
    1729     if (node_regs_mask & (1<<i))
    1730       mark_root(regs[i]);
     1728  if (node_regs_mask & (1<<0)) mark_root(regs[REG_EAX]);
     1729  if (node_regs_mask & (1<<1)) mark_root(regs[REG_EBX]);
     1730  if (node_regs_mask & (1<<2)) mark_root(regs[REG_ECX]);
     1731  if (node_regs_mask & (1<<3)) mark_root(regs[REG_EDX]);
     1732  if (node_regs_mask & (1<<4)) mark_root(regs[REG_ESP]);
     1733  if (node_regs_mask & (1<<5)) mark_root(regs[REG_EBP]);
     1734  if (node_regs_mask & (1<<6)) mark_root(regs[REG_ESI]);
     1735  if (node_regs_mask & (1<<7)) mark_root(regs[REG_EDI]);
    17311736
    17321737  /* If the EIP isn't pointing into a marked function, we're probably
     
    23722377}
    23732378
     2379#ifdef X8664
    23742380void
    23752381forward_xp(ExceptionInformation *xp)
     
    23772383  natural *regs = (natural *) xpGPRvector(xp);
    23782384
    2379 #ifdef X8664
    23802385  update_noderef(&(regs[Iarg_z]));
    23812386  update_noderef(&(regs[Iarg_y]));
     
    23902395  update_noderef(&(regs[Itemp2]));
    23912396  update_locref(&(regs[Iip]));
     2397}
    23922398#else
    2393   update_noderef(&(regs[Iarg_z]));
    2394   update_noderef(&(regs[Iarg_y]));
    2395   update_noderef(&(regs[Ifn]));
    2396   update_noderef(&(regs[Itemp0]));
    2397   update_noderef(&(regs[Itemp1]));
     2399void
     2400forward_xp(ExceptionInformation *xp, natural node_regs_mask)
     2401{
     2402  natural *regs = (natural *) xpGPRvector(xp);
     2403
     2404  if (node_regs_mask & (1<<0)) update_noderef(&regs[REG_EAX]);
     2405  if (node_regs_mask & (1<<1)) update_noderef(&regs[REG_EBX]);
     2406  if (node_regs_mask & (1<<2)) update_noderef(&regs[REG_ECX]);
     2407  if (node_regs_mask & (1<<3)) update_noderef(&regs[REG_EDX]);
     2408  if (node_regs_mask & (1<<4)) update_noderef(&regs[REG_ESP]);
     2409  if (node_regs_mask & (1<<5)) update_noderef(&regs[REG_EBP]);
     2410  if (node_regs_mask & (1<<6)) update_noderef(&regs[REG_ESI]);
     2411  if (node_regs_mask & (1<<7)) update_noderef(&regs[REG_EDI]);
     2412
    23982413  update_locref(&(regs[Iip]));
    23992414#endif
     
    24272442  xp = tcr->gc_context;
    24282443  if (xp) {
     2444#ifdef X8664
    24292445    forward_xp(xp);
     2446#else
     2447    forward_xp(xp, tcr->node_regs_mask);
     2448#endif
    24302449  }
    24312450  for (xframes = tcr->xframe; xframes; xframes = xframes->prev) {
     2451#ifdef X8664
    24322452    forward_xp(xframes->curr);
     2453#else
     2454    forward_xp(xframes->curr, xframes->node_regs_mask);
     2455#endif
    24332456  }
    24342457}
Note: See TracChangeset for help on using the changeset viewer.