miscregs.hh revision 7583
16242Sgblack@eecs.umich.edu/*
27093Sgblack@eecs.umich.edu * Copyright (c) 2010 ARM Limited
37093Sgblack@eecs.umich.edu * All rights reserved
47093Sgblack@eecs.umich.edu *
57093Sgblack@eecs.umich.edu * The license below extends only to copyright in the software and shall
67093Sgblack@eecs.umich.edu * not be construed as granting a license to any other intellectual
77093Sgblack@eecs.umich.edu * property including but not limited to intellectual property relating
87093Sgblack@eecs.umich.edu * to a hardware implementation of the functionality of the software
97093Sgblack@eecs.umich.edu * licensed hereunder.  You may use the software subject to the license
107093Sgblack@eecs.umich.edu * terms below provided that you ensure that this notice is replicated
117093Sgblack@eecs.umich.edu * unmodified and in its entirety in all distributions of the software,
127093Sgblack@eecs.umich.edu * modified or unmodified, in source code or in binary form.
137093Sgblack@eecs.umich.edu *
146242Sgblack@eecs.umich.edu * Copyright (c) 2009 The Regents of The University of Michigan
156242Sgblack@eecs.umich.edu * All rights reserved.
166242Sgblack@eecs.umich.edu *
176242Sgblack@eecs.umich.edu * Redistribution and use in source and binary forms, with or without
186242Sgblack@eecs.umich.edu * modification, are permitted provided that the following conditions are
196242Sgblack@eecs.umich.edu * met: redistributions of source code must retain the above copyright
206242Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer;
216242Sgblack@eecs.umich.edu * redistributions in binary form must reproduce the above copyright
226242Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer in the
236242Sgblack@eecs.umich.edu * documentation and/or other materials provided with the distribution;
246242Sgblack@eecs.umich.edu * neither the name of the copyright holders nor the names of its
256242Sgblack@eecs.umich.edu * contributors may be used to endorse or promote products derived from
266242Sgblack@eecs.umich.edu * this software without specific prior written permission.
276242Sgblack@eecs.umich.edu *
286242Sgblack@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
296242Sgblack@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
306242Sgblack@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
316242Sgblack@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
326242Sgblack@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
336242Sgblack@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
346242Sgblack@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
356242Sgblack@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
366242Sgblack@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
376242Sgblack@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
386242Sgblack@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
396242Sgblack@eecs.umich.edu *
406242Sgblack@eecs.umich.edu * Authors: Gabe Black
416242Sgblack@eecs.umich.edu */
426242Sgblack@eecs.umich.edu#ifndef __ARCH_ARM_MISCREGS_HH__
436242Sgblack@eecs.umich.edu#define __ARCH_ARM_MISCREGS_HH__
446242Sgblack@eecs.umich.edu
456242Sgblack@eecs.umich.edu#include "base/bitunion.hh"
466242Sgblack@eecs.umich.edu
476242Sgblack@eecs.umich.edunamespace ArmISA
486242Sgblack@eecs.umich.edu{
496242Sgblack@eecs.umich.edu    enum ConditionCode {
506242Sgblack@eecs.umich.edu        COND_EQ  =   0,
516242Sgblack@eecs.umich.edu        COND_NE, //  1
526242Sgblack@eecs.umich.edu        COND_CS, //  2
536242Sgblack@eecs.umich.edu        COND_CC, //  3
546242Sgblack@eecs.umich.edu        COND_MI, //  4
556242Sgblack@eecs.umich.edu        COND_PL, //  5
566242Sgblack@eecs.umich.edu        COND_VS, //  6
576242Sgblack@eecs.umich.edu        COND_VC, //  7
586242Sgblack@eecs.umich.edu        COND_HI, //  8
596242Sgblack@eecs.umich.edu        COND_LS, //  9
606242Sgblack@eecs.umich.edu        COND_GE, // 10
616242Sgblack@eecs.umich.edu        COND_LT, // 11
626242Sgblack@eecs.umich.edu        COND_GT, // 12
636242Sgblack@eecs.umich.edu        COND_LE, // 13
646242Sgblack@eecs.umich.edu        COND_AL, // 14
657111Sgblack@eecs.umich.edu        COND_UC  // 15
666242Sgblack@eecs.umich.edu    };
676242Sgblack@eecs.umich.edu
686242Sgblack@eecs.umich.edu    enum MiscRegIndex {
696242Sgblack@eecs.umich.edu        MISCREG_CPSR = 0,
707408Sgblack@eecs.umich.edu        MISCREG_ITSTATE,
716735Sgblack@eecs.umich.edu        MISCREG_SPSR,
726242Sgblack@eecs.umich.edu        MISCREG_SPSR_FIQ,
736242Sgblack@eecs.umich.edu        MISCREG_SPSR_IRQ,
746242Sgblack@eecs.umich.edu        MISCREG_SPSR_SVC,
756723Sgblack@eecs.umich.edu        MISCREG_SPSR_MON,
766242Sgblack@eecs.umich.edu        MISCREG_SPSR_UND,
776242Sgblack@eecs.umich.edu        MISCREG_SPSR_ABT,
786261Sgblack@eecs.umich.edu        MISCREG_FPSR,
796403Sgblack@eecs.umich.edu        MISCREG_FPSID,
806403Sgblack@eecs.umich.edu        MISCREG_FPSCR,
816403Sgblack@eecs.umich.edu        MISCREG_FPEXC,
827325Sgblack@eecs.umich.edu        MISCREG_MVFR0,
837325Sgblack@eecs.umich.edu        MISCREG_MVFR1,
847400SAli.Saidi@ARM.com        MISCREG_SCTLR_RST,
857350SAli.Saidi@ARM.com        MISCREG_SEV_MAILBOX,
867259Sgblack@eecs.umich.edu
877259Sgblack@eecs.umich.edu        // CP15 registers
887259Sgblack@eecs.umich.edu        MISCREG_CP15_START,
897259Sgblack@eecs.umich.edu        MISCREG_SCTLR = MISCREG_CP15_START,
907264Sgblack@eecs.umich.edu        MISCREG_DCCISW,
917267Sgblack@eecs.umich.edu        MISCREG_DCCIMVAC,
927285Sgblack@eecs.umich.edu        MISCREG_DCCMVAC,
937265Sgblack@eecs.umich.edu        MISCREG_CONTEXTIDR,
947266Sgblack@eecs.umich.edu        MISCREG_TPIDRURW,
957266Sgblack@eecs.umich.edu        MISCREG_TPIDRURO,
967266Sgblack@eecs.umich.edu        MISCREG_TPIDRPRW,
977268Sgblack@eecs.umich.edu        MISCREG_CP15ISB,
987272Sgblack@eecs.umich.edu        MISCREG_CP15DSB,
997272Sgblack@eecs.umich.edu        MISCREG_CP15DMB,
1007271Sgblack@eecs.umich.edu        MISCREG_CPACR,
1017273Sgblack@eecs.umich.edu        MISCREG_CLIDR,
1027287Sgblack@eecs.umich.edu        MISCREG_CCSIDR,
1037287Sgblack@eecs.umich.edu        MISCREG_CSSELR,
1047274Sgblack@eecs.umich.edu        MISCREG_ICIALLUIS,
1057275Sgblack@eecs.umich.edu        MISCREG_ICIALLU,
1067276Sgblack@eecs.umich.edu        MISCREG_ICIMVAU,
1077286Sgblack@eecs.umich.edu        MISCREG_BPIMVA,
1087297Sgblack@eecs.umich.edu        MISCREG_BPIALLIS,
1097297Sgblack@eecs.umich.edu        MISCREG_BPIALL,
1107298Sgblack@eecs.umich.edu        MISCREG_MIDR,
1117352Sgblack@eecs.umich.edu        MISCREG_TTBR0,
1127352Sgblack@eecs.umich.edu        MISCREG_TTBR1,
1137354Sgblack@eecs.umich.edu        MISCREG_TLBTR,
1147353Sgblack@eecs.umich.edu        MISCREG_DACR,
1157355Sgblack@eecs.umich.edu        MISCREG_TLBIALLIS,
1167355Sgblack@eecs.umich.edu        MISCREG_TLBIMVAIS,
1177355Sgblack@eecs.umich.edu        MISCREG_TLBIASIDIS,
1187355Sgblack@eecs.umich.edu        MISCREG_TLBIMVAAIS,
1197355Sgblack@eecs.umich.edu        MISCREG_ITLBIALL,
1207355Sgblack@eecs.umich.edu        MISCREG_ITLBIMVA,
1217355Sgblack@eecs.umich.edu        MISCREG_ITLBIASID,
1227355Sgblack@eecs.umich.edu        MISCREG_DTLBIALL,
1237355Sgblack@eecs.umich.edu        MISCREG_DTLBIMVA,
1247355Sgblack@eecs.umich.edu        MISCREG_DTLBIASID,
1257355Sgblack@eecs.umich.edu        MISCREG_TLBIALL,
1267355Sgblack@eecs.umich.edu        MISCREG_TLBIMVA,
1277355Sgblack@eecs.umich.edu        MISCREG_TLBIASID,
1287355Sgblack@eecs.umich.edu        MISCREG_TLBIMVAA,
1297362Sgblack@eecs.umich.edu        MISCREG_DFSR,
1307362Sgblack@eecs.umich.edu        MISCREG_IFSR,
1317362Sgblack@eecs.umich.edu        MISCREG_DFAR,
1327362Sgblack@eecs.umich.edu        MISCREG_IFAR,
1337390Sgblack@eecs.umich.edu        MISCREG_MPIDR,
1347404SAli.Saidi@ARM.com        MISCREG_PRRR,
1357404SAli.Saidi@ARM.com        MISCREG_NMRR,
1367404SAli.Saidi@ARM.com        MISCREG_TTBCR,
1377404SAli.Saidi@ARM.com        MISCREG_ID_PFR0,
1387406SAli.Saidi@ARM.com        MISCREG_CTR,
1397406SAli.Saidi@ARM.com        MISCREG_SCR,
1407406SAli.Saidi@ARM.com        MISCREG_SDER,
1417436Sdam.sunwoo@arm.com        MISCREG_PAR,
1427436Sdam.sunwoo@arm.com        MISCREG_V2PCWPR,
1437436Sdam.sunwoo@arm.com        MISCREG_V2PCWPW,
1447436Sdam.sunwoo@arm.com        MISCREG_V2PCWUR,
1457436Sdam.sunwoo@arm.com        MISCREG_V2PCWUW,
1467436Sdam.sunwoo@arm.com        MISCREG_V2POWPR,
1477436Sdam.sunwoo@arm.com        MISCREG_V2POWPW,
1487436Sdam.sunwoo@arm.com        MISCREG_V2POWUR,
1497436Sdam.sunwoo@arm.com        MISCREG_V2POWUW,
1507583SAli.Saidi@arm.com        MISCREG_ID_MMFR0,
1517583SAli.Saidi@arm.com        MISCREG_ACTLR,
1527583SAli.Saidi@arm.com        MISCREG_PMCR,
1537583SAli.Saidi@arm.com        MISCREG_PMCCNTR,
1547583SAli.Saidi@arm.com        MISCREG_PMCNTENSET,
1557583SAli.Saidi@arm.com        MISCREG_PMCNTENCLR,
1567583SAli.Saidi@arm.com        MISCREG_PMOVSR,
1577583SAli.Saidi@arm.com        MISCREG_PMSWINC,
1587583SAli.Saidi@arm.com        MISCREG_PMSELR,
1597583SAli.Saidi@arm.com        MISCREG_PMCEID0,
1607583SAli.Saidi@arm.com        MISCREG_PMCEID1,
1617583SAli.Saidi@arm.com        MISCREG_PMC_OTHER,
1627583SAli.Saidi@arm.com        MISCREG_PMXEVCNTR,
1637583SAli.Saidi@arm.com        MISCREG_PMUSERENR,
1647583SAli.Saidi@arm.com        MISCREG_PMINTENSET,
1657583SAli.Saidi@arm.com        MISCREG_PMINTENCLR,
1667259Sgblack@eecs.umich.edu        MISCREG_CP15_UNIMP_START,
1677406SAli.Saidi@ARM.com        MISCREG_TCMTR = MISCREG_CP15_UNIMP_START,
1687259Sgblack@eecs.umich.edu        MISCREG_ID_PFR1,
1697259Sgblack@eecs.umich.edu        MISCREG_ID_DFR0,
1707259Sgblack@eecs.umich.edu        MISCREG_ID_AFR0,
1717259Sgblack@eecs.umich.edu        MISCREG_ID_MMFR1,
1727259Sgblack@eecs.umich.edu        MISCREG_ID_MMFR2,
1737259Sgblack@eecs.umich.edu        MISCREG_ID_MMFR3,
1747259Sgblack@eecs.umich.edu        MISCREG_ID_ISAR0,
1757259Sgblack@eecs.umich.edu        MISCREG_ID_ISAR1,
1767259Sgblack@eecs.umich.edu        MISCREG_ID_ISAR2,
1777259Sgblack@eecs.umich.edu        MISCREG_ID_ISAR3,
1787259Sgblack@eecs.umich.edu        MISCREG_ID_ISAR4,
1797259Sgblack@eecs.umich.edu        MISCREG_ID_ISAR5,
1807259Sgblack@eecs.umich.edu        MISCREG_AIDR,
1817259Sgblack@eecs.umich.edu        MISCREG_ADFSR,
1827259Sgblack@eecs.umich.edu        MISCREG_AIFSR,
1837259Sgblack@eecs.umich.edu        MISCREG_DCIMVAC,
1847259Sgblack@eecs.umich.edu        MISCREG_DCISW,
1857259Sgblack@eecs.umich.edu        MISCREG_MCCSW,
1867259Sgblack@eecs.umich.edu        MISCREG_DCCMVAU,
1877351Sgblack@eecs.umich.edu        MISCREG_NSACR,
1887351Sgblack@eecs.umich.edu        MISCREG_VBAR,
1897351Sgblack@eecs.umich.edu        MISCREG_MVBAR,
1907351Sgblack@eecs.umich.edu        MISCREG_ISR,
1917351Sgblack@eecs.umich.edu        MISCREG_FCEIDR,
1927351Sgblack@eecs.umich.edu
1937259Sgblack@eecs.umich.edu
1947259Sgblack@eecs.umich.edu        MISCREG_CP15_END,
1957259Sgblack@eecs.umich.edu
1967259Sgblack@eecs.umich.edu        // Dummy indices
1977259Sgblack@eecs.umich.edu        MISCREG_NOP = MISCREG_CP15_END,
1987259Sgblack@eecs.umich.edu        MISCREG_RAZ,
1997259Sgblack@eecs.umich.edu
2006735Sgblack@eecs.umich.edu        NUM_MISCREGS
2016261Sgblack@eecs.umich.edu    };
2026261Sgblack@eecs.umich.edu
2037259Sgblack@eecs.umich.edu    MiscRegIndex decodeCP15Reg(unsigned crn, unsigned opc1,
2047259Sgblack@eecs.umich.edu                               unsigned crm, unsigned opc2);
2057259Sgblack@eecs.umich.edu
2066261Sgblack@eecs.umich.edu    const char * const miscRegName[NUM_MISCREGS] = {
2077408Sgblack@eecs.umich.edu        "cpsr", "itstate", "spsr", "spsr_fiq", "spsr_irq", "spsr_svc",
2087259Sgblack@eecs.umich.edu        "spsr_mon", "spsr_und", "spsr_abt",
2097351Sgblack@eecs.umich.edu        "fpsr", "fpsid", "fpscr", "fpexc", "mvfr0", "mvfr1",
2107400SAli.Saidi@ARM.com        "sctlr_rst", "sev_mailbox",
2117285Sgblack@eecs.umich.edu        "sctlr", "dccisw", "dccimvac", "dccmvac",
2127267Sgblack@eecs.umich.edu        "contextidr", "tpidrurw", "tpidruro", "tpidrprw",
2137287Sgblack@eecs.umich.edu        "cp15isb", "cp15dsb", "cp15dmb", "cpacr",
2147287Sgblack@eecs.umich.edu        "clidr", "ccsidr", "csselr",
2157297Sgblack@eecs.umich.edu        "icialluis", "iciallu", "icimvau",
2167297Sgblack@eecs.umich.edu        "bpimva", "bpiallis", "bpiall",
2177355Sgblack@eecs.umich.edu        "midr", "ttbr0", "ttbr1", "tlbtr", "dacr",
2187355Sgblack@eecs.umich.edu        "tlbiallis", "tlbimvais", "tlbiasidis", "tlbimvaais",
2197355Sgblack@eecs.umich.edu        "itlbiall", "itlbimva", "itlbiasid",
2207355Sgblack@eecs.umich.edu        "dtlbiall", "dtlbimva", "dtlbiasid",
2217355Sgblack@eecs.umich.edu        "tlbiall", "tlbimva", "tlbiasid", "tlbimvaa",
2227390Sgblack@eecs.umich.edu        "dfsr", "ifsr", "dfar", "ifar", "mpidr",
2237436Sdam.sunwoo@arm.com        "prrr", "nmrr",  "ttbcr", "id_pfr0", "ctr",
2247436Sdam.sunwoo@arm.com        "scr", "sder", "par",
2257436Sdam.sunwoo@arm.com        "v2pcwpr", "v2pcwpw", "v2pcwur", "v2pcwuw",
2267436Sdam.sunwoo@arm.com        "v2powpr", "v2powpw", "v2powur", "v2powuw",
2277583SAli.Saidi@arm.com        "id_mmfr0","actlr", "pmcr", "pmcntr",
2287583SAli.Saidi@arm.com        "pmcntenset", "pmcntenclr", "pmovsr",
2297583SAli.Saidi@arm.com        "pmswinc", "pmselr", "pmceid0",
2307583SAli.Saidi@arm.com        "pmceid1", "pmc_other", "pmxevcntr",
2317583SAli.Saidi@arm.com        "pmuserenr", "pmintenset", "pmintenclr",
2327583SAli.Saidi@arm.com         // Unimplemented below
2337406SAli.Saidi@ARM.com        "tcmtr",
2347404SAli.Saidi@ARM.com        "id_pfr1", "id_dfr0", "id_afr0",
2357583SAli.Saidi@arm.com        "id_mmfr1", "id_mmfr2", "id_mmfr3",
2367259Sgblack@eecs.umich.edu        "id_isar0", "id_isar1", "id_isar2", "id_isar3", "id_isar4", "id_isar5",
2377583SAli.Saidi@arm.com        "aidr",
2387362Sgblack@eecs.umich.edu        "adfsr", "aifsr",
2397297Sgblack@eecs.umich.edu        "dcimvac", "dcisw", "mccsw",
2407272Sgblack@eecs.umich.edu        "dccmvau",
2417406SAli.Saidi@ARM.com        "nsacr",
2427404SAli.Saidi@ARM.com        "vbar", "mvbar", "isr", "fceidr",
2437259Sgblack@eecs.umich.edu        "nop", "raz"
2446242Sgblack@eecs.umich.edu    };
2456242Sgblack@eecs.umich.edu
2466242Sgblack@eecs.umich.edu    BitUnion32(CPSR)
2476242Sgblack@eecs.umich.edu        Bitfield<31> n;
2486242Sgblack@eecs.umich.edu        Bitfield<30> z;
2496242Sgblack@eecs.umich.edu        Bitfield<29> c;
2506242Sgblack@eecs.umich.edu        Bitfield<28> v;
2516242Sgblack@eecs.umich.edu        Bitfield<27> q;
2526735Sgblack@eecs.umich.edu        Bitfield<26,25> it1;
2536242Sgblack@eecs.umich.edu        Bitfield<24> j;
2546242Sgblack@eecs.umich.edu        Bitfield<19, 16> ge;
2556735Sgblack@eecs.umich.edu        Bitfield<15,10> it2;
2566242Sgblack@eecs.umich.edu        Bitfield<9> e;
2576242Sgblack@eecs.umich.edu        Bitfield<8> a;
2586242Sgblack@eecs.umich.edu        Bitfield<7> i;
2596242Sgblack@eecs.umich.edu        Bitfield<6> f;
2606242Sgblack@eecs.umich.edu        Bitfield<5> t;
2616242Sgblack@eecs.umich.edu        Bitfield<4, 0> mode;
2626242Sgblack@eecs.umich.edu    EndBitUnion(CPSR)
2636735Sgblack@eecs.umich.edu
2647408Sgblack@eecs.umich.edu    BitUnion8(ITSTATE)
2657408Sgblack@eecs.umich.edu        Bitfield<7, 4> cond;
2667408Sgblack@eecs.umich.edu        Bitfield<3, 0> mask;
2677408Sgblack@eecs.umich.edu        // Bitfields for moving to/from CPSR
2687408Sgblack@eecs.umich.edu        Bitfield<7, 2> top6;
2697408Sgblack@eecs.umich.edu        Bitfield<1, 0> bottom2;
2707408Sgblack@eecs.umich.edu    EndBitUnion(ITSTATE)
2717408Sgblack@eecs.umich.edu
2726750Sgblack@eecs.umich.edu    // This mask selects bits of the CPSR that actually go in the CondCodes
2736750Sgblack@eecs.umich.edu    // integer register to allow renaming.
2746750Sgblack@eecs.umich.edu    static const uint32_t CondCodesMask = 0xF80F0000;
2756750Sgblack@eecs.umich.edu
2766735Sgblack@eecs.umich.edu    BitUnion32(SCTLR)
2777360Sgblack@eecs.umich.edu        Bitfield<31> ie;  // Instruction endianness
2786735Sgblack@eecs.umich.edu        Bitfield<30> te;  // Thumb Exception Enable
2796735Sgblack@eecs.umich.edu        Bitfield<29> afe; // Access flag enable
2806735Sgblack@eecs.umich.edu        Bitfield<28> tre; // TEX Remap bit
2816735Sgblack@eecs.umich.edu        Bitfield<27> nmfi;// Non-maskable fast interrupts enable
2826735Sgblack@eecs.umich.edu        Bitfield<25> ee;  // Exception Endianness bit
2836735Sgblack@eecs.umich.edu        Bitfield<24> ve;  // Interrupt vectors enable
2847406SAli.Saidi@ARM.com        Bitfield<23> xp; //  Extended page table enable bit
2856735Sgblack@eecs.umich.edu        Bitfield<22> u;   // Alignment (now unused)
2866735Sgblack@eecs.umich.edu        Bitfield<21> fi;  // Fast interrupts configuration enable
2877360Sgblack@eecs.umich.edu        Bitfield<19> dz;  // Divide by Zero fault enable bit
2886735Sgblack@eecs.umich.edu        Bitfield<18> rao2;// Read as one
2897360Sgblack@eecs.umich.edu        Bitfield<17> br;  // Background region bit
2906735Sgblack@eecs.umich.edu        Bitfield<16> rao3;// Read as one
2916735Sgblack@eecs.umich.edu        Bitfield<14> rr;  // Round robin cache replacement
2926735Sgblack@eecs.umich.edu        Bitfield<13> v;   // Base address for exception vectors
2936735Sgblack@eecs.umich.edu        Bitfield<12> i;   // instruction cache enable
2946735Sgblack@eecs.umich.edu        Bitfield<11> z;   // branch prediction enable bit
2956735Sgblack@eecs.umich.edu        Bitfield<10> sw;  // Enable swp/swpb
2967406SAli.Saidi@ARM.com        Bitfield<9,8> rs;   // deprecated protection bits
2976735Sgblack@eecs.umich.edu        Bitfield<6,3> rao4;// Read as one
2986735Sgblack@eecs.umich.edu        Bitfield<7>  b;   // Endianness support (unused)
2996735Sgblack@eecs.umich.edu        Bitfield<2>  c;   // Cache enable bit
3006735Sgblack@eecs.umich.edu        Bitfield<1>  a;   // Alignment fault checking
3016735Sgblack@eecs.umich.edu        Bitfield<0>  m;   // MMU enable bit
3026735Sgblack@eecs.umich.edu    EndBitUnion(SCTLR)
3037320Sgblack@eecs.umich.edu
3047320Sgblack@eecs.umich.edu    BitUnion32(CPACR)
3057320Sgblack@eecs.umich.edu        Bitfield<1, 0> cp0;
3067320Sgblack@eecs.umich.edu        Bitfield<3, 2> cp1;
3077320Sgblack@eecs.umich.edu        Bitfield<5, 4> cp2;
3087320Sgblack@eecs.umich.edu        Bitfield<7, 6> cp3;
3097320Sgblack@eecs.umich.edu        Bitfield<9, 8> cp4;
3107320Sgblack@eecs.umich.edu        Bitfield<11, 10> cp5;
3117320Sgblack@eecs.umich.edu        Bitfield<13, 12> cp6;
3127320Sgblack@eecs.umich.edu        Bitfield<15, 14> cp7;
3137320Sgblack@eecs.umich.edu        Bitfield<17, 16> cp8;
3147320Sgblack@eecs.umich.edu        Bitfield<19, 18> cp9;
3157320Sgblack@eecs.umich.edu        Bitfield<21, 20> cp10;
3167320Sgblack@eecs.umich.edu        Bitfield<23, 22> cp11;
3177320Sgblack@eecs.umich.edu        Bitfield<25, 24> cp12;
3187320Sgblack@eecs.umich.edu        Bitfield<27, 26> cp13;
3197320Sgblack@eecs.umich.edu        Bitfield<30> d32dis;
3207320Sgblack@eecs.umich.edu        Bitfield<31> asedis;
3217320Sgblack@eecs.umich.edu    EndBitUnion(CPACR)
3227362Sgblack@eecs.umich.edu
3237362Sgblack@eecs.umich.edu    BitUnion32(FSR)
3247362Sgblack@eecs.umich.edu        Bitfield<3, 0> fsLow;
3257362Sgblack@eecs.umich.edu        Bitfield<7, 4> domain;
3267362Sgblack@eecs.umich.edu        Bitfield<10> fsHigh;
3277362Sgblack@eecs.umich.edu        Bitfield<11> wnr;
3287362Sgblack@eecs.umich.edu        Bitfield<12> ext;
3297362Sgblack@eecs.umich.edu    EndBitUnion(FSR)
3307376Sgblack@eecs.umich.edu
3317376Sgblack@eecs.umich.edu    BitUnion32(FPSCR)
3327376Sgblack@eecs.umich.edu        Bitfield<0> ioc;
3337376Sgblack@eecs.umich.edu        Bitfield<1> dzc;
3347376Sgblack@eecs.umich.edu        Bitfield<2> ofc;
3357376Sgblack@eecs.umich.edu        Bitfield<3> ufc;
3367376Sgblack@eecs.umich.edu        Bitfield<4> ixc;
3377376Sgblack@eecs.umich.edu        Bitfield<7> idc;
3387376Sgblack@eecs.umich.edu        Bitfield<8> ioe;
3397376Sgblack@eecs.umich.edu        Bitfield<9> dze;
3407376Sgblack@eecs.umich.edu        Bitfield<10> ofe;
3417376Sgblack@eecs.umich.edu        Bitfield<11> ufe;
3427376Sgblack@eecs.umich.edu        Bitfield<12> ixe;
3437376Sgblack@eecs.umich.edu        Bitfield<15> ide;
3447376Sgblack@eecs.umich.edu        Bitfield<18, 16> len;
3457376Sgblack@eecs.umich.edu        Bitfield<21, 20> stride;
3467376Sgblack@eecs.umich.edu        Bitfield<23, 22> rMode;
3477376Sgblack@eecs.umich.edu        Bitfield<24> fz;
3487376Sgblack@eecs.umich.edu        Bitfield<25> dn;
3497376Sgblack@eecs.umich.edu        Bitfield<26> ahp;
3507376Sgblack@eecs.umich.edu        Bitfield<27> qc;
3517376Sgblack@eecs.umich.edu        Bitfield<28> v;
3527376Sgblack@eecs.umich.edu        Bitfield<29> c;
3537376Sgblack@eecs.umich.edu        Bitfield<30> z;
3547376Sgblack@eecs.umich.edu        Bitfield<31> n;
3557376Sgblack@eecs.umich.edu    EndBitUnion(FPSCR)
3567383Sgblack@eecs.umich.edu
3577383Sgblack@eecs.umich.edu    BitUnion32(MVFR0)
3587383Sgblack@eecs.umich.edu        Bitfield<3, 0> advSimdRegisters;
3597383Sgblack@eecs.umich.edu        Bitfield<7, 4> singlePrecision;
3607383Sgblack@eecs.umich.edu        Bitfield<11, 8> doublePrecision;
3617383Sgblack@eecs.umich.edu        Bitfield<15, 12> vfpExceptionTrapping;
3627383Sgblack@eecs.umich.edu        Bitfield<19, 16> divide;
3637383Sgblack@eecs.umich.edu        Bitfield<23, 20> squareRoot;
3647383Sgblack@eecs.umich.edu        Bitfield<27, 24> shortVectors;
3657383Sgblack@eecs.umich.edu        Bitfield<31, 28> roundingModes;
3667383Sgblack@eecs.umich.edu    EndBitUnion(MVFR0)
3677383Sgblack@eecs.umich.edu
3687383Sgblack@eecs.umich.edu    BitUnion32(MVFR1)
3697383Sgblack@eecs.umich.edu        Bitfield<3, 0> flushToZero;
3707383Sgblack@eecs.umich.edu        Bitfield<7, 4> defaultNaN;
3717383Sgblack@eecs.umich.edu        Bitfield<11, 8> advSimdLoadStore;
3727383Sgblack@eecs.umich.edu        Bitfield<15, 12> advSimdInteger;
3737383Sgblack@eecs.umich.edu        Bitfield<19, 16> advSimdSinglePrecision;
3747383Sgblack@eecs.umich.edu        Bitfield<23, 20> advSimdHalfPrecision;
3757383Sgblack@eecs.umich.edu        Bitfield<27, 24> vfpHalfPrecision;
3767383Sgblack@eecs.umich.edu        Bitfield<31, 28> raz;
3777383Sgblack@eecs.umich.edu    EndBitUnion(MVFR1)
3787404SAli.Saidi@ARM.com
3797404SAli.Saidi@ARM.com    BitUnion32(PRRR)
3807404SAli.Saidi@ARM.com       Bitfield<1,0> tr0;
3817404SAli.Saidi@ARM.com       Bitfield<3,2> tr1;
3827404SAli.Saidi@ARM.com       Bitfield<5,4> tr2;
3837404SAli.Saidi@ARM.com       Bitfield<7,6> tr3;
3847404SAli.Saidi@ARM.com       Bitfield<9,8> tr4;
3857404SAli.Saidi@ARM.com       Bitfield<11,10> tr5;
3867404SAli.Saidi@ARM.com       Bitfield<13,12> tr6;
3877404SAli.Saidi@ARM.com       Bitfield<15,14> tr7;
3887404SAli.Saidi@ARM.com       Bitfield<16> ds0;
3897404SAli.Saidi@ARM.com       Bitfield<17> ds1;
3907404SAli.Saidi@ARM.com       Bitfield<18> ns0;
3917404SAli.Saidi@ARM.com       Bitfield<19> ns1;
3927404SAli.Saidi@ARM.com       Bitfield<24> nos0;
3937404SAli.Saidi@ARM.com       Bitfield<25> nos1;
3947404SAli.Saidi@ARM.com       Bitfield<26> nos2;
3957404SAli.Saidi@ARM.com       Bitfield<27> nos3;
3967404SAli.Saidi@ARM.com       Bitfield<28> nos4;
3977404SAli.Saidi@ARM.com       Bitfield<29> nos5;
3987404SAli.Saidi@ARM.com       Bitfield<30> nos6;
3997404SAli.Saidi@ARM.com       Bitfield<31> nos7;
4007404SAli.Saidi@ARM.com   EndBitUnion(PRRR)
4017404SAli.Saidi@ARM.com
4027404SAli.Saidi@ARM.com   BitUnion32(NMRR)
4037404SAli.Saidi@ARM.com       Bitfield<1,0> ir0;
4047404SAli.Saidi@ARM.com       Bitfield<3,2> ir1;
4057404SAli.Saidi@ARM.com       Bitfield<5,4> ir2;
4067404SAli.Saidi@ARM.com       Bitfield<7,6> ir3;
4077404SAli.Saidi@ARM.com       Bitfield<9,8> ir4;
4087404SAli.Saidi@ARM.com       Bitfield<11,10> ir5;
4097404SAli.Saidi@ARM.com       Bitfield<13,12> ir6;
4107404SAli.Saidi@ARM.com       Bitfield<15,14> ir7;
4117404SAli.Saidi@ARM.com       Bitfield<17,16> or0;
4127404SAli.Saidi@ARM.com       Bitfield<19,18> or1;
4137404SAli.Saidi@ARM.com       Bitfield<21,20> or2;
4147404SAli.Saidi@ARM.com       Bitfield<23,22> or3;
4157404SAli.Saidi@ARM.com       Bitfield<25,24> or4;
4167404SAli.Saidi@ARM.com       Bitfield<27,26> or5;
4177404SAli.Saidi@ARM.com       Bitfield<29,28> or6;
4187404SAli.Saidi@ARM.com       Bitfield<31,30> or7;
4197404SAli.Saidi@ARM.com   EndBitUnion(NMRR)
4207404SAli.Saidi@ARM.com
4216242Sgblack@eecs.umich.edu};
4226242Sgblack@eecs.umich.edu
4236242Sgblack@eecs.umich.edu#endif // __ARCH_ARM_MISCREGS_HH__
424