crashanalysercmd/PerfToolsSharedLibraries/Engine/SymbianInstructionLib/Arm/Instructions/Arm/DataProcessing/Bases/Arm_DataProcessing.cs
changeset 0 818e61de6cd1
equal deleted inserted replaced
-1:000000000000 0:818e61de6cd1
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 * 
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 using System;
       
    18 using System.Collections.Generic;
       
    19 using System.Text;
       
    20 using System.ComponentModel;
       
    21 using SymbianStructuresLib.Arm.Registers;
       
    22 using SymbianStructuresLib.Arm.Instructions;
       
    23 using SymbianInstructionLib.Arm.Instructions.Common;
       
    24 
       
    25 namespace SymbianInstructionLib.Arm.Instructions.Arm.DataProcessing
       
    26 {
       
    27     public abstract class Arm_DataProcessing : ArmInstruction
       
    28     {
       
    29         #region Enumerations
       
    30         public enum TEncoding
       
    31         {
       
    32             EEncodingNotSupported = -1,
       
    33             EEncoding32BitImmediate = 0,
       
    34             EEncodingShiftsImmediate,
       
    35             EEncodingShiftsRegister
       
    36         }
       
    37         #endregion
       
    38 
       
    39         #region Constructors
       
    40         protected Arm_DataProcessing( TEncoding aEncoding )
       
    41         {
       
    42             iEncoding = aEncoding;
       
    43             base.AIGroup = SymbianStructuresLib.Arm.Instructions.TArmInstructionGroup.EGroupDataProcessing;
       
    44         }
       
    45         #endregion
       
    46 
       
    47         #region From ArmBaseInstruction
       
    48         protected override bool DoQueryInvolvementAsSource( TArmRegisterType aRegister )
       
    49         {
       
    50             TArmRegisterType reg1 = Rn;
       
    51             return ( aRegister == reg1 );
       
    52         }
       
    53 
       
    54         protected override bool DoQueryInvolvementAsDestination( TArmRegisterType aRegister )
       
    55         {
       
    56             TArmRegisterType reg = Rd;
       
    57             return ( aRegister == reg );
       
    58         }
       
    59         #endregion
       
    60 
       
    61         #region Framework API
       
    62         public virtual uint Immediate
       
    63         {
       
    64             get { return 0; }
       
    65         }
       
    66 
       
    67         public virtual bool SuppliesImmediate
       
    68         {
       
    69             get { return false; }
       
    70         }
       
    71         #endregion
       
    72 
       
    73         #region Properties
       
    74         public TEncoding Encoding
       
    75         {
       
    76             get { return iEncoding; }
       
    77         }
       
    78 
       
    79         public TArmDataProcessingType OperationType
       
    80         {
       
    81             get
       
    82             {
       
    83                 TArmDataProcessingType ret = (TArmDataProcessingType) base.AIRawValue[ 24, 21 ].ToUInt();
       
    84                 return ret;
       
    85             }
       
    86         }
       
    87 
       
    88         public TArmRegisterType Rn
       
    89         {
       
    90             get
       
    91             {
       
    92                 TArmRegisterType ret = (TArmRegisterType) base.AIRawValue[ 19, 16 ].ToUInt();
       
    93                 return ret;
       
    94             }
       
    95         }
       
    96 
       
    97         public TArmRegisterType Rd
       
    98         {
       
    99             get
       
   100             {
       
   101                 TArmRegisterType ret = (TArmRegisterType) base.AIRawValue[ 15, 12 ].ToUInt();
       
   102                 return ret;
       
   103             }
       
   104         }
       
   105         #endregion
       
   106 
       
   107         #region Internal methods
       
   108         #endregion
       
   109 
       
   110         #region Data members
       
   111         private readonly TEncoding iEncoding;
       
   112         #endregion
       
   113     }
       
   114 }
       
   115