page_table.cc (12519:1fcc0d0a8f91) | page_table.cc (12536:0a1d2ced2d4c) |
---|---|
1/* 2 * Copyright (c) 2014 Advanced Micro Devices, Inc. 3 * Copyright (c) 2003 The Regents of The University of Michigan 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 --- 25 unchanged lines hidden (view full) --- 34/** 35 * @file 36 * Definitions of functional page table. 37 */ 38#include "mem/page_table.hh" 39 40#include <string> 41 | 1/* 2 * Copyright (c) 2014 Advanced Micro Devices, Inc. 3 * Copyright (c) 2003 The Regents of The University of Michigan 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 --- 25 unchanged lines hidden (view full) --- 34/** 35 * @file 36 * Definitions of functional page table. 37 */ 38#include "mem/page_table.hh" 39 40#include <string> 41 |
42#include "base/compiler.hh" |
|
42#include "base/trace.hh" 43#include "debug/MMU.hh" 44#include "sim/faults.hh" 45#include "sim/serialize.hh" 46 47using namespace std; 48 49void --- 28 unchanged lines hidden (view full) --- 78{ 79 assert(pageOffset(vaddr) == 0); 80 assert(pageOffset(new_vaddr) == 0); 81 82 DPRINTF(MMU, "moving pages from vaddr %08p to %08p, size = %d\n", vaddr, 83 new_vaddr, size); 84 85 while (size > 0) { | 43#include "base/trace.hh" 44#include "debug/MMU.hh" 45#include "sim/faults.hh" 46#include "sim/serialize.hh" 47 48using namespace std; 49 50void --- 28 unchanged lines hidden (view full) --- 79{ 80 assert(pageOffset(vaddr) == 0); 81 assert(pageOffset(new_vaddr) == 0); 82 83 DPRINTF(MMU, "moving pages from vaddr %08p to %08p, size = %d\n", vaddr, 84 new_vaddr, size); 85 86 while (size > 0) { |
86 auto new_it = pTable.find(new_vaddr); | 87 auto new_it M5_VAR_USED = pTable.find(new_vaddr); |
87 auto old_it = pTable.find(vaddr); 88 assert(old_it != pTable.end() && new_it == pTable.end()); 89 90 pTable.emplace(new_vaddr, old_it->second); 91 pTable.erase(old_it); 92 size -= pageSize; 93 vaddr += pageSize; 94 new_vaddr += pageSize; --- 114 unchanged lines hidden --- | 88 auto old_it = pTable.find(vaddr); 89 assert(old_it != pTable.end() && new_it == pTable.end()); 90 91 pTable.emplace(new_vaddr, old_it->second); 92 pTable.erase(old_it); 93 size -= pageSize; 94 vaddr += pageSize; 95 new_vaddr += pageSize; --- 114 unchanged lines hidden --- |