ccregs.hh revision 10338
110338SCurtis.Dunham@arm.com/*
210338SCurtis.Dunham@arm.com * Copyright (c) 2014 ARM Limited
310338SCurtis.Dunham@arm.com * All rights reserved
410338SCurtis.Dunham@arm.com *
510338SCurtis.Dunham@arm.com * The license below extends only to copyright in the software and shall
610338SCurtis.Dunham@arm.com * not be construed as granting a license to any other intellectual
710338SCurtis.Dunham@arm.com * property including but not limited to intellectual property relating
810338SCurtis.Dunham@arm.com * to a hardware implementation of the functionality of the software
910338SCurtis.Dunham@arm.com * licensed hereunder.  You may use the software subject to the license
1010338SCurtis.Dunham@arm.com * terms below provided that you ensure that this notice is replicated
1110338SCurtis.Dunham@arm.com * unmodified and in its entirety in all distributions of the software,
1210338SCurtis.Dunham@arm.com * modified or unmodified, in source code or in binary form.
1310338SCurtis.Dunham@arm.com *
1410338SCurtis.Dunham@arm.com * Redistribution and use in source and binary forms, with or without
1510338SCurtis.Dunham@arm.com * modification, are permitted provided that the following conditions are
1610338SCurtis.Dunham@arm.com * met: redistributions of source code must retain the above copyright
1710338SCurtis.Dunham@arm.com * notice, this list of conditions and the following disclaimer;
1810338SCurtis.Dunham@arm.com * redistributions in binary form must reproduce the above copyright
1910338SCurtis.Dunham@arm.com * notice, this list of conditions and the following disclaimer in the
2010338SCurtis.Dunham@arm.com * documentation and/or other materials provided with the distribution;
2110338SCurtis.Dunham@arm.com * neither the name of the copyright holders nor the names of its
2210338SCurtis.Dunham@arm.com * contributors may be used to endorse or promote products derived from
2310338SCurtis.Dunham@arm.com * this software without specific prior written permission.
2410338SCurtis.Dunham@arm.com *
2510338SCurtis.Dunham@arm.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2610338SCurtis.Dunham@arm.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2710338SCurtis.Dunham@arm.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2810338SCurtis.Dunham@arm.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2910338SCurtis.Dunham@arm.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3010338SCurtis.Dunham@arm.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3110338SCurtis.Dunham@arm.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3210338SCurtis.Dunham@arm.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3310338SCurtis.Dunham@arm.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3410338SCurtis.Dunham@arm.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3510338SCurtis.Dunham@arm.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3610338SCurtis.Dunham@arm.com *
3710338SCurtis.Dunham@arm.com * Authors: Curtis Dunham
3810338SCurtis.Dunham@arm.com */
3910338SCurtis.Dunham@arm.com#ifndef __ARCH_ARM_CCREGS_HH__
4010338SCurtis.Dunham@arm.com#define __ARCH_ARM_CCREGS_HH__
4110338SCurtis.Dunham@arm.com
4210338SCurtis.Dunham@arm.comnamespace ArmISA
4310338SCurtis.Dunham@arm.com{
4410338SCurtis.Dunham@arm.com
4510338SCurtis.Dunham@arm.comenum ccRegIndex {
4610338SCurtis.Dunham@arm.com    CCREG_NZ,
4710338SCurtis.Dunham@arm.com    CCREG_C,
4810338SCurtis.Dunham@arm.com    CCREG_V,
4910338SCurtis.Dunham@arm.com    CCREG_GE,
5010338SCurtis.Dunham@arm.com    CCREG_FP,
5110338SCurtis.Dunham@arm.com    CCREG_ZERO,
5210338SCurtis.Dunham@arm.com    NUM_CCREGS
5310338SCurtis.Dunham@arm.com};
5410338SCurtis.Dunham@arm.com
5510338SCurtis.Dunham@arm.comconst char * const ccRegName[NUM_CCREGS] = {
5610338SCurtis.Dunham@arm.com    "nz",
5710338SCurtis.Dunham@arm.com    "c",
5810338SCurtis.Dunham@arm.com    "v",
5910338SCurtis.Dunham@arm.com    "ge",
6010338SCurtis.Dunham@arm.com    "fp",
6110338SCurtis.Dunham@arm.com    "zero"
6210338SCurtis.Dunham@arm.com};
6310338SCurtis.Dunham@arm.com
6410338SCurtis.Dunham@arm.comenum ConditionCode {
6510338SCurtis.Dunham@arm.com    COND_EQ  =   0,
6610338SCurtis.Dunham@arm.com    COND_NE, //  1
6710338SCurtis.Dunham@arm.com    COND_CS, //  2
6810338SCurtis.Dunham@arm.com    COND_CC, //  3
6910338SCurtis.Dunham@arm.com    COND_MI, //  4
7010338SCurtis.Dunham@arm.com    COND_PL, //  5
7110338SCurtis.Dunham@arm.com    COND_VS, //  6
7210338SCurtis.Dunham@arm.com    COND_VC, //  7
7310338SCurtis.Dunham@arm.com    COND_HI, //  8
7410338SCurtis.Dunham@arm.com    COND_LS, //  9
7510338SCurtis.Dunham@arm.com    COND_GE, // 10
7610338SCurtis.Dunham@arm.com    COND_LT, // 11
7710338SCurtis.Dunham@arm.com    COND_GT, // 12
7810338SCurtis.Dunham@arm.com    COND_LE, // 13
7910338SCurtis.Dunham@arm.com    COND_AL, // 14
8010338SCurtis.Dunham@arm.com    COND_UC  // 15
8110338SCurtis.Dunham@arm.com};
8210338SCurtis.Dunham@arm.com
8310338SCurtis.Dunham@arm.com}
8410338SCurtis.Dunham@arm.com
8510338SCurtis.Dunham@arm.com#endif // __ARCH_ARM_CCREGS_HH__
86