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