diff options
author | Nathan Binkert <nate@binkert.org> | 2009-06-04 23:21:12 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2009-06-04 23:21:12 -0700 |
commit | 6faf377b5305f9dcc3c7b013c4d67f5accb92617 (patch) | |
tree | 0e437fb49a32dd3d2d2bec95a8dc3bdb4ddf05b0 /src/cpu/simple | |
parent | 4e3426624557b555c354035ee3961eab7554d81d (diff) | |
download | gem5-6faf377b5305f9dcc3c7b013c4d67f5accb92617.tar.xz |
types: clean up types, especially signed vs unsigned
Diffstat (limited to 'src/cpu/simple')
-rw-r--r-- | src/cpu/simple/atomic.cc | 6 | ||||
-rw-r--r-- | src/cpu/simple/base.cc | 6 | ||||
-rw-r--r-- | src/cpu/simple/timing.cc | 4 |
3 files changed, 9 insertions, 7 deletions
diff --git a/src/cpu/simple/atomic.cc b/src/cpu/simple/atomic.cc index 2ec56c0f2..bab4b8b51 100644 --- a/src/cpu/simple/atomic.cc +++ b/src/cpu/simple/atomic.cc @@ -61,7 +61,7 @@ AtomicSimpleCPU::TickEvent::description() const } Port * -AtomicSimpleCPU::getPort(const std::string &if_name, int idx) +AtomicSimpleCPU::getPort(const string &if_name, int idx) { if (if_name == "dcache_port") return &dcachePort; @@ -302,7 +302,7 @@ AtomicSimpleCPU::read(Addr addr, T &data, unsigned flags) } //The block size of our peer. - int blockSize = dcachePort.peerBlockSize(); + unsigned blockSize = dcachePort.peerBlockSize(); //The size of the data we're trying to read. int dataSize = sizeof(T); @@ -444,7 +444,7 @@ AtomicSimpleCPU::write(T data, Addr addr, unsigned flags, uint64_t *res) } //The block size of our peer. - int blockSize = dcachePort.peerBlockSize(); + unsigned blockSize = dcachePort.peerBlockSize(); //The size of the data we're trying to read. int dataSize = sizeof(T); diff --git a/src/cpu/simple/base.cc b/src/cpu/simple/base.cc index 61d034f31..279fb98b7 100644 --- a/src/cpu/simple/base.cc +++ b/src/cpu/simple/base.cc @@ -209,7 +209,8 @@ BaseSimpleCPU::copySrcTranslate(Addr src) { #if 0 static bool no_warn = true; - int blk_size = (dcacheInterface) ? dcacheInterface->getBlockSize() : 64; + unsigned blk_size = + (dcacheInterface) ? dcacheInterface->getBlockSize() : 64; // Only support block sizes of 64 atm. assert(blk_size == 64); int offset = src & (blk_size - 1); @@ -247,7 +248,8 @@ BaseSimpleCPU::copy(Addr dest) { #if 0 static bool no_warn = true; - int blk_size = (dcacheInterface) ? dcacheInterface->getBlockSize() : 64; + unsigned blk_size = + (dcacheInterface) ? dcacheInterface->getBlockSize() : 64; // Only support block sizes of 64 atm. assert(blk_size == 64); uint8_t data[blk_size]; diff --git a/src/cpu/simple/timing.cc b/src/cpu/simple/timing.cc index 6666f6f9d..672fd9414 100644 --- a/src/cpu/simple/timing.cc +++ b/src/cpu/simple/timing.cc @@ -439,7 +439,7 @@ TimingSimpleCPU::read(Addr addr, T &data, unsigned flags) const int asid = 0; const ThreadID tid = 0; const Addr pc = thread->readPC(); - int block_size = dcachePort.peerBlockSize(); + unsigned block_size = dcachePort.peerBlockSize(); int data_size = sizeof(T); RequestPtr req = new Request(asid, addr, data_size, @@ -557,7 +557,7 @@ TimingSimpleCPU::write(T data, Addr addr, unsigned flags, uint64_t *res) const int asid = 0; const ThreadID tid = 0; const Addr pc = thread->readPC(); - int block_size = dcachePort.peerBlockSize(); + unsigned block_size = dcachePort.peerBlockSize(); int data_size = sizeof(T); RequestPtr req = new Request(asid, addr, data_size, |