Add rom based macroops into the macroop dict instead of dropping them on the floor
authorGabe Black <gblack@eecs.umich.edu>
Thu, 31 May 2007 22:21:20 +0000 (22:21 +0000)
committerGabe Black <gblack@eecs.umich.edu>
Thu, 31 May 2007 22:21:20 +0000 (22:21 +0000)
--HG--
extra : convert_revision : 964391c8050af0239da32bcc77550740de1f3160

src/arch/micro_asm.py

index d9d9d1b21f5db13c3de87f0f06603c64e449eb2a..7fb7b3f6d1c8955fe85ff884136fc6b7c11f0f08 100644 (file)
@@ -72,6 +72,9 @@ class Rom_Macroop(object):
         self.name = name
         self.target = target
 
+    def __str__(self):
+        return "%s: %s\n" % (self.name, self.target)
+
 class Rom(Micro_Container):
     def __init__(self, name):
         super(Rom, self).__init__(name)
@@ -329,7 +332,7 @@ def p_macroop_def_0(t):
         print_error("ROM based macroop found, but no ROM macroop class was specified.")
         raise TypeError, "ROM based macroop found, but no ROM macroop class was specified."
     macroop = t.parser.rom_macroop_type(t[3], t[5])
-    t[0] = macroop
+    t.parser.macroops[t[3]] = macroop
 
 
 # Defines a macroop that is combinationally generated