Deleted Added
sdiff udiff text old ( 5232:d3801ea2792e ) new ( 5236:0050ad4fb3ef )
full compact
1/*
2 * Copyright (c) 2007 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * Redistribution and use of this software in source and binary forms,
6 * with or without modification, are permitted provided that the
7 * following conditions are met:
8 *

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

67#include "cpu/thread_context.hh"
68#include "cpu/base.hh"
69#include "mem/packet_access.hh"
70#include "mem/request.hh"
71#include "sim/system.hh"
72
73namespace X86ISA {
74
75TLB::TLB(const Params *p) : SimObject(p), size(p->size)
76{
77 tlb = new TlbEntry[size];
78 std::memset(tlb, 0, sizeof(TlbEntry) * size);
79
80 for (int x = 0; x < size; x++)
81 freeList.push_back(&tlb[x]);
82}
83
84void
85TLB::insert(Addr vpn, TlbEntry &entry)
86{
87 //TODO Deal with conflicting entries
88
89 TlbEntry *newEntry = NULL;
90 if (!freeList.empty()) {
91 newEntry = freeList.front();
92 freeList.pop_front();

--- 481 unchanged lines hidden ---