Esempio n. 1
0
 /**
  * Returns if this operand is the 'same' as another operand.
  *
  * @param op other operand
  */
 public boolean similar(Operand op) {
   if (op instanceof MemoryOperand) {
     MemoryOperand mop = (MemoryOperand) op;
     if (base == null) {
       if (mop.base != null) return false;
     } else {
       if (mop.base == null) return false;
       if (!base.similar(mop.base)) return false;
     }
     if (index == null) {
       if (mop.index != null) return false;
     } else {
       if (mop.index == null) return false;
       if (!index.similar(mop.index)) return false;
     }
     return (mop.scale == scale) && (mop.disp.EQ(disp)) && (mop.size == size);
   } else {
     return false;
   }
 }