intregs.hh revision 6721
16717Sgblack@eecs.umich.edu/*
26717Sgblack@eecs.umich.edu * Copyright (c) 2009 The Regents of The University of Michigan
36717Sgblack@eecs.umich.edu * All rights reserved.
46717Sgblack@eecs.umich.edu *
56717Sgblack@eecs.umich.edu * Redistribution and use in source and binary forms, with or without
66717Sgblack@eecs.umich.edu * modification, are permitted provided that the following conditions are
76717Sgblack@eecs.umich.edu * met: redistributions of source code must retain the above copyright
86717Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer;
96717Sgblack@eecs.umich.edu * redistributions in binary form must reproduce the above copyright
106717Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer in the
116717Sgblack@eecs.umich.edu * documentation and/or other materials provided with the distribution;
126717Sgblack@eecs.umich.edu * neither the name of the copyright holders nor the names of its
136717Sgblack@eecs.umich.edu * contributors may be used to endorse or promote products derived from
146717Sgblack@eecs.umich.edu * this software without specific prior written permission.
156717Sgblack@eecs.umich.edu *
166717Sgblack@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
176717Sgblack@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
186717Sgblack@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
196717Sgblack@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
206717Sgblack@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
216717Sgblack@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
226717Sgblack@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
236717Sgblack@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
246717Sgblack@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
256717Sgblack@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
266717Sgblack@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
276717Sgblack@eecs.umich.edu *
286717Sgblack@eecs.umich.edu * Authors: Gabe Black
296717Sgblack@eecs.umich.edu */
306717Sgblack@eecs.umich.edu
316717Sgblack@eecs.umich.edu#include <assert.h>
326717Sgblack@eecs.umich.edu
336717Sgblack@eecs.umich.edu#ifndef __ARCH_ARM_INTREGS_HH__
346717Sgblack@eecs.umich.edu#define __ARCH_ARM_INTREGS_HH__
356717Sgblack@eecs.umich.edu
366717Sgblack@eecs.umich.edunamespace ArmISA
376717Sgblack@eecs.umich.edu{
386717Sgblack@eecs.umich.edu
396717Sgblack@eecs.umich.eduenum IntRegIndex
406717Sgblack@eecs.umich.edu{
416717Sgblack@eecs.umich.edu    /* All the unique register indices. */
426717Sgblack@eecs.umich.edu    INTREG_R0,
436717Sgblack@eecs.umich.edu    INTREG_R1,
446717Sgblack@eecs.umich.edu    INTREG_R2,
456717Sgblack@eecs.umich.edu    INTREG_R3,
466717Sgblack@eecs.umich.edu    INTREG_R4,
476717Sgblack@eecs.umich.edu    INTREG_R5,
486717Sgblack@eecs.umich.edu    INTREG_R6,
496717Sgblack@eecs.umich.edu    INTREG_R7,
506717Sgblack@eecs.umich.edu    INTREG_R8,
516717Sgblack@eecs.umich.edu    INTREG_R9,
526717Sgblack@eecs.umich.edu    INTREG_R10,
536717Sgblack@eecs.umich.edu    INTREG_R11,
546717Sgblack@eecs.umich.edu    INTREG_R12,
556717Sgblack@eecs.umich.edu    INTREG_R13,
566717Sgblack@eecs.umich.edu    INTREG_SP = INTREG_R13,
576717Sgblack@eecs.umich.edu    INTREG_R14,
586717Sgblack@eecs.umich.edu    INTREG_LR = INTREG_R14,
596717Sgblack@eecs.umich.edu    INTREG_R15,
606717Sgblack@eecs.umich.edu    INTREG_PC = INTREG_R15,
616717Sgblack@eecs.umich.edu
626717Sgblack@eecs.umich.edu    INTREG_R13_SVC,
636717Sgblack@eecs.umich.edu    INTREG_SP_SVC = INTREG_R13_SVC,
646717Sgblack@eecs.umich.edu    INTREG_R14_SVC,
656717Sgblack@eecs.umich.edu    INTREG_LR_SVC = INTREG_R14_SVC,
666717Sgblack@eecs.umich.edu    INTREG_R15_SVC = INTREG_R15,
676717Sgblack@eecs.umich.edu
686717Sgblack@eecs.umich.edu    INTREG_R13_MON,
696717Sgblack@eecs.umich.edu    INTREG_SP_MON = INTREG_R13_MON,
706717Sgblack@eecs.umich.edu    INTREG_R14_MON,
716717Sgblack@eecs.umich.edu    INTREG_LR_MON = INTREG_R14_MON,
726717Sgblack@eecs.umich.edu    INTREG_R15_MON = INTREG_R15,
736717Sgblack@eecs.umich.edu
746717Sgblack@eecs.umich.edu    INTREG_R13_ABT,
756717Sgblack@eecs.umich.edu    INTREG_SP_ABT = INTREG_R13_ABT,
766717Sgblack@eecs.umich.edu    INTREG_R14_ABT,
776717Sgblack@eecs.umich.edu    INTREG_LR_ABT = INTREG_R14_ABT,
786717Sgblack@eecs.umich.edu    INTREG_R15_ABT = INTREG_R15,
796717Sgblack@eecs.umich.edu
806717Sgblack@eecs.umich.edu    INTREG_R13_UND,
816717Sgblack@eecs.umich.edu    INTREG_SP_UND = INTREG_R13_UND,
826717Sgblack@eecs.umich.edu    INTREG_R14_UND,
836717Sgblack@eecs.umich.edu    INTREG_LR_UND = INTREG_R14_UND,
846717Sgblack@eecs.umich.edu    INTREG_R15_UND = INTREG_R15,
856717Sgblack@eecs.umich.edu
866717Sgblack@eecs.umich.edu    INTREG_R13_IRQ,
876717Sgblack@eecs.umich.edu    INTREG_SP_IRQ = INTREG_R13_IRQ,
886717Sgblack@eecs.umich.edu    INTREG_R14_IRQ,
896717Sgblack@eecs.umich.edu    INTREG_LR_IRQ = INTREG_R14_IRQ,
906717Sgblack@eecs.umich.edu    INTREG_R15_IRQ = INTREG_R15,
916717Sgblack@eecs.umich.edu
926717Sgblack@eecs.umich.edu    INTREG_R8_FIQ,
936717Sgblack@eecs.umich.edu    INTREG_R9_FIQ,
946717Sgblack@eecs.umich.edu    INTREG_R10_FIQ,
956717Sgblack@eecs.umich.edu    INTREG_R11_FIQ,
966717Sgblack@eecs.umich.edu    INTREG_R12_FIQ,
976717Sgblack@eecs.umich.edu    INTREG_R13_FIQ,
986717Sgblack@eecs.umich.edu    INTREG_SP_FIQ = INTREG_R13_FIQ,
996717Sgblack@eecs.umich.edu    INTREG_R14_FIQ,
1006717Sgblack@eecs.umich.edu    INTREG_LR_FIQ = INTREG_R14_FIQ,
1016717Sgblack@eecs.umich.edu    INTREG_R15_FIQ = INTREG_R15,
1026717Sgblack@eecs.umich.edu
1036717Sgblack@eecs.umich.edu    INTREG_ZERO, // Dummy zero reg since there has to be one.
1046717Sgblack@eecs.umich.edu    INTREG_UREG0,
1056721Sgblack@eecs.umich.edu    INTREG_RHI,
1066721Sgblack@eecs.umich.edu    INTREG_RLO,
1076717Sgblack@eecs.umich.edu
1086717Sgblack@eecs.umich.edu    NUM_INTREGS,
1096717Sgblack@eecs.umich.edu    NUM_ARCH_INTREGS = INTREG_PC + 1,
1106717Sgblack@eecs.umich.edu
1116717Sgblack@eecs.umich.edu    /* All the aliased indexes. */
1126717Sgblack@eecs.umich.edu
1136717Sgblack@eecs.umich.edu    /* USR mode */
1146717Sgblack@eecs.umich.edu    INTREG_R0_USR = INTREG_R0,
1156717Sgblack@eecs.umich.edu    INTREG_R1_USR = INTREG_R1,
1166717Sgblack@eecs.umich.edu    INTREG_R2_USR = INTREG_R2,
1176717Sgblack@eecs.umich.edu    INTREG_R3_USR = INTREG_R3,
1186717Sgblack@eecs.umich.edu    INTREG_R4_USR = INTREG_R4,
1196717Sgblack@eecs.umich.edu    INTREG_R5_USR = INTREG_R5,
1206717Sgblack@eecs.umich.edu    INTREG_R6_USR = INTREG_R6,
1216717Sgblack@eecs.umich.edu    INTREG_R7_USR = INTREG_R7,
1226717Sgblack@eecs.umich.edu    INTREG_R8_USR = INTREG_R8,
1236717Sgblack@eecs.umich.edu    INTREG_R9_USR = INTREG_R9,
1246717Sgblack@eecs.umich.edu    INTREG_R10_USR = INTREG_R10,
1256717Sgblack@eecs.umich.edu    INTREG_R11_USR = INTREG_R11,
1266717Sgblack@eecs.umich.edu    INTREG_R12_USR = INTREG_R12,
1276717Sgblack@eecs.umich.edu    INTREG_R13_USR = INTREG_R13,
1286717Sgblack@eecs.umich.edu    INTREG_SP_USR = INTREG_SP,
1296717Sgblack@eecs.umich.edu    INTREG_R14_USR = INTREG_R14,
1306717Sgblack@eecs.umich.edu    INTREG_LR_USR = INTREG_LR,
1316717Sgblack@eecs.umich.edu    INTREG_R15_USR = INTREG_R15,
1326717Sgblack@eecs.umich.edu    INTREG_PC_USR = INTREG_PC,
1336717Sgblack@eecs.umich.edu
1346717Sgblack@eecs.umich.edu    /* SVC mode */
1356717Sgblack@eecs.umich.edu    INTREG_R0_SVC = INTREG_R0,
1366717Sgblack@eecs.umich.edu    INTREG_R1_SVC = INTREG_R1,
1376717Sgblack@eecs.umich.edu    INTREG_R2_SVC = INTREG_R2,
1386717Sgblack@eecs.umich.edu    INTREG_R3_SVC = INTREG_R3,
1396717Sgblack@eecs.umich.edu    INTREG_R4_SVC = INTREG_R4,
1406717Sgblack@eecs.umich.edu    INTREG_R5_SVC = INTREG_R5,
1416717Sgblack@eecs.umich.edu    INTREG_R6_SVC = INTREG_R6,
1426717Sgblack@eecs.umich.edu    INTREG_R7_SVC = INTREG_R7,
1436717Sgblack@eecs.umich.edu    INTREG_R8_SVC = INTREG_R8,
1446717Sgblack@eecs.umich.edu    INTREG_R9_SVC = INTREG_R9,
1456717Sgblack@eecs.umich.edu    INTREG_R10_SVC = INTREG_R10,
1466717Sgblack@eecs.umich.edu    INTREG_R11_SVC = INTREG_R11,
1476717Sgblack@eecs.umich.edu    INTREG_R12_SVC = INTREG_R12,
1486717Sgblack@eecs.umich.edu    INTREG_PC_SVC = INTREG_PC,
1496717Sgblack@eecs.umich.edu
1506717Sgblack@eecs.umich.edu    /* MON mode */
1516717Sgblack@eecs.umich.edu    INTREG_R0_MON = INTREG_R0,
1526717Sgblack@eecs.umich.edu    INTREG_R1_MON = INTREG_R1,
1536717Sgblack@eecs.umich.edu    INTREG_R2_MON = INTREG_R2,
1546717Sgblack@eecs.umich.edu    INTREG_R3_MON = INTREG_R3,
1556717Sgblack@eecs.umich.edu    INTREG_R4_MON = INTREG_R4,
1566717Sgblack@eecs.umich.edu    INTREG_R5_MON = INTREG_R5,
1576717Sgblack@eecs.umich.edu    INTREG_R6_MON = INTREG_R6,
1586717Sgblack@eecs.umich.edu    INTREG_R7_MON = INTREG_R7,
1596717Sgblack@eecs.umich.edu    INTREG_R8_MON = INTREG_R8,
1606717Sgblack@eecs.umich.edu    INTREG_R9_MON = INTREG_R9,
1616717Sgblack@eecs.umich.edu    INTREG_R10_MON = INTREG_R10,
1626717Sgblack@eecs.umich.edu    INTREG_R11_MON = INTREG_R11,
1636717Sgblack@eecs.umich.edu    INTREG_R12_MON = INTREG_R12,
1646717Sgblack@eecs.umich.edu    INTREG_PC_MON = INTREG_PC,
1656717Sgblack@eecs.umich.edu
1666717Sgblack@eecs.umich.edu    /* ABT mode */
1676717Sgblack@eecs.umich.edu    INTREG_R0_ABT = INTREG_R0,
1686717Sgblack@eecs.umich.edu    INTREG_R1_ABT = INTREG_R1,
1696717Sgblack@eecs.umich.edu    INTREG_R2_ABT = INTREG_R2,
1706717Sgblack@eecs.umich.edu    INTREG_R3_ABT = INTREG_R3,
1716717Sgblack@eecs.umich.edu    INTREG_R4_ABT = INTREG_R4,
1726717Sgblack@eecs.umich.edu    INTREG_R5_ABT = INTREG_R5,
1736717Sgblack@eecs.umich.edu    INTREG_R6_ABT = INTREG_R6,
1746717Sgblack@eecs.umich.edu    INTREG_R7_ABT = INTREG_R7,
1756717Sgblack@eecs.umich.edu    INTREG_R8_ABT = INTREG_R8,
1766717Sgblack@eecs.umich.edu    INTREG_R9_ABT = INTREG_R9,
1776717Sgblack@eecs.umich.edu    INTREG_R10_ABT = INTREG_R10,
1786717Sgblack@eecs.umich.edu    INTREG_R11_ABT = INTREG_R11,
1796717Sgblack@eecs.umich.edu    INTREG_R12_ABT = INTREG_R12,
1806717Sgblack@eecs.umich.edu    INTREG_PC_ABT = INTREG_PC,
1816717Sgblack@eecs.umich.edu
1826717Sgblack@eecs.umich.edu    /* UND mode */
1836717Sgblack@eecs.umich.edu    INTREG_R0_UND = INTREG_R0,
1846717Sgblack@eecs.umich.edu    INTREG_R1_UND = INTREG_R1,
1856717Sgblack@eecs.umich.edu    INTREG_R2_UND = INTREG_R2,
1866717Sgblack@eecs.umich.edu    INTREG_R3_UND = INTREG_R3,
1876717Sgblack@eecs.umich.edu    INTREG_R4_UND = INTREG_R4,
1886717Sgblack@eecs.umich.edu    INTREG_R5_UND = INTREG_R5,
1896717Sgblack@eecs.umich.edu    INTREG_R6_UND = INTREG_R6,
1906717Sgblack@eecs.umich.edu    INTREG_R7_UND = INTREG_R7,
1916717Sgblack@eecs.umich.edu    INTREG_R8_UND = INTREG_R8,
1926717Sgblack@eecs.umich.edu    INTREG_R9_UND = INTREG_R9,
1936717Sgblack@eecs.umich.edu    INTREG_R10_UND = INTREG_R10,
1946717Sgblack@eecs.umich.edu    INTREG_R11_UND = INTREG_R11,
1956717Sgblack@eecs.umich.edu    INTREG_R12_UND = INTREG_R12,
1966717Sgblack@eecs.umich.edu    INTREG_PC_UND = INTREG_PC,
1976717Sgblack@eecs.umich.edu
1986717Sgblack@eecs.umich.edu    /* IRQ mode */
1996717Sgblack@eecs.umich.edu    INTREG_R0_IRQ = INTREG_R0,
2006717Sgblack@eecs.umich.edu    INTREG_R1_IRQ = INTREG_R1,
2016717Sgblack@eecs.umich.edu    INTREG_R2_IRQ = INTREG_R2,
2026717Sgblack@eecs.umich.edu    INTREG_R3_IRQ = INTREG_R3,
2036717Sgblack@eecs.umich.edu    INTREG_R4_IRQ = INTREG_R4,
2046717Sgblack@eecs.umich.edu    INTREG_R5_IRQ = INTREG_R5,
2056717Sgblack@eecs.umich.edu    INTREG_R6_IRQ = INTREG_R6,
2066717Sgblack@eecs.umich.edu    INTREG_R7_IRQ = INTREG_R7,
2076717Sgblack@eecs.umich.edu    INTREG_R8_IRQ = INTREG_R8,
2086717Sgblack@eecs.umich.edu    INTREG_R9_IRQ = INTREG_R9,
2096717Sgblack@eecs.umich.edu    INTREG_R10_IRQ = INTREG_R10,
2106717Sgblack@eecs.umich.edu    INTREG_R11_IRQ = INTREG_R11,
2116717Sgblack@eecs.umich.edu    INTREG_R12_IRQ = INTREG_R12,
2126717Sgblack@eecs.umich.edu    INTREG_PC_IRQ = INTREG_PC,
2136717Sgblack@eecs.umich.edu
2146717Sgblack@eecs.umich.edu    /* FIQ mode */
2156717Sgblack@eecs.umich.edu    INTREG_R0_FIQ = INTREG_R0,
2166717Sgblack@eecs.umich.edu    INTREG_R1_FIQ = INTREG_R1,
2176717Sgblack@eecs.umich.edu    INTREG_R2_FIQ = INTREG_R2,
2186717Sgblack@eecs.umich.edu    INTREG_R3_FIQ = INTREG_R3,
2196717Sgblack@eecs.umich.edu    INTREG_R4_FIQ = INTREG_R4,
2206717Sgblack@eecs.umich.edu    INTREG_R5_FIQ = INTREG_R5,
2216717Sgblack@eecs.umich.edu    INTREG_R6_FIQ = INTREG_R6,
2226717Sgblack@eecs.umich.edu    INTREG_R7_FIQ = INTREG_R7,
2236717Sgblack@eecs.umich.edu    INTREG_PC_FIQ = INTREG_PC,
2246717Sgblack@eecs.umich.edu};
2256717Sgblack@eecs.umich.edu
2266717Sgblack@eecs.umich.edutypedef IntRegIndex IntRegMap[NUM_ARCH_INTREGS];
2276717Sgblack@eecs.umich.edu
2286717Sgblack@eecs.umich.educonst IntRegMap IntRegUsrMap = {
2296717Sgblack@eecs.umich.edu    INTREG_R0_USR,  INTREG_R1_USR,  INTREG_R2_USR,  INTREG_R3_USR,
2306717Sgblack@eecs.umich.edu    INTREG_R4_USR,  INTREG_R5_USR,  INTREG_R6_USR,  INTREG_R7_USR,
2316717Sgblack@eecs.umich.edu    INTREG_R8_USR,  INTREG_R9_USR,  INTREG_R10_USR, INTREG_R11_USR,
2326717Sgblack@eecs.umich.edu    INTREG_R12_USR, INTREG_R13_USR, INTREG_R14_USR, INTREG_R15_USR
2336717Sgblack@eecs.umich.edu};
2346717Sgblack@eecs.umich.edu
2356717Sgblack@eecs.umich.edustatic inline IntRegIndex
2366717Sgblack@eecs.umich.eduINTREG_USR(unsigned index)
2376717Sgblack@eecs.umich.edu{
2386717Sgblack@eecs.umich.edu    assert(index < NUM_ARCH_INTREGS);
2396717Sgblack@eecs.umich.edu    return IntRegUsrMap[index];
2406717Sgblack@eecs.umich.edu}
2416717Sgblack@eecs.umich.edu
2426717Sgblack@eecs.umich.educonst IntRegMap IntRegSvcMap = {
2436717Sgblack@eecs.umich.edu    INTREG_R0_SVC,  INTREG_R1_SVC,  INTREG_R2_SVC,  INTREG_R3_SVC,
2446717Sgblack@eecs.umich.edu    INTREG_R4_SVC,  INTREG_R5_SVC,  INTREG_R6_SVC,  INTREG_R7_SVC,
2456717Sgblack@eecs.umich.edu    INTREG_R8_SVC,  INTREG_R9_SVC,  INTREG_R10_SVC, INTREG_R11_SVC,
2466717Sgblack@eecs.umich.edu    INTREG_R12_SVC, INTREG_R13_SVC, INTREG_R14_SVC, INTREG_R15_SVC
2476717Sgblack@eecs.umich.edu};
2486717Sgblack@eecs.umich.edu
2496717Sgblack@eecs.umich.edustatic inline IntRegIndex
2506717Sgblack@eecs.umich.eduINTREG_SVC(unsigned index)
2516717Sgblack@eecs.umich.edu{
2526717Sgblack@eecs.umich.edu    assert(index < NUM_ARCH_INTREGS);
2536717Sgblack@eecs.umich.edu    return IntRegSvcMap[index];
2546717Sgblack@eecs.umich.edu}
2556717Sgblack@eecs.umich.edu
2566717Sgblack@eecs.umich.educonst IntRegMap IntRegMonMap = {
2576717Sgblack@eecs.umich.edu    INTREG_R0_MON,  INTREG_R1_MON,  INTREG_R2_MON,  INTREG_R3_MON,
2586717Sgblack@eecs.umich.edu    INTREG_R4_MON,  INTREG_R5_MON,  INTREG_R6_MON,  INTREG_R7_MON,
2596717Sgblack@eecs.umich.edu    INTREG_R8_MON,  INTREG_R9_MON,  INTREG_R10_MON, INTREG_R11_MON,
2606717Sgblack@eecs.umich.edu    INTREG_R12_MON, INTREG_R13_MON, INTREG_R14_MON, INTREG_R15_MON
2616717Sgblack@eecs.umich.edu};
2626717Sgblack@eecs.umich.edu
2636717Sgblack@eecs.umich.edustatic inline IntRegIndex
2646717Sgblack@eecs.umich.eduINTREG_MON(unsigned index)
2656717Sgblack@eecs.umich.edu{
2666717Sgblack@eecs.umich.edu    assert(index < NUM_ARCH_INTREGS);
2676717Sgblack@eecs.umich.edu    return IntRegMonMap[index];
2686717Sgblack@eecs.umich.edu}
2696717Sgblack@eecs.umich.edu
2706717Sgblack@eecs.umich.educonst IntRegMap IntRegAbtMap = {
2716717Sgblack@eecs.umich.edu    INTREG_R0_ABT,  INTREG_R1_ABT,  INTREG_R2_ABT,  INTREG_R3_ABT,
2726717Sgblack@eecs.umich.edu    INTREG_R4_ABT,  INTREG_R5_ABT,  INTREG_R6_ABT,  INTREG_R7_ABT,
2736717Sgblack@eecs.umich.edu    INTREG_R8_ABT,  INTREG_R9_ABT,  INTREG_R10_ABT, INTREG_R11_ABT,
2746717Sgblack@eecs.umich.edu    INTREG_R12_ABT, INTREG_R13_ABT, INTREG_R14_ABT, INTREG_R15_ABT
2756717Sgblack@eecs.umich.edu};
2766717Sgblack@eecs.umich.edu
2776717Sgblack@eecs.umich.edustatic inline IntRegIndex
2786717Sgblack@eecs.umich.eduINTREG_ABT(unsigned index)
2796717Sgblack@eecs.umich.edu{
2806717Sgblack@eecs.umich.edu    assert(index < NUM_ARCH_INTREGS);
2816717Sgblack@eecs.umich.edu    return IntRegAbtMap[index];
2826717Sgblack@eecs.umich.edu}
2836717Sgblack@eecs.umich.edu
2846717Sgblack@eecs.umich.educonst IntRegMap IntRegUndMap = {
2856717Sgblack@eecs.umich.edu    INTREG_R0_UND,  INTREG_R1_UND,  INTREG_R2_UND,  INTREG_R3_UND,
2866717Sgblack@eecs.umich.edu    INTREG_R4_UND,  INTREG_R5_UND,  INTREG_R6_UND,  INTREG_R7_UND,
2876717Sgblack@eecs.umich.edu    INTREG_R8_UND,  INTREG_R9_UND,  INTREG_R10_UND, INTREG_R11_UND,
2886717Sgblack@eecs.umich.edu    INTREG_R12_UND, INTREG_R13_UND, INTREG_R14_UND, INTREG_R15_UND
2896717Sgblack@eecs.umich.edu};
2906717Sgblack@eecs.umich.edu
2916717Sgblack@eecs.umich.edustatic inline IntRegIndex
2926717Sgblack@eecs.umich.eduINTREG_UND(unsigned index)
2936717Sgblack@eecs.umich.edu{
2946717Sgblack@eecs.umich.edu    assert(index < NUM_ARCH_INTREGS);
2956717Sgblack@eecs.umich.edu    return IntRegUndMap[index];
2966717Sgblack@eecs.umich.edu}
2976717Sgblack@eecs.umich.edu
2986717Sgblack@eecs.umich.educonst IntRegMap IntRegIrqMap = {
2996717Sgblack@eecs.umich.edu    INTREG_R0_IRQ,  INTREG_R1_IRQ,  INTREG_R2_IRQ,  INTREG_R3_IRQ,
3006717Sgblack@eecs.umich.edu    INTREG_R4_IRQ,  INTREG_R5_IRQ,  INTREG_R6_IRQ,  INTREG_R7_IRQ,
3016717Sgblack@eecs.umich.edu    INTREG_R8_IRQ,  INTREG_R9_IRQ,  INTREG_R10_IRQ, INTREG_R11_IRQ,
3026717Sgblack@eecs.umich.edu    INTREG_R12_IRQ, INTREG_R13_IRQ, INTREG_R14_IRQ, INTREG_R15_IRQ
3036717Sgblack@eecs.umich.edu};
3046717Sgblack@eecs.umich.edu
3056717Sgblack@eecs.umich.edustatic inline IntRegIndex
3066717Sgblack@eecs.umich.eduINTREG_IRQ(unsigned index)
3076717Sgblack@eecs.umich.edu{
3086717Sgblack@eecs.umich.edu    assert(index < NUM_ARCH_INTREGS);
3096717Sgblack@eecs.umich.edu    return IntRegIrqMap[index];
3106717Sgblack@eecs.umich.edu}
3116717Sgblack@eecs.umich.edu
3126717Sgblack@eecs.umich.educonst IntRegMap IntRegFiqMap = {
3136717Sgblack@eecs.umich.edu    INTREG_R0_FIQ,  INTREG_R1_FIQ,  INTREG_R2_FIQ,  INTREG_R3_FIQ,
3146717Sgblack@eecs.umich.edu    INTREG_R4_FIQ,  INTREG_R5_FIQ,  INTREG_R6_FIQ,  INTREG_R7_FIQ,
3156717Sgblack@eecs.umich.edu    INTREG_R8_FIQ,  INTREG_R9_FIQ,  INTREG_R10_FIQ, INTREG_R11_FIQ,
3166717Sgblack@eecs.umich.edu    INTREG_R12_FIQ, INTREG_R13_FIQ, INTREG_R14_FIQ, INTREG_R15_FIQ
3176717Sgblack@eecs.umich.edu};
3186717Sgblack@eecs.umich.edu
3196717Sgblack@eecs.umich.edustatic inline IntRegIndex
3206717Sgblack@eecs.umich.eduINTREG_FIQ(unsigned index)
3216717Sgblack@eecs.umich.edu{
3226717Sgblack@eecs.umich.edu    assert(index < NUM_ARCH_INTREGS);
3236717Sgblack@eecs.umich.edu    return IntRegFiqMap[index];
3246717Sgblack@eecs.umich.edu}
3256717Sgblack@eecs.umich.edu
3266717Sgblack@eecs.umich.edu}
3276717Sgblack@eecs.umich.edu
3286717Sgblack@eecs.umich.edu#endif
329