crashanalysercmd/PerfToolsSharedLibraries/Engine/SymbianInstructionLib/Arm/Instructions/Arm/DataTransfer/Arm_FSTMS.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.Registers.VFP;
       
    23 using SymbianStructuresLib.Arm.Instructions;
       
    24 using SymbianInstructionLib.Arm.Instructions.Common;
       
    25 
       
    26 namespace SymbianInstructionLib.Arm.Instructions.Arm.DataTransfer
       
    27 {
       
    28     [ArmRefAttribute( "C4.1.57 FSTMS", "FSTM<addressing_mode>S{<cond>} <Rn>{!}, <registers>" )]
       
    29     public class Arm_FSTMS : Arm_LoadOrStoreMultiple_VFP
       
    30     {
       
    31         #region Constructors
       
    32         public Arm_FSTMS()
       
    33         {
       
    34             // Same as FSTMDBS (non-stacking)
       
    35             //
       
    36             // 1110 => Condition = "Always"
       
    37             //  110 => FSTMD (1) instruction signature
       
    38             //    1 => P = addressing mode
       
    39             //    0 => U = addressing mode
       
    40             //    0 => ?
       
    41             //    1 => W = write a modified value back to its base register Rn
       
    42             //    0 => ?
       
    43             // 1101 => Rn = Specifies the base register used by <addressing_mode>. => SP
       
    44             // 
       
    45             //             Cond             PU     D     WL      Rn       Fd                offset
       
    46             base.SetMask( "####" + "110" + "##" + "#" + "#0" + "####" + "####" + "1010" + "########" );
       
    47         }
       
    48         #endregion
       
    49 
       
    50         #region From Arm_LoadOrStore
       
    51         public override TArmDataTransferType DataTransferType
       
    52         {
       
    53             get { return TArmDataTransferType.EStore; }
       
    54         }
       
    55         #endregion
       
    56 
       
    57         #region API
       
    58         #endregion
       
    59 
       
    60         #region Properties
       
    61         public override TArmRegisterTypeVFP FirstRegister
       
    62         {
       
    63             get
       
    64             {
       
    65                 // Get bits 15-12 inclusive
       
    66                 uint firstReg = Arm_LoadOrStoreMultiple_VFP.KMaskFirstReg.Apply( base.AIRawValue );
       
    67 
       
    68                 // Shift one to the left to make room for 'D'
       
    69                 firstReg <<= 1;
       
    70 
       
    71                 // Now add D
       
    72                 firstReg |= (uint) base.AIRawValue[ 22 ];
       
    73 
       
    74                 // We must rebase these in alignment with the first single precision register
       
    75                 // value.
       
    76                 TArmRegisterTypeVFP ret = (TArmRegisterTypeVFP) ( firstReg + (uint) TArmRegisterTypeVFP.S00 );
       
    77 
       
    78                 return ret;
       
    79             }
       
    80         }
       
    81 
       
    82         public override TArmRegisterTypeVFP[] Registers
       
    83         {
       
    84             get
       
    85             {
       
    86                 uint regCount = base.Offset;
       
    87                 uint firstReg = (uint) this.FirstRegister;
       
    88 
       
    89                 List<TArmRegisterTypeVFP> regs = new List<TArmRegisterTypeVFP>();
       
    90                 for ( uint i = firstReg; i < regCount + firstReg; i++ )
       
    91                 {
       
    92                     regs.Add( (TArmRegisterTypeVFP) i );
       
    93                 }
       
    94                 //
       
    95                 return regs.ToArray();
       
    96             }
       
    97         }
       
    98         #endregion
       
    99 
       
   100         #region Internal methods
       
   101         #endregion
       
   102 
       
   103         #region Data members
       
   104         #endregion
       
   105     }
       
   106 }
       
   107