changeset 2596:01cd8aa40573

populate registers at full size in test generator to expose masking bugs
author Michael Pavone <pavone@retrodev.com>
date Sun, 09 Feb 2025 22:08:47 -0800
parents eb4b37c14c93
children 142bb1eb8ab2
files gentests.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gentests.py	Sun Feb 09 20:36:06 2025 -0800
+++ b/gentests.py	Sun Feb 09 22:08:47 2025 -0800
@@ -94,6 +94,9 @@
 
 	def write_init(self, outfile, size, already):
 		if not str(self) in already and not self.kind in ('ccr', 'sr'):
+			if self.kind in ('d', 'a'):
+				#populate all register bits during init to catch masking bugs
+				size = 'l'
 			minv,maxv = get_size_range(size)
 			val = randint(minv,maxv)
 			already[str(self)] = val