summaryrefslogtreecommitdiff
path: root/src/mem/slicc/symbols
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/slicc/symbols')
-rw-r--r--src/mem/slicc/symbols/Func.py7
-rw-r--r--src/mem/slicc/symbols/Transition.py2
2 files changed, 5 insertions, 4 deletions
diff --git a/src/mem/slicc/symbols/Func.py b/src/mem/slicc/symbols/Func.py
index a52b6bbcc..d50d0309f 100644
--- a/src/mem/slicc/symbols/Func.py
+++ b/src/mem/slicc/symbols/Func.py
@@ -29,7 +29,7 @@ from slicc.symbols.Symbol import Symbol
from slicc.symbols.Type import Type
class Func(Symbol):
- def __init__(self, table, ident, location, return_type, param_types,
+ def __init__(self, table, ident, name, location, return_type, param_types,
param_strings, body, pairs):
super(Func, self).__init__(table, ident, location, pairs)
self.return_type = return_type
@@ -38,6 +38,7 @@ class Func(Symbol):
self.body = body
self.isInternalMachineFunc = False
self.c_ident = ident
+ self.c_name = name
self.class_name = ""
def __repr__(self):
@@ -55,7 +56,7 @@ class Func(Symbol):
elif "return_by_pointer" in self and self.return_type != void_type:
return_type += "*"
- return "%s %s(%s);" % (return_type, self.c_ident,
+ return "%s %s(%s);" % (return_type, self.c_name,
", ".join(self.param_strings))
def writeCodeFiles(self, path, includes):
@@ -80,7 +81,7 @@ class Func(Symbol):
code('''
$return_type
-${{self.class_name}}::${{self.c_ident}}($params)
+${{self.class_name}}::${{self.c_name}}($params)
{
${{self.body}}
}
diff --git a/src/mem/slicc/symbols/Transition.py b/src/mem/slicc/symbols/Transition.py
index 9ecd6c54b..856d3f4b0 100644
--- a/src/mem/slicc/symbols/Transition.py
+++ b/src/mem/slicc/symbols/Transition.py
@@ -40,7 +40,7 @@ class Transition(Symbol):
# check to make sure there is a getNextState function declared
found = False
for func in machine.functions:
- if func.c_ident == 'getNextState':
+ if func.c_ident == 'getNextState_Address':
found = True
break
if found == False: