示例#1
0
 public static MemoryOperand IndirectPreDecr(PrimitiveType w, Reg r)
 {
     return(new MemoryOperand(w)
     {
         mode = AddressingMode.IndirectPreDecr, reg = r
     });
 }
示例#2
0
 public static MemoryOperand IndirectDisplacement(PrimitiveType w, Reg r, int d)
 {
     return(new MemoryOperand(w)
     {
         mode = AddressingMode.IndirectDisplacement, reg = r, disp = d
     });
 }
示例#3
0
 /// <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);
 }
示例#4
0
 private MemoryOperand(PrimitiveType width) : base(width)
 {
     reg = null !;
 }
示例#5
0
 public void RegReturn(RegisterStorage stg)
 {
     this.Return = stg;
 }
示例#6
0
 public void RegParam(RegisterStorage stg)
 {
     this.Parameters.Add(stg);
 }
示例#7
0
 Identifier StorageVisitor <Identifier> .VisitRegisterStorage(RegisterStorage reg)
 {
     return(EnsureRegister(reg));
 }
示例#8
0
 public VectorUse(Address tblAddr, RegisterStorage idxReg)
 {
     TableAddress  = tblAddr;
     IndexRegister = idxReg;
 }
示例#9
0
 public abstract void SetRegister(RegisterStorage r, Constant v);
示例#10
0
 public abstract bool TryGetRegister(string name, out RegisterStorage reg);
示例#11
0
 public virtual void RemoveAliases(ISet <RegisterStorage> ids, RegisterStorage reg)
 {
     ids.Remove(reg);
 }
示例#12
0
 public virtual RegisterStorage GetWidestSubregister(RegisterStorage reg, HashSet <RegisterStorage> regs)
 {
     return((regs.Contains(reg)) ? reg : null);
 }
示例#13
0
 public virtual RegisterStorage GetPart(RegisterStorage reg, DataType dt)
 {
     return(GetSubregister(reg, 0, dt.BitSize));
 }
示例#14
0
 /// <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);
 }
示例#15
0
 public virtual IEnumerable <RegisterStorage> GetAliases(RegisterStorage reg)
 {
     yield return(reg);
 }
示例#16
0
 public void AddRegisterArgument(RegisterStorage reg)
 {
     AddInParam(binder.EnsureRegister(reg));
 }
示例#17
0
 public abstract Constant GetRegister(RegisterStorage r);