|
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 SymbianInstructionLib.Arm.Instructions.Common; |
|
23 |
|
24 namespace SymbianInstructionLib.Arm.Instructions.Thumb.DataProcessing |
|
25 { |
|
26 [ArmRef( "A7.1.5 ADD (3)", "ADD <Rd>, <Rn>, <Rm>" )] |
|
27 [ArmRef( "A7.1.67 SUB (3)", "SUB <Rd>, <Rn>, <Rm>" )] |
|
28 public class Thumb_AddOrSubtract_Register : Thumb_AddOrSubtract_2Regs |
|
29 { |
|
30 #region Constructors |
|
31 public Thumb_AddOrSubtract_Register() |
|
32 { |
|
33 // Type Rm Rn Rd |
|
34 base.SetMask( "000110" + "#" + "###" + "###" + "###" ); |
|
35 } |
|
36 #endregion |
|
37 |
|
38 #region From ArmBaseInstruction |
|
39 protected override bool DoQueryInvolvementAsSource( TArmRegisterType aRegister ) |
|
40 { |
|
41 TArmRegisterType reg1 = this.Rm; |
|
42 TArmRegisterType reg2 = this.Rn; |
|
43 return ( aRegister == reg1 || aRegister == reg2 ); |
|
44 } |
|
45 #endregion |
|
46 |
|
47 #region Properties |
|
48 public TArmRegisterType Rm |
|
49 { |
|
50 get |
|
51 { |
|
52 TArmRegisterType ret = (TArmRegisterType) KMaskRm.Apply( base.AIRawValue ); |
|
53 return ret; |
|
54 } |
|
55 } |
|
56 #endregion |
|
57 |
|
58 #region Internal methods |
|
59 #endregion |
|
60 |
|
61 #region Data members |
|
62 private static readonly SymMask KMaskRm = new SymMask( 0x1C0, SymMask.TShiftDirection.ERight, 6 ); |
|
63 #endregion |
|
64 } |
|
65 } |
|
66 |