Deleted Added
sdiff udiff text old ( 8798:adaa92be9037 ) new ( 8806:669e93d79ed9 )
full compact
1/*
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
3 * Copyright (c) 2007 MIPS Technologies, Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

290 hits = read_hits + write_hits;
291 misses = read_misses + write_misses;
292 accesses = read_accesses + write_accesses;
293}
294
295Fault
296TLB::translateInst(RequestPtr req, ThreadContext *tc)
297{
298 if (!FullSystem) {
299 Process * p = tc->getProcessPtr();
300
301 Fault fault = p->pTable->translate(req);
302 if (fault != NoFault)
303 return fault;
304
305 return NoFault;
306 } else {
307 panic("translateInst not implemented in MIPS.\n");
308 }
309}
310
311Fault
312TLB::translateData(RequestPtr req, ThreadContext *tc, bool write)
313{
314 if (!FullSystem) {
315 Process * p = tc->getProcessPtr();
316
317 Fault fault = p->pTable->translate(req);
318 if (fault != NoFault)
319 return fault;
320
321 return NoFault;
322 } else {
323 panic("translateData not implemented in MIPS.\n");
324 }
325}
326
327Fault
328TLB::translateAtomic(RequestPtr req, ThreadContext *tc, Mode mode)
329{
330 if (mode == Execute)
331 return translateInst(req, tc);
332 else

--- 28 unchanged lines hidden ---