isa.hh (12109:f29e9c5418aa) isa.hh (12124:6edbfe40f4e8)
1/*
2 * Copyright (c) 2009 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;

--- 104 unchanged lines hidden (view full) ---

113 // Flag that is set when CP0 state has been written to.
114 bool cp0Updated;
115
116 // Enumerated List of CP0 Event Types
117 enum CP0EventType {
118 UpdateCP0
119 };
120
1/*
2 * Copyright (c) 2009 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;

--- 104 unchanged lines hidden (view full) ---

113 // Flag that is set when CP0 state has been written to.
114 bool cp0Updated;
115
116 // Enumerated List of CP0 Event Types
117 enum CP0EventType {
118 UpdateCP0
119 };
120
121 // Declare A CP0Event Class for scheduling
122 class CP0Event : public Event
123 {
124 protected:
125 ISA::CP0 *cp0;
126 BaseCPU *cpu;
127 CP0EventType cp0EventType;
128 Fault fault;
121 /** Process a CP0 event */
122 void processCP0Event(BaseCPU *cpu, CP0EventType);
129
123
130 public:
131 /** Constructs a CP0 event. */
132 CP0Event(CP0 *_cp0, BaseCPU *_cpu, CP0EventType e_type);
133
134 /** Process this event. */
135 virtual void process();
136
137 /** Returns the description of this event. */
138 const char *description() const;
139
140 /** Schedule This Event */
141 void scheduleEvent(Cycles delay);
142
143 /** Unschedule This Event */
144 void unscheduleEvent();
145 };
146
147 // Schedule a CP0 Update Event
148 void scheduleCP0Update(BaseCPU *cpu, Cycles delay = Cycles(0));
149
150 // If any changes have been made, then check the state for changes
151 // and if necessary alert the CPU
152 void updateCPU(BaseCPU *cpu);
153
124 // Schedule a CP0 Update Event
125 void scheduleCP0Update(BaseCPU *cpu, Cycles delay = Cycles(0));
126
127 // If any changes have been made, then check the state for changes
128 // and if necessary alert the CPU
129 void updateCPU(BaseCPU *cpu);
130
154 // Keep a List of CPU Events that need to be deallocated
155 std::queue<CP0Event*> cp0EventRemoveList;
156
157 static std::string miscRegNames[NumMiscRegs];
158
159 public:
160 void startup(ThreadContext *tc) {}
161
162 /// Explicitly import the otherwise hidden startup
163 using SimObject::startup;
164

--- 47 unchanged lines hidden ---
131 static std::string miscRegNames[NumMiscRegs];
132
133 public:
134 void startup(ThreadContext *tc) {}
135
136 /// Explicitly import the otherwise hidden startup
137 using SimObject::startup;
138

--- 47 unchanged lines hidden ---