summaryrefslogtreecommitdiff
path: root/arch/isa_parser.py
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-02-19 02:34:52 -0500
committerGabe Black <gblack@eecs.umich.edu>2006-02-19 02:34:52 -0500
commit0e4a80df1a471671b6ef7003e29124b6835ade42 (patch)
tree1d2c44d8c3462dd94c0fbf6e4f149e026c901aa8 /arch/isa_parser.py
parenta48c24b61eedf580645ff0294b225d1e69a9444b (diff)
parent463aa6d49d49ba9c383f07207df57bad75c58ec9 (diff)
downloadgem5-0e4a80df1a471671b6ef7003e29124b6835ade42.tar.xz
Merge gblack@m5.eecs.umich.edu:/bk/multiarch
into ewok.(none):/home/gblack/m5/multiarch --HG-- extra : convert_revision : 090b30a7f70294e1aeb13ba0bc15da4061bdf348
Diffstat (limited to 'arch/isa_parser.py')
-rwxr-xr-xarch/isa_parser.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/isa_parser.py b/arch/isa_parser.py
index 606432e60..864a6a8a7 100755
--- a/arch/isa_parser.py
+++ b/arch/isa_parser.py
@@ -224,7 +224,7 @@ def p_specification(t):
namespace = isa_name + "Inst"
# wrap the decode block as a function definition
t[4].wrap_decode_block('''
-StaticInstPtr<%(isa_name)s>
+StaticInstPtr
%(isa_name)s::decodeInst(%(isa_name)s::MachInst machInst)
{
using namespace %(namespace)s;
@@ -1700,6 +1700,8 @@ namespace %(namespace)s {
%(namespace_output)s
} // namespace %(namespace)s
+
+%(decode_function)s
'''
@@ -1779,13 +1781,15 @@ def parse_isa_desc(isa_desc_file, output_dir, include_path):
includes = '#include "base/bitfield.hh" // for bitfield support'
global_output = global_code.header_output
namespace_output = namespace_code.header_output
+ decode_function = ''
update_if_needed(output_dir + '/decoder.hh', file_template % vars())
# generate decoder.cc
includes = '#include "%s/decoder.hh"' % include_path
global_output = global_code.decoder_output
namespace_output = namespace_code.decoder_output
- namespace_output += namespace_code.decode_block
+ # namespace_output += namespace_code.decode_block
+ decode_function = namespace_code.decode_block
update_if_needed(output_dir + '/decoder.cc', file_template % vars())
# generate per-cpu exec files
@@ -1794,6 +1798,7 @@ def parse_isa_desc(isa_desc_file, output_dir, include_path):
includes += cpu.includes
global_output = global_code.exec_output[cpu.name]
namespace_output = namespace_code.exec_output[cpu.name]
+ decode_function = ''
update_if_needed(output_dir + '/' + cpu.filename,
file_template % vars())