diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2016-01-11 05:52:20 -0500 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2016-01-11 05:52:20 -0500 |
commit | 12eb0343784f52994110df7e7fce4a0b639a6ec3 (patch) | |
tree | 12ff1c51b8051bb7e7d889eed499bee0dcd4cd1e /src/dev/sparc/iob.cc | |
parent | 7661f1c2bf2b45603264076fabce2eb42373cd18 (diff) | |
download | gem5-12eb0343784f52994110df7e7fce4a0b639a6ec3.tar.xz |
scons: Enable -Wextra by default
Make best use of the compiler, and enable -Wextra as well as
-Wall. There are a few issues that had to be resolved, but they are
all trivial.
Diffstat (limited to 'src/dev/sparc/iob.cc')
-rw-r--r-- | src/dev/sparc/iob.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dev/sparc/iob.cc b/src/dev/sparc/iob.cc index c8462b9be..55cb93f37 100644 --- a/src/dev/sparc/iob.cc +++ b/src/dev/sparc/iob.cc @@ -91,7 +91,8 @@ Iob::readIob(PacketPtr pkt) { Addr accessAddr = pkt->getAddr() - iobManAddr; - if (accessAddr >= IntManAddr && accessAddr < IntManAddr + IntManSize) { + assert(IntManAddr == 0); + if (accessAddr < IntManAddr + IntManSize) { int index = (accessAddr - IntManAddr) >> 3; uint64_t data = intMan[index].cpu << 8 | intMan[index].vector << 0; pkt->set(data); @@ -186,7 +187,8 @@ Iob::writeIob(PacketPtr pkt) int index; uint64_t data; - if (accessAddr >= IntManAddr && accessAddr < IntManAddr + IntManSize) { + assert(IntManAddr == 0); + if (accessAddr < IntManAddr + IntManSize) { index = (accessAddr - IntManAddr) >> 3; data = pkt->get<uint64_t>(); intMan[index].cpu = bits(data,12,8); |