utility.cc (9180:ee8d7a51651d) utility.cc (10095:e8001be2e86e)
1/*
2 * Copyright (c) 2007 MIPS Technologies, Inc.
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;

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

236
237void
238initCPU(ThreadContext *tc, int cpuId)
239{}
240
241void
242copyRegs(ThreadContext *src, ThreadContext *dest)
243{
1/*
2 * Copyright (c) 2007 MIPS Technologies, Inc.
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;

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

236
237void
238initCPU(ThreadContext *tc, int cpuId)
239{}
240
241void
242copyRegs(ThreadContext *src, ThreadContext *dest)
243{
244 panic("Copy Regs Not Implemented Yet\n");
244 // First loop through the integer registers.
245 for (int i = 0; i < NumIntRegs; i++)
246 dest->setIntRegFlat(i, src->readIntRegFlat(i));
247
248 // Then loop through the floating point registers.
249 for (int i = 0; i < NumFloatRegs; i++)
250 dest->setFloatRegFlat(i, src->readFloatRegFlat(i));
251
252 // Would need to add condition-code regs if implemented
253 assert(NumCCRegs == 0);
254
255 // Copy misc. registers
256 for (int i = 0; i < NumMiscRegs; i++)
257 dest->setMiscRegNoEffect(i, src->readMiscRegNoEffect(i));
258
259 // Copy over the PC State
260 dest->pcState(src->pcState());
245}
246
247void
248copyMiscRegs(ThreadContext *src, ThreadContext *dest)
249{
250 panic("Copy Misc. Regs Not Implemented Yet\n");
251}
252void
253skipFunction(ThreadContext *tc)
254{
255 TheISA::PCState newPC = tc->pcState();
256 newPC.set(tc->readIntReg(ReturnAddressReg));
257 tc->pcState(newPC);
258}
259
260
261} // namespace MipsISA
261}
262
263void
264copyMiscRegs(ThreadContext *src, ThreadContext *dest)
265{
266 panic("Copy Misc. Regs Not Implemented Yet\n");
267}
268void
269skipFunction(ThreadContext *tc)
270{
271 TheISA::PCState newPC = tc->pcState();
272 newPC.set(tc->readIntReg(ReturnAddressReg));
273 tc->pcState(newPC);
274}
275
276
277} // namespace MipsISA