From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13619 invoked by alias); 28 Jan 2002 19:12:49 -0000 Mailing-List: contact cgen-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sources.redhat.com Received: (qmail 13569 invoked from network); 28 Jan 2002 19:12:44 -0000 Received: from unknown (HELO krynn.axis.se) (193.13.178.10) by sources.redhat.com with SMTP; 28 Jan 2002 19:12:44 -0000 Received: from ignucius.axis.se (root@ignucius.axis.se [10.13.1.18]) by krynn.axis.se (8.12.1/8.12.1/Debian -2) with ESMTP id g0SJCgR2009421; Mon, 28 Jan 2002 20:12:42 +0100 Received: (from hp@localhost) by ignucius.axis.se (8.9.3/8.9.3/Debian 8.9.3-21) id UAA09786; Mon, 28 Jan 2002 20:12:42 +0100 Date: Mon, 28 Jan 2002 11:12:00 -0000 Message-Id: <200201281912.UAA09786@ignucius.axis.se> From: Hans-Peter Nilsson To: cgen@sources.redhat.com Subject: More doc patches: call toplevel directory toplevel; *.cpu files are in cpu/ X-SW-Source: 2002-q1/txt/msg00014.txt.bz2 It seems docs weren't updated after *.cpu files (I guess) moved to cpu/ at the beginning of time. I think most people outside Red Hat would be helped if the top-level directory is called "toplevel" rather than "devo" without further explanation. Ok to commit? 2002-01-28 Hans-Peter Nilsson * doc/porting.texi: When referring to *.opc, mention they are in the cpu subdir. Call top-level directory toplevel, not devo. Close string in define-normal-insn example. Index: porting.texi =================================================================== RCS file: /cvs/src/src/cgen/doc/porting.texi,v retrieving revision 1.4 diff -p -c -r1.4 porting.texi *** porting.texi 2001/11/26 16:41:08 1.4 --- porting.texi 2002/01/28 18:58:05 *************** code and tables for each CPU that is por *** 56,62 **** For opcodes, several files are generated. No additional code need be written in the opcodes directory although as an escape hatch the user ! can add target specific code to file .opc in the CGEN source directory. These functions will be included in the relevant generated files. An example of when you need to create an .opc file is when there are special pseudo-ops that need to be parsed, for example the --- 56,62 ---- For opcodes, several files are generated. No additional code need be written in the opcodes directory although as an escape hatch the user ! can add target specific code to file .opc in the CGEN cpu source directory. These functions will be included in the relevant generated files. An example of when you need to create an .opc file is when there are special pseudo-ops that need to be parsed, for example the *************** high/shigh pseudo-ops of the M32R. *** 65,71 **** For GAS, no files are generated (except test cases!) so the port is done more or less like the other GAS ports except that the assembler uses the ! CGEN-built opcode table plus @file{devo/gas/cgen.[ch]}. For the simulator, several files are built, and other support files need to be written. @xref{Doing a simulator port}. --- 65,71 ---- For GAS, no files are generated (except test cases!) so the port is done more or less like the other GAS ports except that the assembler uses the ! CGEN-built opcode table plus @file{toplevel/gas/cgen.[ch]}. For the simulator, several files are built, and other support files need to be written. @xref{Doing a simulator port}. *************** of Guile. I ran into this on Solaris 2. *** 88,95 **** When doing porting or maintenance activity with CGEN, the build tree must be configured with the @code{--enable-cgen-maint} option. This ! adds the necessary dependencies to the @file{devo/opcodes} and ! @file{devo/sim} directories. CGEN uses Guile so it must be installed. At present the CGEN configury requires that if Guile isn't installed in @file{/usr/local} then the --- 88,95 ---- When doing porting or maintenance activity with CGEN, the build tree must be configured with the @code{--enable-cgen-maint} option. This ! adds the necessary dependencies to the @file{toplevel/opcodes} and ! @file{toplevel/sim} directories. CGEN uses Guile so it must be installed. At present the CGEN configury requires that if Guile isn't installed in @file{/usr/local} then the *************** indicated so with the `MACH' attribute. *** 316,322 **** @example (define-normal-insn ! add "add instruction ((MACH mach1)) ; or (MACH mach1,mach2,...) for multiple variants ... ) --- 316,322 ---- @example (define-normal-insn ! add "add instruction" ((MACH mach1)) ; or (MACH mach1,mach2,...) for multiple variants ... ) *************** that is similar to the new port) and use *** 496,507 **** @item @code{(load "dev.scm")}. This loads in a set of interactive development routines. @item @code{(load-opc)}. Load the opcodes support. ! @item Edit your @file{.cpu} and @file{.opc} files. @itemize @bullet @item The @file{.cpu} file is the main description file. @item The @file{.opc} file provides additional C support code. @end itemize ! @item @code{(cload #:arch "")} @item Run each of: @itemize @bullet @item @code{(cgen-desc.h)} --- 496,507 ---- @item @code{(load "dev.scm")}. This loads in a set of interactive development routines. @item @code{(load-opc)}. Load the opcodes support. ! @item Edit your @file{cpu/.cpu} and @file{cpu/.opc} files. @itemize @bullet @item The @file{.cpu} file is the main description file. @item The @file{.opc} file provides additional C support code. @end itemize ! @item @code{(cload #:arch "cpu/")} @item Run each of: @itemize @bullet @item @code{(cgen-desc.h)} *************** script normally requires one command lin *** 652,664 **** @file{gas} build directory. If this argument is omitted, the script searches in @file{../gas} automatically. ! @item Copy @file{gas-allinsn.exp} to @file{devo/gas/testsuite/gas//allinsn.exp}. @item @code{sh gas-build.sh} At this point directory tmpdir contains two files: @file{allinsn.s} and @file{allinsn.d}. File @file{allinsn.d} usually needs a bit of massaging. ! @item Copy @file{tmpdir/allinsn.[sd]} to @file{devo/gas/testsuite/gas/} @item Run @code{make check} in the @file{gas} build directory and massage things until you're satisfied the files are correct. @item Check files into CVS. --- 652,664 ---- @file{gas} build directory. If this argument is omitted, the script searches in @file{../gas} automatically. ! @item Copy @file{gas-allinsn.exp} to @file{toplevel/gas/testsuite/gas//allinsn.exp}. @item @code{sh gas-build.sh} At this point directory tmpdir contains two files: @file{allinsn.s} and @file{allinsn.d}. File @file{allinsn.d} usually needs a bit of massaging. ! @item Copy @file{tmpdir/allinsn.[sd]} to @file{toplevel/gas/testsuite/gas/} @item Run @code{make check} in the @file{gas} build directory and massage things until you're satisfied the files are correct. @item Check files into CVS. *************** The same basic procedure for opcodes por *** 675,682 **** @item Run @code{guile}. @item @code{(load "dev.scm")} @item @code{(load-sim)} ! @item Edit your @file{.cpu} file. ! @item @code{(cload #:arch "")} @item Run each of: @itemize @bullet @item @code{(cgen-arch.h)} --- 675,682 ---- @item Run @code{guile}. @item @code{(load "dev.scm")} @item @code{(load-sim)} ! @item Edit your @file{cpu/.cpu} file. ! @item @code{(cload #:arch "cpu/")} @item Run each of: @itemize @bullet @item @code{(cgen-arch.h)} *************** The same basic procedure for opcodes por *** 684,691 **** @item @code{(cgen-cpuall.h)} @end itemize @item Repeat steps 4,5,6 until the output looks reasonable. ! @item Edit your .cpu file. ! @item @code{(cload #:arch "" #:machs "mach1[,mach2[,...]]")} @item Run each of: @itemize @bullet @item @code{(cgen-cpu.h)} --- 684,691 ---- @item @code{(cgen-cpuall.h)} @end itemize @item Repeat steps 4,5,6 until the output looks reasonable. ! @item Edit your cpu/.cpu file. ! @item @code{(cload #:arch "cpu/" #:machs "mach1[,mach2[,...]]")} @item Run each of: @itemize @bullet @item @code{(cgen-cpu.h)} *************** initial typing that is required. *** 839,863 **** @enumerate 1 @item @code{cd} to the CGEN build directory ! @item @code{make sim-test} At this point two files have been created in the CGEN build directory: @file{sim-allinsn.exp} and @file{sim-build.sh}. @item Copy @file{sim-allinsn.exp} to ! @file{devo/sim/testsuite/sim//allinsn.exp}. @item @code{sh sim-build.sh} At this point a new subdirectory called @file{tmpdir} will be created and will contain one test case for each instruction. The framework has been filled in but not the actual test case. It's handy to write an ``include file'' containing assembler macros that simplify writing test ! cases. See @file{devo/sim/testsuite/sim/m32r/testutils.inc} for an example. @item write testutils.inc @item finish each test case ! @item copy @file{tmpdir/*.cgs} to @file{devo/sim/testsuite/sim/} @item run @code{make check} in the sim build directory and massage things until you're satisfied the files are correct @item Check files into CVS. @end enumerate --- 839,863 ---- @enumerate 1 @item @code{cd} to the CGEN build directory ! @item @code{make sim-test ISA=} At this point two files have been created in the CGEN build directory: @file{sim-allinsn.exp} and @file{sim-build.sh}. @item Copy @file{sim-allinsn.exp} to ! @file{toplevel/sim/testsuite/sim//allinsn.exp}. @item @code{sh sim-build.sh} At this point a new subdirectory called @file{tmpdir} will be created and will contain one test case for each instruction. The framework has been filled in but not the actual test case. It's handy to write an ``include file'' containing assembler macros that simplify writing test ! cases. See @file{toplevel/sim/testsuite/sim/m32r/testutils.inc} for an example. @item write testutils.inc @item finish each test case ! @item copy @file{tmpdir/*.cgs} to @file{toplevel/sim/testsuite/sim/} @item run @code{make check} in the sim build directory and massage things until you're satisfied the files are correct @item Check files into CVS. @end enumerate brgds, H-P