utility.hh (3532:da906369816a) | utility.hh (3577:605c370622b1) |
---|---|
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; --- 25 unchanged lines hidden (view full) --- 34#include "arch/sparc/faults.hh" 35#include "arch/sparc/isa_traits.hh" 36#include "base/misc.hh" 37#include "base/bitfield.hh" 38#include "cpu/thread_context.hh" 39 40namespace SparcISA 41{ | 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; --- 25 unchanged lines hidden (view full) --- 34#include "arch/sparc/faults.hh" 35#include "arch/sparc/isa_traits.hh" 36#include "base/misc.hh" 37#include "base/bitfield.hh" 38#include "cpu/thread_context.hh" 39 40namespace SparcISA 41{ |
42 43 static inline bool 44 inUserMode(ThreadContext *tc) 45 { 46 return !(tc->readMiscReg(MISCREG_PSTATE & (1 << 2)) || 47 tc->readMiscReg(MISCREG_HPSTATE & (1 << 2))); 48 } 49 |
|
42 inline ExtMachInst 43 makeExtMI(MachInst inst, ThreadContext * xc) { 44 ExtMachInst emi = (unsigned MachInst) inst; 45 //The I bit, bit 13, is used to figure out where the ASI 46 //should come from. Use that in the ExtMachInst. This is 47 //slightly redundant, but it removes the need to put a condition 48 //into all the execute functions 49 if(inst & (1 << 13)) --- 62 unchanged lines hidden --- | 50 inline ExtMachInst 51 makeExtMI(MachInst inst, ThreadContext * xc) { 52 ExtMachInst emi = (unsigned MachInst) inst; 53 //The I bit, bit 13, is used to figure out where the ASI 54 //should come from. Use that in the ExtMachInst. This is 55 //slightly redundant, but it removes the need to put a condition 56 //into all the execute functions 57 if(inst & (1 << 13)) --- 62 unchanged lines hidden --- |