ARM: Decode to specialized conditional/unconditional versions of instructions.
[gem5.git] / src / SConscript
index 705d76b1dcc04ba876b903551c602c93071b75d8..51616701b36234ad131209c321b55cbebadd8b78 100644 (file)
@@ -88,7 +88,7 @@ class SourceFile(object):
 
         for base in type(self).__mro__:
             if issubclass(base, SourceFile):
-                bisect.insort_right(base.all, self)       
+                base.all.append(self)
 
     def __lt__(self, other): return self.filename < other.filename
     def __le__(self, other): return self.filename <= other.filename
@@ -132,15 +132,15 @@ class PySource(SourceFile):
         modpath = '.'.join(modpath)
 
         arcpath = path + [ self.basename ]
-        debugname = self.snode.abspath
-        if not exists(debugname):
-            debugname = self.tnode.abspath
+        abspath = self.snode.abspath
+        if not exists(abspath):
+            abspath = self.tnode.abspath
 
         self.package = package
         self.modname = modname
         self.modpath = modpath
         self.arcname = joinpath(*arcpath)
-        self.debugname = debugname
+        self.abspath = abspath
         self.compiled = File(self.filename + 'c')
         self.assembly = File(self.filename + '.s')
         self.symname = "PyEMB_" + PySource.invalid_sym_char.sub('_', modpath)
@@ -339,9 +339,9 @@ class DictImporter(object):
         source = self.modules[fullname]
         if source.modname == '__init__':
             mod.__path__ = source.modpath
-        mod.__file__ = source.snode.abspath
+        mod.__file__ = source.abspath
 
-        exec file(source.snode.abspath, 'r') in mod.__dict__
+        exec file(source.abspath, 'r') in mod.__dict__
 
         return mod
 
@@ -411,9 +411,12 @@ buildEnv = m5.util.SmartDict($build_env)
 hgRev = '$hg_info'
 
 compileDate = m5.internal.core.compileDate
-for k,v in m5.internal.core.__dict__.iteritems():
-    if k.startswith('flag_'):
-        setattr(buildEnv, k[5:], v)
+_globals = globals()
+for key,val in m5.internal.core.__dict__.iteritems():
+    if key.startswith('flag_'):
+        flag = key[5:]
+        _globals[flag] = val
+del _globals
 """)
     code.write(str(target[0]))
 
@@ -889,7 +892,7 @@ def objectifyPyFile(target, source, env):
     dst = file(str(target[0]), 'w')
 
     pysource = PySource.tnodes[source[0]]
-    compiled = compile(src, pysource.debugname, 'exec')
+    compiled = compile(src, pysource.abspath, 'exec')
     marshalled = marshal.dumps(compiled)
     compressed = zlib.compress(marshalled)
     data = compressed