crashanalysercmd/PerfToolsSharedLibraries/Engine/SymbianInstructionLib/Arm/Instructions/Arm/DataTransfer/Bases/Arm_LoadOrStoreMultiple.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.Arm.DataTransfer
       
    26 {
       
    27     public abstract class Arm_LoadOrStoreMultiple : Arm_LoadOrStore
       
    28     {
       
    29         #region Constructors
       
    30         protected Arm_LoadOrStoreMultiple()
       
    31         {
       
    32         }
       
    33         #endregion
       
    34 
       
    35         #region From ArmBaseInstruction
       
    36         protected override bool DoQueryInvolvementAsSource( TArmRegisterType aRegister )
       
    37         {
       
    38             bool ret = false;
       
    39             //
       
    40             TArmDataTransferType type = this.DataTransferType;
       
    41             if ( type == TArmDataTransferType.EStore )
       
    42             {
       
    43                 // STMFD R13!, {R0 - R12, LR}
       
    44                 // r13 = dest, r0->r12, r14 are source registers
       
    45                 //
       
    46                 // Cannot test here, requires derived class to implement this check
       
    47             }
       
    48             else if ( type == TArmDataTransferType.ELoad )
       
    49             {
       
    50                 // LDMFD R13!, {R0 - R12, PC}
       
    51                 // r13 = source, r0->r12, r15 are destination registers
       
    52                 TArmRegisterType baseReg = this.BaseRegister;
       
    53                 ret = ( aRegister == baseReg );
       
    54             }
       
    55             //
       
    56             return ret;
       
    57         }
       
    58 
       
    59         protected override bool DoQueryInvolvementAsDestination( TArmRegisterType aRegister )
       
    60         {
       
    61             bool ret = false;
       
    62             //
       
    63             TArmDataTransferType type = this.DataTransferType;
       
    64             if ( type == TArmDataTransferType.EStore )
       
    65             {
       
    66                 // STMFD R13!, {R0 - R12, LR}
       
    67                 // r13 = dest, r0->r12, r14 are source registers
       
    68                 TArmRegisterType baseReg = this.BaseRegister;
       
    69                 ret = ( aRegister == baseReg );
       
    70             }
       
    71             else if ( type == TArmDataTransferType.ELoad )
       
    72             {
       
    73                 // LDMFD R13!, {R0 - R12, PC}
       
    74                 // r13 = source, r0->r12, r15 are destination registers
       
    75                 //
       
    76                 // Cannot test here, requires derived class to implement this check
       
    77             }
       
    78             //
       
    79             return ret;
       
    80         }
       
    81         #endregion
       
    82 
       
    83         #region API
       
    84         #endregion
       
    85 
       
    86         #region Properties
       
    87         public abstract TArmRegisterType BaseRegister
       
    88         {
       
    89             get;
       
    90         }
       
    91         #endregion
       
    92 
       
    93         #region Internal methods
       
    94         #endregion
       
    95 
       
    96         #region Data members
       
    97         #endregion
       
    98     }
       
    99 }
       
   100