public Exchange(RegVRef source, RegVRef dest, PointerIndex frame, SExpr addr) { if (addr.AsDirectField() == null && !addr.IsConstant()) { throw new ArgumentException("must be register field or constant", "addr"); } this.source = source; this.dest = dest; this.frame = frame; this.addr = addr; }
public Exchange(RegVRef reg, PointerIndex frame, SExpr addr) : this(reg, reg, frame, addr) { }
public Push(RegVRef reg, PointerIndex stack = PointerIndex.CallStack) { this.reg = reg; this.stack = stack; }
public Exchange(RegVRef reg, PointerIndex frame = PointerIndex.CallStack) : this(reg, frame, IntSExpr.Zero) { }
public static FieldSRef Pointer(PointerIndex ptr) { string[] ptrnames = { "err", "callstack", "progbase", "progdata", "localdata" }; return(new FieldSRef(RegVRef.rIndex, ptrnames[(int)ptr])); }