crashanalysercmd/PerfToolsSharedLibraries/Engine/SymbianInstructionLib/Arm/Instructions/Thumb/Branching/Thumb_Branch_WithExchange.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 SymbianStructuresLib.Arm.Registers;
       
    21 using SymbianStructuresLib.Arm.Instructions;
       
    22 using SymbianInstructionLib.Arm.Instructions.Common;
       
    23 
       
    24 namespace SymbianInstructionLib.Arm.Instructions.Thumb.Branching
       
    25 {
       
    26     public class Thumb_Branch_WithExchange : Thumb_Branch
       
    27     {
       
    28         #region Enumerations
       
    29         public enum TType
       
    30         {
       
    31             ETypeBX = 0,
       
    32             ETypeBLX
       
    33         }
       
    34         #endregion
       
    35 
       
    36         #region Constructors
       
    37         public Thumb_Branch_WithExchange()
       
    38         {
       
    39             //                          L    H2      Rm     SBZ
       
    40             base.SetMask( "01000111" + "#" + "#" + "###" + "000" );
       
    41         }
       
    42         #endregion
       
    43 
       
    44         #region From ArmBaseInstruction
       
    45         protected override bool DoQueryInvolvementAsSource( TArmRegisterType aRegister )
       
    46         {
       
    47             TArmRegisterType branchReg = this.Register;
       
    48             return ( aRegister == branchReg );
       
    49         }
       
    50         #endregion
       
    51 
       
    52         #region API
       
    53         #endregion
       
    54 
       
    55         #region Properties
       
    56         public TType Type
       
    57         {
       
    58             get
       
    59             {
       
    60                 TType ret = (TType) base.AIRawValue[ 7 ];
       
    61                 return ret;
       
    62             }
       
    63         }
       
    64 
       
    65         public TArmRegisterType Register
       
    66         {
       
    67             get
       
    68             {
       
    69                 // 10001111 0 011 000    0x4798              BLX      r3
       
    70                 // 10001110 1 110 000    0x4770              BX       lr
       
    71                 // 
       
    72                 TArmRegisterType ret = (TArmRegisterType) base.AIRawValue[ 6, 3 ].ToUInt();
       
    73                 return ret;
       
    74             }
       
    75         }
       
    76         #endregion
       
    77 
       
    78         #region Internal methods
       
    79         #endregion
       
    80 
       
    81         #region Data members
       
    82         #endregion
       
    83     }
       
    84 }
       
    85