diff --git a/src/mem/ruby/slicc_interface/AbstractCacheEntry.hh b/src/mem/ruby/slicc_interface/AbstractCacheEntry.hh index aa37cc52fa..48e3b9daa1 100644 --- a/src/mem/ruby/slicc_interface/AbstractCacheEntry.hh +++ b/src/mem/ruby/slicc_interface/AbstractCacheEntry.hh @@ -50,10 +50,9 @@ #include "base/logging.hh" #include "mem/cache/replacement_policies/replaceable_entry.hh" #include "mem/ruby/common/Address.hh" +#include "mem/ruby/common/DataBlock.hh" #include "mem/ruby/protocol/AccessPermission.hh" -class DataBlock; - class AbstractCacheEntry : public ReplaceableEntry { private: @@ -73,8 +72,15 @@ class AbstractCacheEntry : public ReplaceableEntry // The methods below are those called by ruby runtime, add when it // is absolutely necessary and should all be virtual function. - virtual DataBlock& getDataBlk() - { panic("getDataBlk() not implemented!"); } + virtual DataBlock& + getDataBlk() + { + panic("getDataBlk() not implemented!"); + + // Dummy return to appease the compiler + static DataBlock b; + return b; + } int validBlocks; virtual int& getNumValidBlocks() diff --git a/src/mem/slicc/symbols/Type.py b/src/mem/slicc/symbols/Type.py index 7ac77ac07d..a1ca20012d 100644 --- a/src/mem/slicc/symbols/Type.py +++ b/src/mem/slicc/symbols/Type.py @@ -586,6 +586,8 @@ AccessPermission ${{self.c_ident}}_to_permission(const ${{self.c_ident}}& obj) default: panic("Unknown state access permission converstion for ${{self.c_ident}}"); } + // Appease the compiler since this function has a return value + return AccessPermission_Invalid; } ''') @@ -626,6 +628,8 @@ ${{self.c_ident}}_to_string(const ${{self.c_ident}}& obj) default: panic("Invalid range for type ${{self.c_ident}}"); } + // Appease the compiler since this function has a return value + return ""; } // Code to convert from a string to the enumeration @@ -689,6 +693,8 @@ ${{self.c_ident}}_base_level(const ${{self.c_ident}}& obj) default: panic("Invalid range for type ${{self.c_ident}}"); } + // Appease the compiler since this function has a return value + return -1; } /** \\brief returns the machine type for each base vector index used by NetDest @@ -772,6 +778,8 @@ ${{self.c_ident}}_base_count(const ${{self.c_ident}}& obj) default: panic("Invalid range for type ${{self.c_ident}}"); } + // Appease the compiler since this function has a return value + return -1; } ''')