crashanalysercmd/PerfToolsSharedLibraries/Engine/SymbianInstructionLib/Arm/Instructions/Thumb/DataTransfer/Thumb_LDR_RelativeToSP.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 SymbianUtils.BasicTypes;
       
    21 using SymbianStructuresLib.Arm.Registers;
       
    22 using SymbianStructuresLib.Arm.Instructions;
       
    23 using SymbianInstructionLib.Arm.Instructions.Common;
       
    24 
       
    25 namespace SymbianInstructionLib.Arm.Instructions.Thumb.DataTransfer
       
    26 {
       
    27     [ArmRef( "A7.1.31 LDR (4)", "LDR <Rd>, [SP, #<immed_8> * 4]" )]
       
    28     public class Thumb_LDR_RelativeToSP : Thumb_LoadOrStore_Immediate8
       
    29     {
       
    30         #region Constructors
       
    31         public Thumb_LDR_RelativeToSP()
       
    32         {
       
    33             //                       Rd       immed_8
       
    34             base.SetMask( "10011" + "###" + "########" );
       
    35         }
       
    36         #endregion
       
    37 
       
    38         #region From ArmBaseInstruction
       
    39         protected override bool DoQueryInvolvementAsSource( TArmRegisterType aRegister )
       
    40         {
       
    41             // SP acts as source
       
    42             return ( aRegister == TArmRegisterType.EArmReg_SP );
       
    43         }
       
    44 
       
    45         protected override bool DoQueryInvolvementAsDestination( TArmRegisterType aRegister )
       
    46         {
       
    47             // Rd acts as destination
       
    48             TArmRegisterType reg = this.Rd;
       
    49             return ( aRegister == reg );
       
    50         }        
       
    51         #endregion
       
    52 
       
    53         #region From Thumb_LoadOrStore
       
    54         public override TArmDataTransferType DataTransferType
       
    55         {
       
    56             get { return TArmDataTransferType.ELoad; }
       
    57         }
       
    58         #endregion
       
    59 
       
    60         #region Properties
       
    61         #endregion
       
    62 
       
    63         #region Internal methods
       
    64         #endregion
       
    65 
       
    66         #region Data members
       
    67         #endregion
       
    68     }
       
    69 }
       
    70