tlb.cc (10231:cb2e6950956d) tlb.cc (10280:5b67e1bdf6ad)
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

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

54using namespace std;
55using namespace MipsISA;
56
57///////////////////////////////////////////////////////////////////////
58//
59// MIPS TLB
60//
61
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

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

54using namespace std;
55using namespace MipsISA;
56
57///////////////////////////////////////////////////////////////////////
58//
59// MIPS TLB
60//
61
62static inline mode_type
63getOperatingMode(MiscReg Stat)
64{
65 if ((Stat & 0x10000006) != 0 || (Stat & 0x18) ==0) {
66 return mode_kernel;
67 } else if ((Stat & 0x18) == 0x8) {
68 return mode_supervisor;
69 } else if ((Stat & 0x18) == 0x10) {
70 return mode_user;
71 } else {
72 return mode_number;
73 }
74}
75
76
77TLB::TLB(const Params *p)
78 : BaseTLB(p), size(p->size), nlu(0)
79{
80 table = new PTE[size];
81 memset(table, 0, sizeof(PTE[size]));
82 smallPages = 0;
83}
84

--- 287 unchanged lines hidden ---
62TLB::TLB(const Params *p)
63 : BaseTLB(p), size(p->size), nlu(0)
64{
65 table = new PTE[size];
66 memset(table, 0, sizeof(PTE[size]));
67 smallPages = 0;
68}
69

--- 287 unchanged lines hidden ---