Changeset 9746


Ignore:
Timestamp:
Jun 13, 2008, 7:45:44 PM (11 years ago)
Author:
gb
Message:

Get the link-inverting marker (at least mostly) working on ia32. Changes
(mostly) involve using fulltag_odd_fixnum for RMARK_PREV_CAR and
changing the CONS-walking code accordingly, treating
function_boundary_marker as something that can only exist in functions,
and using *boundary (not boundary[1]) to store the function displacement.

File:
1 edited

Legend:

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

    r9619 r9746  
    534534#ifdef X8664
    535535#define RMARK_PREV_ROOT fulltag_imm_1 /* fulltag of 'undefined' value */
    536 #define RMARK_PREV_CAR fulltag_nil /* fulltag_nil + node_size. Coincidence ? I think not. */
     536#define RMARK_PREV_CAR fulltag_nil /* fulltag_cons + node_size. Coincidence ? I think not. */
    537537#else
    538 #define RMARK_PREV_ROOT fulltag_imm
    539 #define RMARK_PREV_CAR fulltag_immheader
     538#define RMARK_PREV_ROOT fulltag_imm /* fulltag of 'undefined' value */
     539#define RMARK_PREV_CAR fulltag_odd_fixnum
    540540#endif
    541541
     
    811811      goto ClimbCar;
    812812
    813       /* default: abort() */
     813    default: abort();
    814814    }
    815815
     
    820820  MarkCons:
    821821    next = deref(this,1);
     822#ifdef X8632
     823    this += (RMARK_PREV_CAR-fulltag_cons);
     824#else
    822825    this += node_size;
     826#endif
    823827    tag_n = fulltag_of(next);
    824828    if (!is_node_fulltag(tag_n)) goto MarkCdr;
     
    838842  MarkCdr:
    839843    next = deref(this, 0);
     844#ifdef X8632
     845    this -= (RMARK_PREV_CAR-fulltag_cons);
     846#else
    840847    this -= node_size;
     848#endif
    841849    tag_n = fulltag_of(next);
    842850    if (!is_node_fulltag(tag_n)) goto Climb;
     
    915923       * we've finished marking the function vector.
    916924       */
    917       ((int *)boundary)[1] &= 0xff;
    918       ((int *)boundary)[1] |= (this-(LispObj)boundary) << 8;
     925      *((int *)boundary) &= 0xff;
     926      *((int *)boundary) |= ((this-(LispObj)boundary) << 8);
    919927      this = (LispObj)(base)+fulltag_misc;
    920928      dnode = gc_area_dnode(this);
     
    926934      if (subtag == subtag_function) {
    927935        boundary = base + (unsigned short)base[1];
    928         ((int *)boundary)[1] &= 0xff;
    929         ((int *)boundary)[1] |= (this-((LispObj)boundary)) << 8;
     936        *((int *)boundary) &= 0xff;
     937        *((int *)boundary) |= ((this-((LispObj)boundary)) << 8);
    930938      }
    931939    }
     
    9961004#else
    9971005    if ((tag_of(this) == tag_misc) &&
    998         (header_subtag(this) == subtag_function) &&
    9991006        (header_subtag(next) == function_boundary_marker)) goto MarkFunctionDone;
    10001007#endif
     
    10291036    (((int *)boundary)[1]) = 0;
    10301037#else
    1031     this = ((LispObj)boundary) + ((int *)boundary)[1] >> 8;
    1032     ((int *)boundary)[1] &= 0xff;
     1038    this = ((LispObj)boundary) + ((*((int *)boundary)) >> 8);
     1039    ((int *)boundary)[0] &= 0xff;
    10331040    goto Climb;
    10341041#endif
Note: See TracChangeset for help on using the changeset viewer.