diff python/ppci/irmach.py @ 366:39bf68bf1891

Fix sample tests and deterministic build
author Windel Bouwman
date Fri, 21 Mar 2014 09:43:01 +0100
parents 3bb7dcfe5529
children 5d03c10fe19d
line wrap: on
line diff
--- a/python/ppci/irmach.py	Wed Mar 19 22:32:04 2014 +0100
+++ b/python/ppci/irmach.py	Fri Mar 21 09:43:01 2014 +0100
@@ -40,6 +40,10 @@
         self.others = tuple(others)
         self.ismove = ismove
 
+    def __gt__(self, other):
+        """ To make the class fit for sorting """
+        return str(self) > str(other)
+
     def __repr__(self):
         """ Substitutes source, dst and labels in the string """
         if isinstance(self.assem, Instruction):