summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mem/slicc/symbols/Type.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mem/slicc/symbols/Type.py b/src/mem/slicc/symbols/Type.py
index 6ee48ba8b..1c2177ce1 100644
--- a/src/mem/slicc/symbols/Type.py
+++ b/src/mem/slicc/symbols/Type.py
@@ -540,9 +540,11 @@ ConvertMachToGenericMach(MachineType machType)
{
''')
for enum in self.enums.itervalues():
+ genericType = self.enums[enum.ident].get('genericType',
+ enum.ident)
code('''
if (machType == MachineType_${{enum.ident}})
- return GenericMachineType_${{enum.ident}};
+ return GenericMachineType_${{genericType}};
''')
code('''
panic("cannot convert to a GenericMachineType");