summaryrefslogtreecommitdiff
path: root/src/arch/micro_asm_test.py
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-05-31 20:45:06 +0000
committerGabe Black <gblack@eecs.umich.edu>2007-05-31 20:45:06 +0000
commitd24a9c7d21702a7eb16a06af6508bf922ca11d6a (patch)
treefd38cdabd48ee2fd2a4e9d33b45d611685ab171d /src/arch/micro_asm_test.py
parentace2890f9fd10fb8b19004b80befc1c9d0948246 (diff)
downloadgem5-d24a9c7d21702a7eb16a06af6508bf922ca11d6a.tar.xz
Make directives take parameters and use the directive function and not it's name
--HG-- extra : convert_revision : fbc93ba592b0cc009696e8d7edead841ec2ea01c
Diffstat (limited to 'src/arch/micro_asm_test.py')
-rwxr-xr-xsrc/arch/micro_asm_test.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/arch/micro_asm_test.py b/src/arch/micro_asm_test.py
index 816a74b71..858ac511e 100755
--- a/src/arch/micro_asm_test.py
+++ b/src/arch/micro_asm_test.py
@@ -57,12 +57,15 @@ class TestMacroop(Macroop):
microops["bah"] = Bah_Tweaked
def untweak(self):
microops["bah"] = Bah
+ def print_debug(self, message):
+ print message
def __init__(self, name):
super(TestMacroop, self).__init__(name)
self.directives = {
"tweak": self.tweak,
- "untweak": self.untweak
+ "untweak": self.untweak,
+ "print": self.print_debug
}
assembler = MicroAssembler(TestMacroop, microops, Rom('main ROM'))
@@ -82,6 +85,7 @@ def macroop squishy {
.tweak
bah
.untweak
+ .print "In the midst"
bah
dah # single line comment after something
.tweak