misc: string.join has been removed in python3
[gem5.git] / src / arch / micro_asm.py
index 4e5400ceffe8d075ecf935cc64f6b9968aef7184..536f70994a9fc7775257c3ccf843cb1cb40f595e 100644 (file)
 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# Authors: Gabe Black
+
+from __future__ import print_function
 
 import os
 import sys
 import re
-import string
 import traceback
 # get type names
 from types import *
@@ -117,9 +116,9 @@ class Directive(Statement):
 ##########################################################################
 
 def print_error(message):
-    print
-    print "*** %s" % message
-    print
+    print()
+    print("*** %s" % message)
+    print()
 
 def handle_statement(parser, container, statement):
     if statement.is_microop:
@@ -153,7 +152,7 @@ def handle_statement(parser, container, statement):
                     statement.params, {}, parser.symbols)
         except:
             print_error("Error executing directive.")
-            print container.directives
+            print(container.directives)
             raise
     else:
         raise Exception, "Didn't recognize the type of statement", statement