arch,base,cpu,dev: Get rid of the M5_DUMMY_RETURN macro.

This macro probably would have been defined to "return" in some cases,
to be put after a call to a function that doesn't return so that the
compiler wouldn't think control would reach the end of a non-void
function. It was only ever defined to expand to nothing, and now that
[[noreturn]] is a standard attribute, it should never be needed going
forward.

Change-Id: I37625eab72deeaede77f9347116b9fddd75febf7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35217
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Gabe Black
2020-09-26 16:30:28 -07:00
parent 50a0b85367
commit 62aa07c915
8 changed files with 4 additions and 23 deletions

View File

@@ -56,13 +56,10 @@ namespace ArmISA
uint64_t
getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp)
{
if (!FullSystem) {
panic("getArgument() only implemented for full system mode.\n");
M5_DUMMY_RETURN
}
panic_if(!FullSystem,
"getArgument() only implemented for full system mode.");
if (fp)
panic("getArgument(): Floating point arguments not implemented\n");
panic_if(fp, "getArgument(): Floating point arguments not implemented");
if (inAArch64(tc)) {
if (size == (uint16_t)(-1))

View File

@@ -47,7 +47,6 @@ uint64_t
getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp)
{
panic("getArgument() not implemented\n");
M5_DUMMY_RETURN
}
uint64_t

View File

@@ -43,10 +43,7 @@ namespace SparcISA {
uint64_t
getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp)
{
if (!FullSystem) {
panic("getArgument() only implemented for full system\n");
M5_DUMMY_RETURN
}
panic_if(!FullSystem, "getArgument() only implemented for full system");
const int NumArgumentRegs = 6;
if (number < NumArgumentRegs) {

View File

@@ -47,7 +47,6 @@
#if defined(__GNUC__) // clang or gcc
# define M5_ATTR_NORETURN __attribute__((noreturn))
# define M5_DUMMY_RETURN
# define M5_VAR_USED __attribute__((unused))
# define M5_ATTR_PACKED __attribute__ ((__packed__))
# define M5_NO_INLINE __attribute__ ((__noinline__))

View File

@@ -106,7 +106,6 @@ StaticInst::branchTarget(const TheISA::PCState &pc) const
{
panic("StaticInst::branchTarget() called on instruction "
"that is not a PC-relative branch.");
M5_DUMMY_RETURN;
}
TheISA::PCState
@@ -114,7 +113,6 @@ StaticInst::branchTarget(ThreadContext *tc) const
{
panic("StaticInst::branchTarget() called on instruction "
"that is not an indirect branch.");
M5_DUMMY_RETURN;
}
const string &

View File

@@ -49,14 +49,12 @@ Tick
BadDevice::read(PacketPtr pkt)
{
panic("Device %s not imlpmented\n", devname);
M5_DUMMY_RETURN
}
Tick
BadDevice::write(PacketPtr pkt)
{
panic("Device %s not imlpmented\n", devname);
M5_DUMMY_RETURN
}
BadDevice *

View File

@@ -108,21 +108,18 @@ class Malta : public Platform
calcPciConfigAddr(int bus, int dev, int func)
{
panic("Need implementation\n");
M5_DUMMY_RETURN
}
Addr
calcPciIOAddr(Addr addr)
{
panic("Need implementation\n");
M5_DUMMY_RETURN
}
Addr
calcPciMemAddr(Addr addr)
{
panic("Need implementation\n");
M5_DUMMY_RETURN
}
void serialize(CheckpointOut &cp) const override;

View File

@@ -75,7 +75,6 @@ Addr
T1000::pciToDma(Addr pciAddr) const
{
panic("Need implementation\n");
M5_DUMMY_RETURN
}
@@ -83,21 +82,18 @@ Addr
T1000::calcPciConfigAddr(int bus, int dev, int func)
{
panic("Need implementation\n");
M5_DUMMY_RETURN
}
Addr
T1000::calcPciIOAddr(Addr addr)
{
panic("Need implementation\n");
M5_DUMMY_RETURN
}
Addr
T1000::calcPciMemAddr(Addr addr)
{
panic("Need implementation\n");
M5_DUMMY_RETURN
}
T1000 *