summaryrefslogtreecommitdiff
path: root/arch/isa_parser.py
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2006-02-23 14:31:15 -0500
committerSteve Reinhardt <stever@eecs.umich.edu>2006-02-23 14:31:15 -0500
commit99484cfae81f3f01ccdfcd273ddc2bdb41e6456b (patch)
tree72ab68b6bc4f31d4131afd8f241ab973f8e9c25a /arch/isa_parser.py
parent9949ccf16158668ad0d9282a97c372a69de09532 (diff)
downloadgem5-99484cfae81f3f01ccdfcd273ddc2bdb41e6456b.tar.xz
Create a Builder object for .isa files in arch/SConscript.
Start using SCons File objects to avoid fixed paths in subordinate SConscripts. SConscript: Push isa_parser stuff (including .isa scanner) down into arch/SConscript. arch/SConscript: Create a Builder object for .isa files, including existing scanner. Return file objects generated by isa-specific SConscript back up to parent. arch/alpha/SConscript: arch/mips/SConscript: arch/sparc/SConscript: Convert sources to scons File objects, so file names can be specified relative to the current directory. Invoke new builder for isa description, and get generated sources from there (instead of listing them explicitly). arch/isa_parser.py: Get rid of third argument ("include_path"). It was a pain to generate this from scons, and it turned out it's not needed anyway, since the only included file (decoder.hh) will be in the same directory as the sources. --HG-- extra : convert_revision : 36861bcef36763f229704d8cb7a642b4486a3581
Diffstat (limited to 'arch/isa_parser.py')
-rwxr-xr-xarch/isa_parser.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/isa_parser.py b/arch/isa_parser.py
index b92d267c9..a2bf31a0c 100755
--- a/arch/isa_parser.py
+++ b/arch/isa_parser.py
@@ -1751,7 +1751,7 @@ def preprocess_isa_desc(isa_desc):
#
# Read in and parse the ISA description.
#
-def parse_isa_desc(isa_desc_file, output_dir, include_path):
+def parse_isa_desc(isa_desc_file, output_dir):
# set a global var for the input filename... used in error messages
global input_filename
input_filename = isa_desc_file
@@ -1781,7 +1781,7 @@ def parse_isa_desc(isa_desc_file, output_dir, include_path):
update_if_needed(output_dir + '/decoder.hh', file_template % vars())
# generate decoder.cc
- includes = '#include "%s/decoder.hh"' % include_path
+ includes = '#include "decoder.hh"'
global_output = global_code.decoder_output
namespace_output = namespace_code.decoder_output
# namespace_output += namespace_code.decode_block
@@ -1790,7 +1790,7 @@ def parse_isa_desc(isa_desc_file, output_dir, include_path):
# generate per-cpu exec files
for cpu in CpuModel.list:
- includes = '#include "%s/decoder.hh"\n' % include_path
+ includes = '#include "decoder.hh"\n'
includes += cpu.includes
global_output = global_code.exec_output[cpu.name]
namespace_output = namespace_code.exec_output[cpu.name]
@@ -1800,4 +1800,4 @@ def parse_isa_desc(isa_desc_file, output_dir, include_path):
# Called as script: get args from command line.
if __name__ == '__main__':
- parse_isa_desc(sys.argv[1], sys.argv[2], sys.argv[3])
+ parse_isa_desc(sys.argv[1], sys.argv[2])