summaryrefslogtreecommitdiff
path: root/src/mem/slicc
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2011-02-23 16:41:58 -0800
committerBrad Beckmann <Brad.Beckmann@amd.com>2011-02-23 16:41:58 -0800
commit7842e955193c3fba850201acc45001306fe2ff9b (patch)
tree6bf34845037b52ef86831c728cef0196413c122c /src/mem/slicc
parent3bc33eeaea3172fa65ec40f1e0eef9554eb51d8f (diff)
downloadgem5-7842e955193c3fba850201acc45001306fe2ff9b.tar.xz
MOESI_hammer: cache probe address clean up
Diffstat (limited to 'src/mem/slicc')
-rw-r--r--src/mem/slicc/ast/LocalVariableAST.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mem/slicc/ast/LocalVariableAST.py b/src/mem/slicc/ast/LocalVariableAST.py
index 82e73ba7a..b779415f3 100644
--- a/src/mem/slicc/ast/LocalVariableAST.py
+++ b/src/mem/slicc/ast/LocalVariableAST.py
@@ -30,10 +30,11 @@ from slicc.ast.StatementAST import StatementAST
from slicc.symbols import Var
class LocalVariableAST(StatementAST):
- def __init__(self, slicc, type_ast, ident):
+ def __init__(self, slicc, type_ast, ident, pointer = False):
super(LocalVariableAST, self).__init__(slicc)
self.type_ast = type_ast
self.ident = ident
+ self.pointer = pointer
def __repr__(self):
return "[LocalVariableAST: %r %r]" % (self.type_ast, self.ident)
@@ -50,5 +51,9 @@ class LocalVariableAST(StatementAST):
v = Var(self.symtab, self.ident, self.location, type, ident,
self.pairs)
self.symtab.newSymbol(v)
- code += "%s* %s" % (type.c_ident, ident)
+ if self.pointer or str(type) == "TBE" or (
+ "interface" in type and type["interface"] == "AbstractCacheEntry"):
+ code += "%s* %s" % (type.c_ident, ident)
+ else:
+ code += "%s %s" % (type.c_ident, ident)
return type