1/* 2 * Copyright (c) 2010 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 109 unchanged lines hidden (view full) --- 118 copyMiscRegs(ThreadContext *src, ThreadContext *dest) 119 { 120 panic("Copy Misc. Regs Not Implemented Yet\n"); 121 } 122 123 void initCPU(ThreadContext *tc, int cpuId); 124 125 static inline bool |
126 inUserMode(CPSR cpsr) 127 { 128 return cpsr.mode == MODE_USER; 129 } 130 131 static inline bool |
132 inUserMode(ThreadContext *tc) 133 { |
134 return inUserMode(tc->readMiscRegNoEffect(MISCREG_CPSR)); |
135 } 136 |
137 static inline bool 138 inPrivilegedMode(CPSR cpsr) 139 { 140 return !inUserMode(cpsr); 141 } 142 143 static inline bool 144 inPrivilegedMode(ThreadContext *tc) 145 { 146 return !inUserMode(tc); 147 } 148 |
149uint64_t getArgument(ThreadContext *tc, int number, bool fp); 150 151Fault setCp15Register(uint32_t &Rd, int CRn, int opc1, int CRm, int opc2); 152Fault readCp15Register(uint32_t &Rd, int CRn, int opc1, int CRm, int opc2); 153 154}; 155 156 157#endif |