intregs.hh revision 6726
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, 1076724Sgblack@eecs.umich.edu INTREG_CONDCODES, 1086717Sgblack@eecs.umich.edu 1096717Sgblack@eecs.umich.edu NUM_INTREGS, 1106717Sgblack@eecs.umich.edu NUM_ARCH_INTREGS = INTREG_PC + 1, 1116717Sgblack@eecs.umich.edu 1126717Sgblack@eecs.umich.edu /* All the aliased indexes. */ 1136717Sgblack@eecs.umich.edu 1146717Sgblack@eecs.umich.edu /* USR mode */ 1156717Sgblack@eecs.umich.edu INTREG_R0_USR = INTREG_R0, 1166717Sgblack@eecs.umich.edu INTREG_R1_USR = INTREG_R1, 1176717Sgblack@eecs.umich.edu INTREG_R2_USR = INTREG_R2, 1186717Sgblack@eecs.umich.edu INTREG_R3_USR = INTREG_R3, 1196717Sgblack@eecs.umich.edu INTREG_R4_USR = INTREG_R4, 1206717Sgblack@eecs.umich.edu INTREG_R5_USR = INTREG_R5, 1216717Sgblack@eecs.umich.edu INTREG_R6_USR = INTREG_R6, 1226717Sgblack@eecs.umich.edu INTREG_R7_USR = INTREG_R7, 1236717Sgblack@eecs.umich.edu INTREG_R8_USR = INTREG_R8, 1246717Sgblack@eecs.umich.edu INTREG_R9_USR = INTREG_R9, 1256717Sgblack@eecs.umich.edu INTREG_R10_USR = INTREG_R10, 1266717Sgblack@eecs.umich.edu INTREG_R11_USR = INTREG_R11, 1276717Sgblack@eecs.umich.edu INTREG_R12_USR = INTREG_R12, 1286717Sgblack@eecs.umich.edu INTREG_R13_USR = INTREG_R13, 1296717Sgblack@eecs.umich.edu INTREG_SP_USR = INTREG_SP, 1306717Sgblack@eecs.umich.edu INTREG_R14_USR = INTREG_R14, 1316717Sgblack@eecs.umich.edu INTREG_LR_USR = INTREG_LR, 1326717Sgblack@eecs.umich.edu INTREG_R15_USR = INTREG_R15, 1336717Sgblack@eecs.umich.edu INTREG_PC_USR = INTREG_PC, 1346717Sgblack@eecs.umich.edu 1356717Sgblack@eecs.umich.edu /* SVC mode */ 1366717Sgblack@eecs.umich.edu INTREG_R0_SVC = INTREG_R0, 1376717Sgblack@eecs.umich.edu INTREG_R1_SVC = INTREG_R1, 1386717Sgblack@eecs.umich.edu INTREG_R2_SVC = INTREG_R2, 1396717Sgblack@eecs.umich.edu INTREG_R3_SVC = INTREG_R3, 1406717Sgblack@eecs.umich.edu INTREG_R4_SVC = INTREG_R4, 1416717Sgblack@eecs.umich.edu INTREG_R5_SVC = INTREG_R5, 1426717Sgblack@eecs.umich.edu INTREG_R6_SVC = INTREG_R6, 1436717Sgblack@eecs.umich.edu INTREG_R7_SVC = INTREG_R7, 1446717Sgblack@eecs.umich.edu INTREG_R8_SVC = INTREG_R8, 1456717Sgblack@eecs.umich.edu INTREG_R9_SVC = INTREG_R9, 1466717Sgblack@eecs.umich.edu INTREG_R10_SVC = INTREG_R10, 1476717Sgblack@eecs.umich.edu INTREG_R11_SVC = INTREG_R11, 1486717Sgblack@eecs.umich.edu INTREG_R12_SVC = INTREG_R12, 1496717Sgblack@eecs.umich.edu INTREG_PC_SVC = INTREG_PC, 1506717Sgblack@eecs.umich.edu 1516717Sgblack@eecs.umich.edu /* MON mode */ 1526717Sgblack@eecs.umich.edu INTREG_R0_MON = INTREG_R0, 1536717Sgblack@eecs.umich.edu INTREG_R1_MON = INTREG_R1, 1546717Sgblack@eecs.umich.edu INTREG_R2_MON = INTREG_R2, 1556717Sgblack@eecs.umich.edu INTREG_R3_MON = INTREG_R3, 1566717Sgblack@eecs.umich.edu INTREG_R4_MON = INTREG_R4, 1576717Sgblack@eecs.umich.edu INTREG_R5_MON = INTREG_R5, 1586717Sgblack@eecs.umich.edu INTREG_R6_MON = INTREG_R6, 1596717Sgblack@eecs.umich.edu INTREG_R7_MON = INTREG_R7, 1606717Sgblack@eecs.umich.edu INTREG_R8_MON = INTREG_R8, 1616717Sgblack@eecs.umich.edu INTREG_R9_MON = INTREG_R9, 1626717Sgblack@eecs.umich.edu INTREG_R10_MON = INTREG_R10, 1636717Sgblack@eecs.umich.edu INTREG_R11_MON = INTREG_R11, 1646717Sgblack@eecs.umich.edu INTREG_R12_MON = INTREG_R12, 1656717Sgblack@eecs.umich.edu INTREG_PC_MON = INTREG_PC, 1666717Sgblack@eecs.umich.edu 1676717Sgblack@eecs.umich.edu /* ABT mode */ 1686717Sgblack@eecs.umich.edu INTREG_R0_ABT = INTREG_R0, 1696717Sgblack@eecs.umich.edu INTREG_R1_ABT = INTREG_R1, 1706717Sgblack@eecs.umich.edu INTREG_R2_ABT = INTREG_R2, 1716717Sgblack@eecs.umich.edu INTREG_R3_ABT = INTREG_R3, 1726717Sgblack@eecs.umich.edu INTREG_R4_ABT = INTREG_R4, 1736717Sgblack@eecs.umich.edu INTREG_R5_ABT = INTREG_R5, 1746717Sgblack@eecs.umich.edu INTREG_R6_ABT = INTREG_R6, 1756717Sgblack@eecs.umich.edu INTREG_R7_ABT = INTREG_R7, 1766717Sgblack@eecs.umich.edu INTREG_R8_ABT = INTREG_R8, 1776717Sgblack@eecs.umich.edu INTREG_R9_ABT = INTREG_R9, 1786717Sgblack@eecs.umich.edu INTREG_R10_ABT = INTREG_R10, 1796717Sgblack@eecs.umich.edu INTREG_R11_ABT = INTREG_R11, 1806717Sgblack@eecs.umich.edu INTREG_R12_ABT = INTREG_R12, 1816717Sgblack@eecs.umich.edu INTREG_PC_ABT = INTREG_PC, 1826717Sgblack@eecs.umich.edu 1836717Sgblack@eecs.umich.edu /* UND mode */ 1846717Sgblack@eecs.umich.edu INTREG_R0_UND = INTREG_R0, 1856717Sgblack@eecs.umich.edu INTREG_R1_UND = INTREG_R1, 1866717Sgblack@eecs.umich.edu INTREG_R2_UND = INTREG_R2, 1876717Sgblack@eecs.umich.edu INTREG_R3_UND = INTREG_R3, 1886717Sgblack@eecs.umich.edu INTREG_R4_UND = INTREG_R4, 1896717Sgblack@eecs.umich.edu INTREG_R5_UND = INTREG_R5, 1906717Sgblack@eecs.umich.edu INTREG_R6_UND = INTREG_R6, 1916717Sgblack@eecs.umich.edu INTREG_R7_UND = INTREG_R7, 1926717Sgblack@eecs.umich.edu INTREG_R8_UND = INTREG_R8, 1936717Sgblack@eecs.umich.edu INTREG_R9_UND = INTREG_R9, 1946717Sgblack@eecs.umich.edu INTREG_R10_UND = INTREG_R10, 1956717Sgblack@eecs.umich.edu INTREG_R11_UND = INTREG_R11, 1966717Sgblack@eecs.umich.edu INTREG_R12_UND = INTREG_R12, 1976717Sgblack@eecs.umich.edu INTREG_PC_UND = INTREG_PC, 1986717Sgblack@eecs.umich.edu 1996717Sgblack@eecs.umich.edu /* IRQ mode */ 2006717Sgblack@eecs.umich.edu INTREG_R0_IRQ = INTREG_R0, 2016717Sgblack@eecs.umich.edu INTREG_R1_IRQ = INTREG_R1, 2026717Sgblack@eecs.umich.edu INTREG_R2_IRQ = INTREG_R2, 2036717Sgblack@eecs.umich.edu INTREG_R3_IRQ = INTREG_R3, 2046717Sgblack@eecs.umich.edu INTREG_R4_IRQ = INTREG_R4, 2056717Sgblack@eecs.umich.edu INTREG_R5_IRQ = INTREG_R5, 2066717Sgblack@eecs.umich.edu INTREG_R6_IRQ = INTREG_R6, 2076717Sgblack@eecs.umich.edu INTREG_R7_IRQ = INTREG_R7, 2086717Sgblack@eecs.umich.edu INTREG_R8_IRQ = INTREG_R8, 2096717Sgblack@eecs.umich.edu INTREG_R9_IRQ = INTREG_R9, 2106717Sgblack@eecs.umich.edu INTREG_R10_IRQ = INTREG_R10, 2116717Sgblack@eecs.umich.edu INTREG_R11_IRQ = INTREG_R11, 2126717Sgblack@eecs.umich.edu INTREG_R12_IRQ = INTREG_R12, 2136717Sgblack@eecs.umich.edu INTREG_PC_IRQ = INTREG_PC, 2146717Sgblack@eecs.umich.edu 2156717Sgblack@eecs.umich.edu /* FIQ mode */ 2166717Sgblack@eecs.umich.edu INTREG_R0_FIQ = INTREG_R0, 2176717Sgblack@eecs.umich.edu INTREG_R1_FIQ = INTREG_R1, 2186717Sgblack@eecs.umich.edu INTREG_R2_FIQ = INTREG_R2, 2196717Sgblack@eecs.umich.edu INTREG_R3_FIQ = INTREG_R3, 2206717Sgblack@eecs.umich.edu INTREG_R4_FIQ = INTREG_R4, 2216717Sgblack@eecs.umich.edu INTREG_R5_FIQ = INTREG_R5, 2226717Sgblack@eecs.umich.edu INTREG_R6_FIQ = INTREG_R6, 2236717Sgblack@eecs.umich.edu INTREG_R7_FIQ = INTREG_R7, 2246717Sgblack@eecs.umich.edu INTREG_PC_FIQ = INTREG_PC, 2256717Sgblack@eecs.umich.edu}; 2266717Sgblack@eecs.umich.edu 2276717Sgblack@eecs.umich.edutypedef IntRegIndex IntRegMap[NUM_ARCH_INTREGS]; 2286717Sgblack@eecs.umich.edu 2296717Sgblack@eecs.umich.educonst IntRegMap IntRegUsrMap = { 2306717Sgblack@eecs.umich.edu INTREG_R0_USR, INTREG_R1_USR, INTREG_R2_USR, INTREG_R3_USR, 2316717Sgblack@eecs.umich.edu INTREG_R4_USR, INTREG_R5_USR, INTREG_R6_USR, INTREG_R7_USR, 2326717Sgblack@eecs.umich.edu INTREG_R8_USR, INTREG_R9_USR, INTREG_R10_USR, INTREG_R11_USR, 2336717Sgblack@eecs.umich.edu INTREG_R12_USR, INTREG_R13_USR, INTREG_R14_USR, INTREG_R15_USR 2346717Sgblack@eecs.umich.edu}; 2356717Sgblack@eecs.umich.edu 2366717Sgblack@eecs.umich.edustatic inline IntRegIndex 2376717Sgblack@eecs.umich.eduINTREG_USR(unsigned index) 2386717Sgblack@eecs.umich.edu{ 2396717Sgblack@eecs.umich.edu assert(index < NUM_ARCH_INTREGS); 2406717Sgblack@eecs.umich.edu return IntRegUsrMap[index]; 2416717Sgblack@eecs.umich.edu} 2426717Sgblack@eecs.umich.edu 2436717Sgblack@eecs.umich.educonst IntRegMap IntRegSvcMap = { 2446717Sgblack@eecs.umich.edu INTREG_R0_SVC, INTREG_R1_SVC, INTREG_R2_SVC, INTREG_R3_SVC, 2456717Sgblack@eecs.umich.edu INTREG_R4_SVC, INTREG_R5_SVC, INTREG_R6_SVC, INTREG_R7_SVC, 2466717Sgblack@eecs.umich.edu INTREG_R8_SVC, INTREG_R9_SVC, INTREG_R10_SVC, INTREG_R11_SVC, 2476717Sgblack@eecs.umich.edu INTREG_R12_SVC, INTREG_R13_SVC, INTREG_R14_SVC, INTREG_R15_SVC 2486717Sgblack@eecs.umich.edu}; 2496717Sgblack@eecs.umich.edu 2506717Sgblack@eecs.umich.edustatic inline IntRegIndex 2516717Sgblack@eecs.umich.eduINTREG_SVC(unsigned index) 2526717Sgblack@eecs.umich.edu{ 2536717Sgblack@eecs.umich.edu assert(index < NUM_ARCH_INTREGS); 2546717Sgblack@eecs.umich.edu return IntRegSvcMap[index]; 2556717Sgblack@eecs.umich.edu} 2566717Sgblack@eecs.umich.edu 2576717Sgblack@eecs.umich.educonst IntRegMap IntRegMonMap = { 2586717Sgblack@eecs.umich.edu INTREG_R0_MON, INTREG_R1_MON, INTREG_R2_MON, INTREG_R3_MON, 2596717Sgblack@eecs.umich.edu INTREG_R4_MON, INTREG_R5_MON, INTREG_R6_MON, INTREG_R7_MON, 2606717Sgblack@eecs.umich.edu INTREG_R8_MON, INTREG_R9_MON, INTREG_R10_MON, INTREG_R11_MON, 2616717Sgblack@eecs.umich.edu INTREG_R12_MON, INTREG_R13_MON, INTREG_R14_MON, INTREG_R15_MON 2626717Sgblack@eecs.umich.edu}; 2636717Sgblack@eecs.umich.edu 2646717Sgblack@eecs.umich.edustatic inline IntRegIndex 2656717Sgblack@eecs.umich.eduINTREG_MON(unsigned index) 2666717Sgblack@eecs.umich.edu{ 2676717Sgblack@eecs.umich.edu assert(index < NUM_ARCH_INTREGS); 2686717Sgblack@eecs.umich.edu return IntRegMonMap[index]; 2696717Sgblack@eecs.umich.edu} 2706717Sgblack@eecs.umich.edu 2716717Sgblack@eecs.umich.educonst IntRegMap IntRegAbtMap = { 2726717Sgblack@eecs.umich.edu INTREG_R0_ABT, INTREG_R1_ABT, INTREG_R2_ABT, INTREG_R3_ABT, 2736717Sgblack@eecs.umich.edu INTREG_R4_ABT, INTREG_R5_ABT, INTREG_R6_ABT, INTREG_R7_ABT, 2746717Sgblack@eecs.umich.edu INTREG_R8_ABT, INTREG_R9_ABT, INTREG_R10_ABT, INTREG_R11_ABT, 2756717Sgblack@eecs.umich.edu INTREG_R12_ABT, INTREG_R13_ABT, INTREG_R14_ABT, INTREG_R15_ABT 2766717Sgblack@eecs.umich.edu}; 2776717Sgblack@eecs.umich.edu 2786717Sgblack@eecs.umich.edustatic inline IntRegIndex 2796717Sgblack@eecs.umich.eduINTREG_ABT(unsigned index) 2806717Sgblack@eecs.umich.edu{ 2816717Sgblack@eecs.umich.edu assert(index < NUM_ARCH_INTREGS); 2826717Sgblack@eecs.umich.edu return IntRegAbtMap[index]; 2836717Sgblack@eecs.umich.edu} 2846717Sgblack@eecs.umich.edu 2856717Sgblack@eecs.umich.educonst IntRegMap IntRegUndMap = { 2866717Sgblack@eecs.umich.edu INTREG_R0_UND, INTREG_R1_UND, INTREG_R2_UND, INTREG_R3_UND, 2876717Sgblack@eecs.umich.edu INTREG_R4_UND, INTREG_R5_UND, INTREG_R6_UND, INTREG_R7_UND, 2886717Sgblack@eecs.umich.edu INTREG_R8_UND, INTREG_R9_UND, INTREG_R10_UND, INTREG_R11_UND, 2896717Sgblack@eecs.umich.edu INTREG_R12_UND, INTREG_R13_UND, INTREG_R14_UND, INTREG_R15_UND 2906717Sgblack@eecs.umich.edu}; 2916717Sgblack@eecs.umich.edu 2926717Sgblack@eecs.umich.edustatic inline IntRegIndex 2936717Sgblack@eecs.umich.eduINTREG_UND(unsigned index) 2946717Sgblack@eecs.umich.edu{ 2956717Sgblack@eecs.umich.edu assert(index < NUM_ARCH_INTREGS); 2966717Sgblack@eecs.umich.edu return IntRegUndMap[index]; 2976717Sgblack@eecs.umich.edu} 2986717Sgblack@eecs.umich.edu 2996717Sgblack@eecs.umich.educonst IntRegMap IntRegIrqMap = { 3006717Sgblack@eecs.umich.edu INTREG_R0_IRQ, INTREG_R1_IRQ, INTREG_R2_IRQ, INTREG_R3_IRQ, 3016717Sgblack@eecs.umich.edu INTREG_R4_IRQ, INTREG_R5_IRQ, INTREG_R6_IRQ, INTREG_R7_IRQ, 3026717Sgblack@eecs.umich.edu INTREG_R8_IRQ, INTREG_R9_IRQ, INTREG_R10_IRQ, INTREG_R11_IRQ, 3036717Sgblack@eecs.umich.edu INTREG_R12_IRQ, INTREG_R13_IRQ, INTREG_R14_IRQ, INTREG_R15_IRQ 3046717Sgblack@eecs.umich.edu}; 3056717Sgblack@eecs.umich.edu 3066717Sgblack@eecs.umich.edustatic inline IntRegIndex 3076717Sgblack@eecs.umich.eduINTREG_IRQ(unsigned index) 3086717Sgblack@eecs.umich.edu{ 3096717Sgblack@eecs.umich.edu assert(index < NUM_ARCH_INTREGS); 3106717Sgblack@eecs.umich.edu return IntRegIrqMap[index]; 3116717Sgblack@eecs.umich.edu} 3126717Sgblack@eecs.umich.edu 3136717Sgblack@eecs.umich.educonst IntRegMap IntRegFiqMap = { 3146717Sgblack@eecs.umich.edu INTREG_R0_FIQ, INTREG_R1_FIQ, INTREG_R2_FIQ, INTREG_R3_FIQ, 3156717Sgblack@eecs.umich.edu INTREG_R4_FIQ, INTREG_R5_FIQ, INTREG_R6_FIQ, INTREG_R7_FIQ, 3166717Sgblack@eecs.umich.edu INTREG_R8_FIQ, INTREG_R9_FIQ, INTREG_R10_FIQ, INTREG_R11_FIQ, 3176717Sgblack@eecs.umich.edu INTREG_R12_FIQ, INTREG_R13_FIQ, INTREG_R14_FIQ, INTREG_R15_FIQ 3186717Sgblack@eecs.umich.edu}; 3196717Sgblack@eecs.umich.edu 3206717Sgblack@eecs.umich.edustatic inline IntRegIndex 3216717Sgblack@eecs.umich.eduINTREG_FIQ(unsigned index) 3226717Sgblack@eecs.umich.edu{ 3236717Sgblack@eecs.umich.edu assert(index < NUM_ARCH_INTREGS); 3246717Sgblack@eecs.umich.edu return IntRegFiqMap[index]; 3256717Sgblack@eecs.umich.edu} 3266717Sgblack@eecs.umich.edu 3276726Sgblack@eecs.umich.edustatic inline IntRegIndex 3286726Sgblack@eecs.umich.eduintRegForceUser(unsigned index) 3296726Sgblack@eecs.umich.edu{ 3306726Sgblack@eecs.umich.edu assert(index < NUM_ARCH_INTREGS); 3316726Sgblack@eecs.umich.edu return (IntRegIndex)(index + NUM_INTREGS); 3326726Sgblack@eecs.umich.edu} 3336726Sgblack@eecs.umich.edu 3346717Sgblack@eecs.umich.edu} 3356717Sgblack@eecs.umich.edu 3366717Sgblack@eecs.umich.edu#endif 337