utility.hh (3603:714467743f9b) | utility.hh (3918:1f9a98d198e8) |
---|---|
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; --- 36 unchanged lines hidden (view full) --- 45 inUserMode(ThreadContext *tc) 46 { 47 return !(tc->readMiscReg(MISCREG_PSTATE & (1 << 2)) || 48 tc->readMiscReg(MISCREG_HPSTATE & (1 << 2))); 49 } 50 51 inline ExtMachInst 52 makeExtMI(MachInst inst, ThreadContext * xc) { | 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; --- 36 unchanged lines hidden (view full) --- 45 inUserMode(ThreadContext *tc) 46 { 47 return !(tc->readMiscReg(MISCREG_PSTATE & (1 << 2)) || 48 tc->readMiscReg(MISCREG_HPSTATE & (1 << 2))); 49 } 50 51 inline ExtMachInst 52 makeExtMI(MachInst inst, ThreadContext * xc) { |
53 ExtMachInst emi = (unsigned MachInst) inst; | 53 ExtMachInst emi = (MachInst) inst; |
54 //The I bit, bit 13, is used to figure out where the ASI 55 //should come from. Use that in the ExtMachInst. This is 56 //slightly redundant, but it removes the need to put a condition 57 //into all the execute functions 58 if(inst & (1 << 13)) 59 emi |= (static_cast<ExtMachInst>(xc->readMiscReg(MISCREG_ASI)) 60 << (sizeof(MachInst) * 8)); 61 else --- 59 unchanged lines hidden --- | 54 //The I bit, bit 13, is used to figure out where the ASI 55 //should come from. Use that in the ExtMachInst. This is 56 //slightly redundant, but it removes the need to put a condition 57 //into all the execute functions 58 if(inst & (1 << 13)) 59 emi |= (static_cast<ExtMachInst>(xc->readMiscReg(MISCREG_ASI)) 60 << (sizeof(MachInst) * 8)); 61 else --- 59 unchanged lines hidden --- |