public static MemoryOperand IndirectPreDecr(PrimitiveType w, Reg r) { return(new MemoryOperand(w) { mode = AddressingMode.IndirectPreDecr, reg = r }); }
public static MemoryOperand IndirectDisplacement(PrimitiveType w, Reg r, int d) { return(new MemoryOperand(w) { mode = AddressingMode.IndirectDisplacement, reg = r, disp = d }); }
/// <summary> /// Returns true if the register is a strict subregister of one of the registers in the bitset. /// </summary> /// <param name="r"></param> /// <param name="regs"></param> /// <returns></returns> private bool IsSubRegisterOfRegisters(RegisterStorage rr, HashSet <RegisterStorage> regs) { foreach (var r2 in regs) { if (rr.IsSubRegisterOf(r2)) { return(true); } } return(false); }
private MemoryOperand(PrimitiveType width) : base(width) { reg = null !; }
public void RegReturn(RegisterStorage stg) { this.Return = stg; }
public void RegParam(RegisterStorage stg) { this.Parameters.Add(stg); }
Identifier StorageVisitor <Identifier> .VisitRegisterStorage(RegisterStorage reg) { return(EnsureRegister(reg)); }
public VectorUse(Address tblAddr, RegisterStorage idxReg) { TableAddress = tblAddr; IndexRegister = idxReg; }
public abstract void SetRegister(RegisterStorage r, Constant v);
public abstract bool TryGetRegister(string name, out RegisterStorage reg);
public virtual void RemoveAliases(ISet <RegisterStorage> ids, RegisterStorage reg) { ids.Remove(reg); }
public virtual RegisterStorage GetWidestSubregister(RegisterStorage reg, HashSet <RegisterStorage> regs) { return((regs.Contains(reg)) ? reg : null); }
public virtual RegisterStorage GetPart(RegisterStorage reg, DataType dt) { return(GetSubregister(reg, 0, dt.BitSize)); }
/// <summary> /// Get the improper subregister of <paramref name="reg"/> that starts /// at offset <paramref name="offset"/> and is of size /// <paramref name="width"/>. /// </summary> /// <remarks> /// Most architectures not have subregisters, and will use this /// default implementation. This method is overridden for /// architectures like x86 and Z80, where subregisters (ah al etc) /// do exist. /// </remarks> /// <param name="reg"></param> /// <param name="offset"></param> /// <param name="width"></param> /// <returns></returns> public virtual RegisterStorage GetSubregister(RegisterStorage reg, int offset, int width) { return((offset == 0 && reg.BitSize == (ulong)width) ? reg : null); }
public virtual IEnumerable <RegisterStorage> GetAliases(RegisterStorage reg) { yield return(reg); }
public void AddRegisterArgument(RegisterStorage reg) { AddInParam(binder.EnsureRegister(reg)); }
public abstract Constant GetRegister(RegisterStorage r);