From efc41fe82d6e1acb82aadd1063efd5e223f876f7 Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Tue, 28 Mar 2006 22:29:42 -0500 Subject: Make .isa-file ##include file paths relative to including file. Makes .isa files cleaner and simplifies scanner too. Simplified scanner to work under both old and new versions of scons. arch/SConscript: Simplify .isa scanner... seems to work with both scons 0.96.1 and 0.96.91 now. Assumes .isa ##include paths are relative to including file. arch/alpha/isa/main.isa: arch/mips/isa/formats/formats.isa: arch/mips/isa/main.isa: arch/sparc/isa/formats.isa: arch/sparc/isa/main.isa: Make ##include paths relative to including file. arch/isa_parser.py: Make ##include file paths relative to including file. Makes .isa files cleaner and simplifies scanner too. Partial rewrite of include-handling code to use cool re.sub() feature where you can specify a function to provide the replacement string. Minor cleanup of error-handling code. Also got rid of '#!' at top to make caller choose which python interpreter is used (since SPARC now requires 2.4 to build, we may need to do that via scons in the future). --HG-- rename : arch/mips/isa/formats.isa => arch/mips/isa/formats/formats.isa extra : convert_revision : 15a3920fa3aaf80cd94083eda853aa4e49425045 --- arch/sparc/isa/formats.isa | 18 +++++++++--------- arch/sparc/isa/main.isa | 12 ++++++------ 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'arch/sparc') diff --git a/arch/sparc/isa/formats.isa b/arch/sparc/isa/formats.isa index 9310ba3d3..8683f5e01 100644 --- a/arch/sparc/isa/formats.isa +++ b/arch/sparc/isa/formats.isa @@ -1,28 +1,28 @@ //Include the basic format //Templates from this format are used later -##include "m5/arch/sparc/isa/formats/basic.isa" +##include "formats/basic.isa" //Include the integerOp and integerOpCc format -##include "m5/arch/sparc/isa/formats/integerop.isa" +##include "formats/integerop.isa" //Include the memory format -##include "m5/arch/sparc/isa/formats/mem.isa" +##include "formats/mem.isa" //Include the compare and swap format -##include "m5/arch/sparc/isa/formats/cas.isa" +##include "formats/cas.isa" //Include the trap format -##include "m5/arch/sparc/isa/formats/trap.isa" +##include "formats/trap.isa" //Include the "unknown" format -##include "m5/arch/sparc/isa/formats/unknown.isa" +##include "formats/unknown.isa" //Include the priveleged mode format -##include "m5/arch/sparc/isa/formats/priv.isa" +##include "formats/priv.isa" //Include the branch format -##include "m5/arch/sparc/isa/formats/branch.isa" +##include "formats/branch.isa" //Include the noop format -##include "m5/arch/sparc/isa/formats/noop.isa" +##include "formats/noop.isa" diff --git a/arch/sparc/isa/main.isa b/arch/sparc/isa/main.isa index ab0290d58..35167d6b7 100644 --- a/arch/sparc/isa/main.isa +++ b/arch/sparc/isa/main.isa @@ -26,7 +26,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -##include "m5/arch/sparc/isa/includes.isa" +##include "includes.isa" //////////////////////////////////////////////////////////////////// // @@ -37,16 +37,16 @@ namespace SparcISA; //Include the bitfield definitions -##include "m5/arch/sparc/isa/bitfields.isa" +##include "bitfields.isa" //Include the operand_types and operand definitions -##include "m5/arch/sparc/isa/operands.isa" +##include "operands.isa" //Include the base class for sparc instructions, and some support code -##include "m5/arch/sparc/isa/base.isa" +##include "base.isa" //Include the definitions for the instruction formats -##include "m5/arch/sparc/isa/formats.isa" +##include "formats.isa" //Include the decoder definition -##include "m5/arch/sparc/isa/decoder.isa" +##include "decoder.isa" -- cgit v1.2.3