diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2007-04-10 17:27:33 +0000 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2007-04-10 17:27:33 +0000 |
commit | fcc35a67e0cfa2e627ebba3fca0252bfb18f03c6 (patch) | |
tree | cd7bb69a26beca9bae831112a79b56cc3d4bbbfa /src/arch/x86/isa/base.isa | |
parent | f71a6c8fed86c62d309908f37311456e8ec7a588 (diff) | |
parent | 74122c04cf8105d507f390c456c6e3c113b5a56e (diff) | |
download | gem5-fcc35a67e0cfa2e627ebba3fca0252bfb18f03c6.tar.xz |
Merge zizzer.eecs.umich.edu:/bk/newmem
into ahchoo.blinky.homelinux.org:/home/gblack/m5/newmem-x86
--HG--
extra : convert_revision : c5275ef3e53393496a2ebe05b2f516884bb392f9
Diffstat (limited to 'src/arch/x86/isa/base.isa')
-rw-r--r-- | src/arch/x86/isa/base.isa | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/arch/x86/isa/base.isa b/src/arch/x86/isa/base.isa index cd166b306..eba24f709 100644 --- a/src/arch/x86/isa/base.isa +++ b/src/arch/x86/isa/base.isa @@ -58,6 +58,38 @@ // Base class for sparc instructions, and some support functions // +let {{ + # This class will help make dealing with output a little less verbose + class OutputBlocks(object): + def __init__(self, header_output="", + decoder_output="", + decode_block="", + exec_output=""): + self.header_output = header_output + self.decoder_output = decoder_output + self.decode_block = decode_block + self.exec_output = exec_output + + def append(self, blocks): + if isinstance(blocks, list) or isinstance(blocks, tuple): + assert(len(blocks) == 4) + self.header_output += blocks[0] + self.decoder_output += blocks[1] + self.decode_block += blocks[2] + self.exec_output += blocks[3] + else: + self.header_output += blocks.header_output + self.decoder_output += blocks.decoder_output + self.decode_block += blocks.decode_block + self.exec_output += blocks.exec_output + + def makeList(self): + return (self.header_output, + self.decoder_output, + self.decode_block, + self.exec_output) +}}; + output header {{ /** |