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
45 static inline bool
46 inUserMode(ThreadContext *tc)
47 {
48 return (tc->readMiscRegNoEffect(AlphaISA::IPR_DTB_CM) & 0x18) != 0;
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
45 static inline bool
46 inUserMode(ThreadContext *tc)
47 {
48 return (tc->readMiscRegNoEffect(AlphaISA::IPR_DTB_CM) & 0x18) != 0;
49 }
50
51 enum PredecodeResult {
52 MoreBytes = 1,
53 ExtMIReady = 2
54 };
55
56 static inline unsigned int
57 predecode(ExtMachInst & ext_inst, Addr pc, MachInst inst, ThreadContext *) {
58 ext_inst = inst;
59#if FULL_SYSTEM
60 if (pc && 0x1)
61 ext_inst|=(static_cast<ExtMachInst>(pc & 0x1) << 32);
62#endif
63 return MoreBytes | ExtMIReady;
64 }
65
66 inline bool isCallerSaveIntegerRegister(unsigned int reg) {
67 panic("register classification not implemented");
68 return (reg >= 1 && reg <= 8 || reg >= 22 && reg <= 25 || reg == 27);
69 }
70
71 inline bool isCalleeSaveIntegerRegister(unsigned int reg) {
72 panic("register classification not implemented");
73 return (reg >= 9 && reg <= 15);

--- 95 unchanged lines hidden ---
51 inline bool isCallerSaveIntegerRegister(unsigned int reg) {
52 panic("register classification not implemented");
53 return (reg >= 1 && reg <= 8 || reg >= 22 && reg <= 25 || reg == 27);
54 }
55
56 inline bool isCalleeSaveIntegerRegister(unsigned int reg) {
57 panic("register classification not implemented");
58 return (reg >= 9 && reg <= 15);

--- 95 unchanged lines hidden ---