utility.hh (4181:6edaeff44647) | utility.hh (4182:5b2c0d266107) |
---|---|
1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 34 unchanged lines hidden (view full) --- 43 44 static inline bool 45 inUserMode(ThreadContext *tc) 46 { 47 return !(tc->readMiscRegNoEffect(MISCREG_PSTATE & (1 << 2)) || 48 tc->readMiscRegNoEffect(MISCREG_HPSTATE & (1 << 2))); 49 } 50 | 1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 34 unchanged lines hidden (view full) --- 43 44 static inline bool 45 inUserMode(ThreadContext *tc) 46 { 47 return !(tc->readMiscRegNoEffect(MISCREG_PSTATE & (1 << 2)) || 48 tc->readMiscRegNoEffect(MISCREG_HPSTATE & (1 << 2))); 49 } 50 |
51 enum PredecodeResult { 52 MoreBytes = 1, 53 ExtMIReady = 2 54 }; 55 56 inline unsigned int 57 predecode(ExtMachInst &emi, Addr currPC, MachInst inst, 58 ThreadContext * xc) { 59 emi = inst; 60 //The I bit, bit 13, is used to figure out where the ASI 61 //should come from. Use that in the ExtMachInst. This is 62 //slightly redundant, but it removes the need to put a condition 63 //into all the execute functions 64 if(inst & (1 << 13)) 65 emi |= (static_cast<ExtMachInst>(xc->readMiscRegNoEffect(MISCREG_ASI)) 66 << (sizeof(MachInst) * 8)); 67 else 68 emi |= (static_cast<ExtMachInst>(bits(inst, 12, 5)) 69 << (sizeof(MachInst) * 8)); 70 return MoreBytes | ExtMIReady; 71 } 72 | |
73 inline bool isCallerSaveIntegerRegister(unsigned int reg) { 74 panic("register classification not implemented"); 75 return false; 76 } 77 78 inline bool isCalleeSaveIntegerRegister(unsigned int reg) { 79 panic("register classification not implemented"); 80 return false; --- 46 unchanged lines hidden --- | 51 inline bool isCallerSaveIntegerRegister(unsigned int reg) { 52 panic("register classification not implemented"); 53 return false; 54 } 55 56 inline bool isCalleeSaveIntegerRegister(unsigned int reg) { 57 panic("register classification not implemented"); 58 return false; --- 46 unchanged lines hidden --- |