crashanalysercmd/PerfToolsSharedLibraries/Engine/SymbianStructuresLib/Arm/Registers/VFP/ArmVectorFloatingPointUtils.cs
author Matti Laitinen <matti.t.laitinen@nokia.com>
Thu, 11 Feb 2010 15:50:58 +0200
changeset 0 818e61de6cd1
permissions -rw-r--r--
Add initial version of Crash Analyser cmdline under EPL
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     1
/*
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     8
*
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    11
*
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    12
* Contributors:
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    13
* 
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    14
* Description:
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    15
*
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    16
*/
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    17
using System;
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    18
using System.Collections.Generic;
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    19
using System.Text;
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    20
using SymbianStructuresLib.Arm.Registers;
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    21
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    22
namespace SymbianStructuresLib.Arm.Registers.VFP
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    23
{
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    24
    public static class ArmVectorFloatingPointUtils
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    25
    {
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    26
        public static int RegisterSizeInBits( TArmRegisterTypeVFP aRegister )
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    27
        {
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    28
            int ret = 32;
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    29
            int value = (int) aRegister;
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    30
            //
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    31
            if ( value >= 0 && value < (int) TArmRegisterTypeVFP.S00 )
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    32
            {
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    33
                ret *= 2;
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    34
            }
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    35
            //
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    36
            return ret;
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    37
        }
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    38
    }
818e61de6cd1 Add initial version of Crash Analyser cmdline under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    39
}