|
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.56 FSTMD", "FSTM<addressing_mode>D{<cond>} <Rn>{!}, <registers>" )] |
|
29 public class Arm_FSTMD : Arm_LoadOrStoreMultiple_VFP |
|
30 { |
|
31 #region Constructors |
|
32 public Arm_FSTMD() |
|
33 { |
|
34 // Same as FSTMDBD (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 SWL Rn Dd offset |
|
46 base.SetMask( "####" + "110" + "##" + "0#0" + "####" + "####" + "1011" + "########" ); |
|
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 uint firstReg = Arm_LoadOrStoreMultiple_VFP.KMaskFirstReg.Apply( base.AIRawValue ); |
|
66 TArmRegisterTypeVFP ret = (TArmRegisterTypeVFP) firstReg; |
|
67 return ret; |
|
68 } |
|
69 } |
|
70 |
|
71 public override TArmRegisterTypeVFP[] Registers |
|
72 { |
|
73 get |
|
74 { |
|
75 uint offset = base.Offset; |
|
76 uint firstReg = (uint) this.FirstRegister; |
|
77 uint regCount = (uint) ( offset / 2 ); |
|
78 |
|
79 List<TArmRegisterTypeVFP> regs = new List<TArmRegisterTypeVFP>(); |
|
80 for ( uint i = firstReg; i < regCount + firstReg; i++ ) |
|
81 { |
|
82 regs.Add( (TArmRegisterTypeVFP) i ); |
|
83 } |
|
84 // |
|
85 return regs.ToArray(); |
|
86 } |
|
87 } |
|
88 #endregion |
|
89 |
|
90 #region Internal methods |
|
91 #endregion |
|
92 |
|
93 #region Data members |
|
94 #endregion |
|
95 } |
|
96 } |
|
97 |