utility.hh (7408:ee6949c5bb5b) | utility.hh (7426:5da64155a605) |
---|---|
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 --- 133 unchanged lines hidden (view full) --- 142 void initCPU(ThreadContext *tc, int cpuId); 143 144 static inline bool 145 inUserMode(ThreadContext *tc) 146 { 147 return (tc->readMiscRegNoEffect(MISCREG_CPSR) & 0x1f) == MODE_USER; 148 } 149 | 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 --- 133 unchanged lines hidden (view full) --- 142 void initCPU(ThreadContext *tc, int cpuId); 143 144 static inline bool 145 inUserMode(ThreadContext *tc) 146 { 147 return (tc->readMiscRegNoEffect(MISCREG_CPSR) & 0x1f) == MODE_USER; 148 } 149 |
150 static inline std::string 151 inst2string(MachInst machInst) 152 { 153 std::string str = ""; 154 uint32_t mask = (1 << 31); 155 156 while (mask) { 157 str += ((machInst & mask) ? "1" : "0"); 158 mask = mask >> 1; 159 } 160 161 return str; 162 } 163 | |
164uint64_t getArgument(ThreadContext *tc, int number, bool fp); 165 166Fault setCp15Register(uint32_t &Rd, int CRn, int opc1, int CRm, int opc2); 167Fault readCp15Register(uint32_t &Rd, int CRn, int opc1, int CRm, int opc2); 168 169}; 170 171 172#endif | 150uint64_t getArgument(ThreadContext *tc, int number, bool fp); 151 152Fault setCp15Register(uint32_t &Rd, int CRn, int opc1, int CRm, int opc2); 153Fault readCp15Register(uint32_t &Rd, int CRn, int opc1, int CRm, int opc2); 154 155}; 156 157 158#endif |