#include <cassert>
+#include "base/logging.hh"
#include "fplib.hh"
namespace ArmISA
overflow_to_inf = false;
break;
default:
- assert(0);
+ panic("Unrecognized FP rounding mode");
}
result = overflow_to_inf ? fp16_infinity(sgn) : fp16_max_normal(sgn);
flags |= FPLIB_OFC | FPLIB_IXC;
overflow_to_inf = false;
break;
default:
- assert(0);
+ panic("Unrecognized FP rounding mode");
}
result = overflow_to_inf ? fp32_infinity(sgn) : fp32_max_normal(sgn);
flags |= FPLIB_OFC | FPLIB_IXC;
overflow_to_inf = false;
break;
default:
- assert(0);
+ panic("Unrecognized FP rounding mode");
}
result = overflow_to_inf ? fp64_infinity(sgn) : fp64_max_normal(sgn);
flags |= FPLIB_OFC | FPLIB_IXC;
x += err >> 1;
break;
default:
- assert(0);
+ panic("Unrecognized FP rounding mode");
}
if (x == 0) {
x += err >> 1;
break;
default:
- assert(0);
+ panic("Unrecognized FP rounding mode");
}
if (x == 0) {
x += err >> 1;
break;
default:
- assert(0);
+ panic("Unrecognized FP rounding mode");
}
if (x == 0) {
x += err >> 1;
break;
default:
- assert(0);
+ panic("Unrecognized FP rounding mode");
}
if (u ? sgn && x : x > (1ULL << (FP64_BITS - 1)) - !sgn) {
#define __ARCH_ARM_INSTS_PREDINST_HH__
#include "arch/arm/insts/static_inst.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
namespace ArmISA
(bits(bigData, 7) << 63);
break;
default:
- assert(0);
+ panic("Unrecognized FP data type");
}
return bigData;
}
return packet->getLE<uint64_t>();
default:
- std::cerr << "bad store data size = " << packet->getSize() << std::endl;
-
- assert(0);
+ panic("bad store data size = %d", packet->getSize());
return 0;
}
}
#include <string>
#include "base/cprintf.hh"
+#include "base/logging.hh"
#include "base/types.hh"
using namespace std;
} else if (Ip6Ptr(tcp.packet())) {
return __tu_cksum6(Ip6Ptr(tcp.packet()));
} else {
- assert(0);
+ panic("Unrecognized IP packet format");
}
// Should never reach here
return 0;
} else if (Ip6Ptr(udp.packet())) {
return __tu_cksum6(Ip6Ptr(udp.packet()));
} else {
- assert(0);
+ panic("Unrecognized IP packet format");
}
return 0;
}
{
public:
static bool isBubble(const ElemType &) { return false; }
- static ElemType bubble() { assert(false); }
+ static ElemType
+ bubble()
+ {
+ panic("bubble called but no bubble interface");
+ }
};
/** Pass on call to the element */
#include "arch/locked_mem.hh"
#include "arch/mmapped_ipr.hh"
+#include "base/logging.hh"
#include "cpu/minor/cpu.hh"
#include "cpu/minor/exec_context.hh"
#include "cpu/minor/execute.hh"
request->setState(LSQRequest::StoreBufferIssuing);
break;
default:
- assert(false);
- break;
+ panic("Unrecognized LSQ request state %d.", request->state);
}
state = MemoryRunning;
request->setState(LSQRequest::StoreBufferNeedsRetry);
break;
default:
- assert(false);
- break;
+ panic("Unrecognized LSQ request state %d.", request->state);
}
}
}
}
break;
default:
- /* Shouldn't be allowed to receive a response from another
- * state */
- assert(false);
- break;
+ panic("Shouldn't be allowed to receive a response from another state");
}
/* We go to idle even if there are more things in the requests queue
retryRequest->setState(LSQRequest::StoreInStoreBuffer);
break;
default:
- assert(false);
+ panic("Unrecognized retry request state %d.", retryRequest->state);
}
/* Set state back to MemoryRunning so that the following
storeBuffer.countIssuedStore(retryRequest);
break;
default:
- assert(false);
- break;
+ panic("Unrecognized retry request state %d.", retryRequest->state);
}
retryRequest = NULL;
#include <string>
#include "arch/utility.hh"
-#include "base/loader/symtab.hh"
#include "base/cp_annotate.hh"
+#include "base/loader/symtab.hh"
+#include "base/logging.hh"
#include "config/the_isa.hh"
#include "cpu/checker/cpu.hh"
#include "cpu/o3/commit.hh"
DPRINTF(Commit,"Commit Policy set to Oldest Ready.");
} else {
- assert(0 && "Invalid SMT Commit Policy. Options Are: {Aggressive,"
- "RoundRobin,OldestReady}");
+ panic("Invalid SMT commit policy. Options are: Aggressive, "
+ "RoundRobin, OldestReady");
}
for (ThreadID tid = 0; tid < numThreads; tid++) {
#include <limits>
#include <vector>
+#include "base/logging.hh"
#include "cpu/o3/fu_pool.hh"
#include "cpu/o3/inst_queue.hh"
#include "debug/IQ.hh"
DPRINTF(IQ, "IQ sharing policy set to Threshold:"
"%i entries per thread.\n",thresholdIQ);
} else {
- assert(0 && "Invalid IQ Sharing Policy.Options Are:{Dynamic,"
- "Partitioned, Threshold}");
+ panic("Invalid IQ sharing policy. Options are: Dynamic, "
+ "Partitioned, Threshold");
}
}
#include <list>
#include <string>
+#include "base/logging.hh"
#include "cpu/o3/lsq.hh"
#include "debug/Drain.hh"
#include "debug/Fetch.hh"
"%i entries per LQ | %i entries per SQ\n",
maxLQEntries,maxSQEntries);
} else {
- assert(0 && "Invalid LSQ Sharing Policy.Options Are:{Dynamic,"
- "Partitioned, Threshold}");
+ panic("Invalid LSQ sharing policy. Options are: Dynamic, "
+ "Partitioned, Threshold");
}
//Initialize LSQs
#include <list>
+#include "base/logging.hh"
#include "cpu/o3/rob.hh"
#include "debug/Fetch.hh"
#include "debug/ROB.hh"
maxEntries[tid] = threshold;
}
} else {
- assert(0 && "Invalid ROB Sharing Policy.Options Are:{Dynamic,"
- "Partitioned, Threshold}");
+ panic("Invalid ROB sharing policy. Options are: Dynamic, "
+ "Partitioned, Threshold");
}
resetState();
#include <cstdint>
#include <string>
+#include "base/logging.hh"
#include "enums/MemType.hh"
#include "enums/StorageClassType.hh"
#include "gpu-compute/compute_unit.hh"
} else if (isGroupSeg()) {
req->setMemSpaceConfigFlags(Request::GROUP_SEGMENT);
} else if (isFlat()) {
- // TODO: translate to correct scope
- assert(false);
+ panic("TODO: translate to correct scope");
} else {
fatal("%s has bad segment type\n", disassemble());
}
#include "arch/x86/regs/misc.hh"
#include "arch/x86/x86_traits.hh"
#include "base/bitfield.hh"
+#include "base/logging.hh"
#include "base/output.hh"
#include "base/trace.hh"
#include "cpu/base.hh"
if ((inUser && !tlb_entry->user) ||
(mode == BaseTLB::Write && badWrite)) {
- // The page must have been present to get into the TLB in
- // the first place. We'll assume the reserved bits are
- // fine even though we're not checking them.
- assert(false);
+ // The page must have been present to get into the TLB in
+ // the first place. We'll assume the reserved bits are
+ // fine even though we're not checking them.
+ panic("Page fault detected");
}
if (storeCheck && badWrite) {
- // This would fault if this were a write, so return a page
- // fault that reflects that happening.
- assert(false);
+ // This would fault if this were a write, so return a page
+ // fault that reflects that happening.
+ panic("Page fault detected");
}
}
*/
handleTranslationReturn(virtPageAddr, TLB_MISS, pkt);
} else {
- assert(false);
+ panic("Unexpected TLB outcome %d", outcome);
}
}
{
// The CPUSidePort never sends anything but replies. No retries
// expected.
- assert(false);
+ panic("recvReqRetry called");
}
AddrRangeList
{
// No retries should reach the TLB. The retries
// should only reach the TLBCoalescer.
- assert(false);
+ panic("recvReqRetry called");
}
void
virtual void recvFunctional(PacketPtr pkt);
virtual void recvRangeChange() { }
virtual void recvReqRetry();
- virtual void recvRespRetry() { assert(false); }
+ virtual void recvRespRetry() { panic("recvRespRetry called"); }
virtual AddrRangeList getAddrRanges() const;
};
#include <cstring>
+#include "base/logging.hh"
#include "debug/GPUTLB.hh"
#include "sim/process.hh"
void
TLBCoalescer::CpuSidePort::recvReqRetry()
{
- assert(false);
+ panic("recvReqRetry called");
}
void
#include <cassert>
#include <string>
+#include "base/logging.hh"
#include "base/trace.hh"
#include "base/types.hh"
#include "debug/Drain.hh"
return readyList.insert(i, entry);
}
}
- assert(false);
- return readyList.end(); // keep stupid compilers happy
+ panic("Failed to add to ready list.");
}
/** The number of entries that are in service. */
#include <memory>
+#include "base/logging.hh"
#include "base/output.hh"
#include "base/trace.hh"
#include "debug/MemCheckerMonitor.hh"
Tick
MemCheckerMonitor::recvAtomic(PacketPtr pkt)
{
- assert(false && "Atomic not supported");
- return masterPort.sendAtomic(pkt);
+ panic("Atomic not supported");
}
Tick
MemCheckerMonitor::recvAtomicSnoop(PacketPtr pkt)
{
- assert(false && "Atomic not supported");
- return slavePort.sendAtomicSnoop(pkt);
+ panic("Atomic not supported");
}
bool
#include "mem/ruby/filters/H3BloomFilter.hh"
#include "base/intmath.hh"
+#include "base/logging.hh"
using namespace std;
void
H3BloomFilter::unset(Addr addr)
{
- cout << "ERROR: Unset should never be called in a Bloom filter";
- assert(0);
+ panic("ERROR: Unset should never be called in a Bloom filter");
}
bool
#include <vector>
#include "base/intmath.hh"
+#include "base/logging.hh"
#include "base/str.hh"
using namespace std;
void
MultiBitSelBloomFilter::unset(Addr addr)
{
- cout << "ERROR: Unset should never be called in a Bloom filter";
- assert(0);
+ panic("ERROR: Unset should never be called in a Bloom filter");
}
bool
#include "mem/ruby/network/garnet2.0/RoutingUnit.hh"
#include "base/cast.hh"
+#include "base/logging.hh"
#include "mem/ruby/network/garnet2.0/InputUnit.hh"
#include "mem/ruby/network/garnet2.0/Router.hh"
#include "mem/ruby/slicc_interface/Message.hh"
// x_hops == 0 and y_hops == 0
// this is not possible
// already checked that in outportCompute() function
- assert(0);
+ panic("x_hops == y_hops == 0");
}
return m_outports_dirn2idx[outport_dirn];
int inport,
PortDirection inport_dirn)
{
- assert(0);
- return -1;
+ panic("%s placeholder executed", __FUNCTION__);
}
#include "mem/ruby/structures/CacheMemory.hh"
#include "base/intmath.hh"
+#include "base/logging.hh"
#include "debug/RubyCache.hh"
#include "debug/RubyCacheTrace.hh"
#include "debug/RubyResourceStalls.hh"
return false;
}
} else {
- assert(false);
- return true;
+ panic("Unrecognized cache resource type.");
}
}