Пример #1
0
        private static string GetVRNotation( Operand op )
        {
            int reg = op.Register.Ordinal;
            int mtx = ( reg >> 2 ) & 7;
            int idx = reg & 3;
            int fsl = 0;
            bool transpose = op.Transposed;
            char c;
            switch( op.DataSize )
            {
                case DataSize.V_Single:
                    transpose = false;
                    c = 'S';
                    fsl = ( reg >> 5 ) & 3;
                    break;
                case DataSize.V_Pair:
                    c = 'C';
                    fsl = ( reg >> 5 ) & 2;
                    break;
                case DataSize.V_Triple:
                    c = 'C';
                    fsl = ( reg >> 6 ) & 1;
                    break;
                case DataSize.V_Quad:
                    c = 'C';
                    fsl = ( reg >> 5 ) & 2;
                    break;

                case DataSize.V_2x2:
                    c = 'M';
                    fsl = ( reg >> 5 ) & 2;
                    break;
                case DataSize.V_3x3:
                    c = 'M';
                    fsl = ( reg >> 6 ) & 1;
                    break;
                case DataSize.V_4x4:
                    c = 'M';
                    fsl = ( reg >> 5 ) & 2;
                    break;
                default:
                case DataSize.V_Invalid:
                    c = 'I';
                    fsl = 0;
                    break;
            }
            if( transpose && c == 'C' )
                c = 'R';
            if( transpose && c == 'M' )
                c = 'E';
            return string.Format( "{0}{1}{2}{3}", c, mtx, idx, fsl );
        }
Пример #2
0
 private void ContextReturn()
 {
     this.Invalidate();
     _contextIndex = -1;
     _contextOperand = null;
 }
Пример #3
0
 public string GetResolvedOperandString( Operand op, bool hex )
 {
     if( this.Reference != null )
     {
         if( op.Type == OperandType.JumpTarget )
         {
             // Find external reference
             Label label = this.Reference as Label;
             if( label != null )
             {
                 return label.Name;
             }
             else
             {
                 if( this.ExternalReference != null )
                     return this.ExternalReference.Method.Name;
                 else
                     return op.ToString( hex );
             }
         }
         else if( op.Type == OperandType.BranchTarget )
         {
             // Find label
             Label label = this.Reference as Label;
             return label.Name;
         }
         else if( op.Type == OperandType.MemoryAccess )
         {
             // Find memory reference ??
             return op.ToString( hex );
         }
         else
             return op.ToString( hex );
     }
     else
         return op.ToString( hex );
 }