diff options
author | Erik Hallnor <ehallnor@umich.edu> | 2004-09-28 16:55:55 -0400 |
---|---|---|
committer | Erik Hallnor <ehallnor@umich.edu> | 2004-09-28 16:55:55 -0400 |
commit | 34742515f53fa807faa1809ef3cc7d319b9a244e (patch) | |
tree | 0171dad7be29509064854f01a25deb8842fe661b /cpu/trace/reader | |
parent | a7c089ab06c863c794f2096a2c321b7e31ead5b6 (diff) | |
download | gem5-34742515f53fa807faa1809ef3cc7d319b9a244e.tar.xz |
Add opt cpu and fix page copy warnings
SConscript:
Add opt_cpu
cpu/simple_cpu/simple_cpu.cc:
Fix page spanning copy warning.
cpu/trace/reader/itx_reader.cc:
Fix reader to return correct address.
--HG--
extra : convert_revision : f03e244971af4197743c7c717d64f21db0ae42d3
Diffstat (limited to 'cpu/trace/reader')
-rw-r--r-- | cpu/trace/reader/itx_reader.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cpu/trace/reader/itx_reader.cc b/cpu/trace/reader/itx_reader.cc index 615eb414e..56f06c870 100644 --- a/cpu/trace/reader/itx_reader.cc +++ b/cpu/trace/reader/itx_reader.cc @@ -102,6 +102,7 @@ ITXReader::getNextReq(MemReqPtr &req) } else { codePhysAddr += tmp_req->size; } + assert(tmp_req->paddr >> 36 == 0); } else { codePhysValid = false; } @@ -130,13 +131,13 @@ ITXReader::getNextReq(MemReqPtr &req) // Get the page offset from the virtual address. tmp_req->paddr = tmp_req->vaddr & 0xfff; tmp_req->paddr |= (c & 0xf0) << 8; - tmp_req->paddr |= (Addr)(c & 0xf0) << 32; + tmp_req->paddr |= (Addr)(c & 0x0f) << 32; for (int i = 2; i < 4; ++i) { c = getc(trace); if (c == EOF) { fatal("Unexpected end of trace file."); } - tmp_req->paddr |= (c & 0xff) << (8 * i); + tmp_req->paddr |= (Addr)(c & 0xff) << (8 * i); } if (type == ITXCode) { if (((tmp_req->paddr & 0xfff) + tmp_req->size) @@ -149,6 +150,7 @@ ITXReader::getNextReq(MemReqPtr &req) codePhysValid = true; } } + assert(tmp_req->paddr >> 36 == 0); } else if (type == ITXCode) { codePhysValid = false; } @@ -175,6 +177,7 @@ ITXReader::getNextReq(MemReqPtr &req) } } while (!phys_val); req = tmp_req; + assert(!req || (req->paddr >> 36) == 0); return 0; } |