pseudo_inst.cc (3089:0ea2eb13c4de) pseudo_inst.cc (3125:febd811bccc6)
1/*
2 * Copyright (c) 2003-2006 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;

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

144 void
145 m5exit(ThreadContext *tc, Tick delay)
146 {
147 Tick when = curTick + delay * Clock::Int::ns;
148 exitSimLoop(when, "m5_exit instruction encountered");
149 }
150
151 void
1/*
2 * Copyright (c) 2003-2006 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;

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

144 void
145 m5exit(ThreadContext *tc, Tick delay)
146 {
147 Tick when = curTick + delay * Clock::Int::ns;
148 exitSimLoop(when, "m5_exit instruction encountered");
149 }
150
151 void
152 loadsymbol(ExecContext *xc)
153 {
154 const string &filename = xc->getCpuPtr()->system->params()->symbolfile;
155 if (filename.empty()) {
156 return;
157 }
158
159 std::string buffer;
160 ifstream file(filename.c_str());
161
162 if (!file)
163 fatal("file error: Can't open symbol table file %s\n", filename);
164
165 while (!file.eof()) {
166 getline(file, buffer);
167
168 if (buffer.empty())
169 continue;
170
171 int idx = buffer.find(' ');
172 if (idx == string::npos)
173 continue;
174
175 string address = "0x" + buffer.substr(0, idx);
176 eat_white(address);
177 if (address.empty())
178 continue;
179
180 // Skip over letter and space
181 string symbol = buffer.substr(idx + 3);
182 eat_white(symbol);
183 if (symbol.empty())
184 continue;
185
186 Addr addr;
187 if (!to_number(address, addr))
188 continue;
189
190 if (!xc->getSystemPtr()->kernelSymtab->insert(addr, symbol))
191 continue;
192
193
194 DPRINTF(Loader, "Loaded symbol: %s @ %#llx\n", symbol, addr);
195 }
196 file.close();
197 }
198
199 void
152 resetstats(ThreadContext *tc, Tick delay, Tick period)
153 {
154 if (!doStatisticsInsts)
155 return;
156
157
158 Tick when = curTick + delay * Clock::Int::ns;
159 Tick repeat = period * Clock::Int::ns;

--- 140 unchanged lines hidden ---
200 resetstats(ThreadContext *tc, Tick delay, Tick period)
201 {
202 if (!doStatisticsInsts)
203 return;
204
205
206 Tick when = curTick + delay * Clock::Int::ns;
207 Tick repeat = period * Clock::Int::ns;

--- 140 unchanged lines hidden ---