tlb.cc (10824:308771bd2647) tlb.cc (10905:a6ca6831e775)
1/*
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
3 * Copyright (c) 2007 MIPS Technologies, Inc.
4 * Copyright (c) 2007-2008 The Florida State University
5 * Copyright (c) 2009 The University of Edinburgh
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

190{
191 DPRINTF(TLB, "flushAll\n");
192 memset(table, 0, sizeof(PowerISA::PTE[size]));
193 lookupTable.clear();
194 nlu = 0;
195}
196
197void
1/*
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
3 * Copyright (c) 2007 MIPS Technologies, Inc.
4 * Copyright (c) 2007-2008 The Florida State University
5 * Copyright (c) 2009 The University of Edinburgh
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

190{
191 DPRINTF(TLB, "flushAll\n");
192 memset(table, 0, sizeof(PowerISA::PTE[size]));
193 lookupTable.clear();
194 nlu = 0;
195}
196
197void
198TLB::serialize(ostream &os)
198TLB::serialize(CheckpointOut &cp) const
199{
200 SERIALIZE_SCALAR(size);
201 SERIALIZE_SCALAR(nlu);
202
203 for (int i = 0; i < size; i++) {
199{
200 SERIALIZE_SCALAR(size);
201 SERIALIZE_SCALAR(nlu);
202
203 for (int i = 0; i < size; i++) {
204 nameOut(os, csprintf("%s.PTE%d", name(), i));
205 table[i].serialize(os);
204 ScopedCheckpointSection sec(cp, csprintf("PTE%d", i));
205 table[i].serialize(cp);
206 }
207}
208
209void
206 }
207}
208
209void
210TLB::unserialize(Checkpoint *cp, const string &section)
210TLB::unserialize(CheckpointIn &cp)
211{
212 UNSERIALIZE_SCALAR(size);
213 UNSERIALIZE_SCALAR(nlu);
214
215 for (int i = 0; i < size; i++) {
211{
212 UNSERIALIZE_SCALAR(size);
213 UNSERIALIZE_SCALAR(nlu);
214
215 for (int i = 0; i < size; i++) {
216 table[i].unserialize(cp, csprintf("%s.PTE%d", section, i));
216 ScopedCheckpointSection sec(cp, csprintf("PTE%d", i));
217 if (table[i].V0 || table[i].V1) {
218 lookupTable.insert(make_pair(table[i].VPN, i));
219 }
220 }
221}
222
223void
224TLB::regStats()

--- 133 unchanged lines hidden ---
217 if (table[i].V0 || table[i].V1) {
218 lookupTable.insert(make_pair(table[i].VPN, i));
219 }
220 }
221}
222
223void
224TLB::regStats()

--- 133 unchanged lines hidden ---