changeset 1837:f6ee0df6bb48

Minor fix to 68K test generator script
author Michael Pavone <pavone@retrodev.com>
date Thu, 18 Apr 2019 19:47:33 -0700
parents 56a1171e29b9
children 0c1491818f4b
files gentests.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gentests.py	Thu Apr 04 23:08:45 2019 -0700
+++ b/gentests.py	Thu Apr 18 19:47:33 2019 -0700
@@ -136,7 +136,10 @@
 			num = already.get('label', 0)+1
 			already['label'] = num
 			if (already[str(self.index)] + self.disp) & 1:
-				self.disp += 1
+				if self.disp > 0:
+					self.disp -= 1
+				else:
+					self.disp += 1
 			address = 'lbl_' + str(num) + ' + 2 + ' + str(self.disp) + ' + ' + str(index)
 		else:
 			if self.base == self.index: