summaryrefslogtreecommitdiff
path: root/src/mem/slicc
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/slicc')
-rw-r--r--src/mem/slicc/ast/FormalParamAST.py5
-rw-r--r--src/mem/slicc/ast/LocalVariableAST.py4
-rw-r--r--src/mem/slicc/ast/MemberExprAST.py5
-rw-r--r--src/mem/slicc/ast/MethodCallExprAST.py6
-rw-r--r--src/mem/slicc/ast/PeekStatementAST.py2
-rw-r--r--src/mem/slicc/symbols/StateMachine.py8
6 files changed, 16 insertions, 14 deletions
diff --git a/src/mem/slicc/ast/FormalParamAST.py b/src/mem/slicc/ast/FormalParamAST.py
index e94f24ccb..6ed5bca0a 100644
--- a/src/mem/slicc/ast/FormalParamAST.py
+++ b/src/mem/slicc/ast/FormalParamAST.py
@@ -52,8 +52,9 @@ class FormalParamAST(AST):
self.pairs)
self.symtab.newSymbol(v)
if self.pointer or str(type) == "TBE" or (
- "interface" in type and type["interface"] == "AbstractCacheEntry"):
-
+ "interface" in type and (
+ type["interface"] == "AbstractCacheEntry" or
+ type["interface"] == "AbstractEntry")):
return type, "%s* %s" % (type.c_ident, param)
else:
return type, "const %s& %s" % (type.c_ident, param)
diff --git a/src/mem/slicc/ast/LocalVariableAST.py b/src/mem/slicc/ast/LocalVariableAST.py
index b779415f3..0b77323b7 100644
--- a/src/mem/slicc/ast/LocalVariableAST.py
+++ b/src/mem/slicc/ast/LocalVariableAST.py
@@ -52,7 +52,9 @@ class LocalVariableAST(StatementAST):
self.pairs)
self.symtab.newSymbol(v)
if self.pointer or str(type) == "TBE" or (
- "interface" in type and type["interface"] == "AbstractCacheEntry"):
+ "interface" in type and (
+ type["interface"] == "AbstractCacheEntry" or
+ type["interface"] == "AbstractEntry")):
code += "%s* %s" % (type.c_ident, ident)
else:
code += "%s %s" % (type.c_ident, ident)
diff --git a/src/mem/slicc/ast/MemberExprAST.py b/src/mem/slicc/ast/MemberExprAST.py
index 412c178d8..6a6fc49bb 100644
--- a/src/mem/slicc/ast/MemberExprAST.py
+++ b/src/mem/slicc/ast/MemberExprAST.py
@@ -41,7 +41,10 @@ class MemberExprAST(ExprAST):
return_type, gcode = self.expr_ast.inline(True)
fix = code.nofix()
- if str(return_type) == "TBE" or ("interface" in return_type and return_type["interface"] == "AbstractCacheEntry"):
+ if str(return_type) == "TBE" \
+ or ("interface" in return_type and
+ (return_type["interface"] == "AbstractCacheEntry" or
+ return_type["interface"] == "AbstractEntry")):
code("(*$gcode).m_${{self.field}}")
else:
code("($gcode).m_${{self.field}}")
diff --git a/src/mem/slicc/ast/MethodCallExprAST.py b/src/mem/slicc/ast/MethodCallExprAST.py
index cfee9b19d..cf30cfa96 100644
--- a/src/mem/slicc/ast/MethodCallExprAST.py
+++ b/src/mem/slicc/ast/MethodCallExprAST.py
@@ -162,8 +162,10 @@ class MemberMethodCallExprAST(MethodCallExprAST):
prefix = "static_cast<%s &>" % return_type.c_ident
if str(obj_type) == "AbstractCacheEntry" or \
- ("interface" in obj_type and
- obj_type["interface"] == "AbstractCacheEntry"):
+ str(obj_type) == "AbstractEntry" or \
+ ("interface" in obj_type and (
+ obj_type["interface"] == "AbstractCacheEntry" or
+ obj_type["interface"] == "AbstractEntry")):
prefix = "%s((*(%s))." % (prefix, code)
else:
prefix = "%s((%s)." % (prefix, code)
diff --git a/src/mem/slicc/ast/PeekStatementAST.py b/src/mem/slicc/ast/PeekStatementAST.py
index cc3091c8a..a9816bd3d 100644
--- a/src/mem/slicc/ast/PeekStatementAST.py
+++ b/src/mem/slicc/ast/PeekStatementAST.py
@@ -60,7 +60,7 @@ class PeekStatementAST(StatementAST):
code('''
{
// Declare message
- const $mtid* in_msg_ptr;
+ const $mtid* in_msg_ptr M5_VAR_USED;
in_msg_ptr = dynamic_cast<const $mtid *>(($qcode).${{self.method}}());
assert(in_msg_ptr != NULL); // Check the cast result
''')
diff --git a/src/mem/slicc/symbols/StateMachine.py b/src/mem/slicc/symbols/StateMachine.py
index 4d3618093..a3ea1ca8a 100644
--- a/src/mem/slicc/symbols/StateMachine.py
+++ b/src/mem/slicc/symbols/StateMachine.py
@@ -253,7 +253,6 @@ public:
const int & getVersion() const;
const std::string toString() const;
const std::string getName() const;
- const MachineType getMachineType() const;
void stallBuffer(MessageBuffer* buf, Address addr);
void wakeUpBuffers(Address addr);
void wakeUpAllBuffers();
@@ -411,6 +410,7 @@ void unset_tbe(${{self.TBEType.c_ident}}*& m_tbe_ptr);
#include <sstream>
#include <string>
+#include "base/compiler.hh"
#include "base/cprintf.hh"
#include "debug/RubyGenerated.hh"
#include "debug/RubySlicc.hh"
@@ -705,12 +705,6 @@ $c_ident::getName() const
return m_name;
}
-const MachineType
-$c_ident::getMachineType() const
-{
- return MachineType_${ident};
-}
-
void
$c_ident::stallBuffer(MessageBuffer* buf, Address addr)
{