From 7842e955193c3fba850201acc45001306fe2ff9b Mon Sep 17 00:00:00 2001 From: Brad Beckmann Date: Wed, 23 Feb 2011 16:41:58 -0800 Subject: MOESI_hammer: cache probe address clean up --- src/mem/slicc/ast/LocalVariableAST.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/mem/slicc/ast/LocalVariableAST.py') 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 -- cgit v1.2.3