This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Include facility for .md files - altivec patches


On Tue, 06 Nov 2001, Joseph S. Myers wrote:

> On Mon, 5 Nov 2001, Alan Matsuoka wrote:
> 
> > + Where @var{pathname} is a string that specifies the the location of the file,
> > + specifies the include file to be in gcc/config/{target}/filestuff. The
> 
> @file{gcc/config/@var{target}/filestuff}.
> 
> > + directory @file{ gcc/config/{target}} is regarded as the default directory.
> 
> No space after the open brace.  @var{target}.

Fixed.
> 
> > + the include file is specified to be in @file{gcc/config/{target}/BOGUS/filestuff}.
> 
> @var{target}.
> 
> > + The -I@var{dir} option specifies directories to search for machine descriptions.

Fixed.
> 
> @option{-I@var{dir}}.
> 
> > + @table @gcctabopt
> > + @item -I@var{dir}
> > + @opindex I

deleted.
> 
> The option index is an index of GCC options, options for support tools
> should not have @opindex index entries.
> 
> -- 
> 

Thank you.

Index: md.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/md.texi,v
retrieving revision 1.26
diff -3 -c -p -r1.26 md.texi
*** md.texi	2001/10/25 18:25:08	1.26
--- md.texi	2001/11/06 02:58:26
*************** See the next chapter for information on 
*** 38,43 ****
--- 38,44 ----
  * Expander Definitions::Generating a sequence of several RTL insns
                            for a standard operation.
  * Insn Splitting::      Splitting Instructions into Multiple Instructions.
+ * Including Patterns::      Including Patterns in Machine Descriptions.
  * Peephole Definitions::Defining machine-specific peephole optimizations.
  * Insn Attributes::     Specifying the value of attributes for generated insns.
  * Conditional Execution::Generating @code{define_insn} patterns for
*************** The @code{define_insn_and_split} constru
*** 3909,3914 ****
--- 3910,3992 ----
  functionality as two separate @code{define_insn} and @code{define_split}
  patterns.  It exists for compactness, and as a maintenance tool to prevent
  having to ensure the two patterns' templates match.
+ 
+ @node Including Patterns
+ @section Including Patterns in Machine Descriptions.
+ @cindex insn includes
+ 
+ @findex include
+ The @code{include} pattern tells the compiler tools where to
+ look for patterns that are in files other than in the file
+ @file{.md}. This is used only at build time and there is no preprocessing allowed.
+ 
+ It looks like:
+ 
+ @smallexample
+ 
+ (include
+   @var{pathname})
+ @end smallexample
+ 
+ For example:
+ 
+ @smallexample
+ 
+ (include "filestuff") 
+ 
+ @end smallexample
+ 
+ Where @var{pathname} is a string that specifies the the location of the file,
+ specifies the include file to be in gcc/config/{target}/filestuff. The
+ directory @file{gcc/config/{target}} is regarded as the default directory.
+ 
+ 
+ Machine descriptions may be split up into smaller more manageable subsections 
+ and placed into subdirectories. 
+ 
+ By specifying:
+ 
+ @smallexample
+ 
+ (include "BOGUS/filestuff") 
+ 
+ @end smallexample
+ 
+ the include file is specified to be in @file{gcc/config/@var{target}/BOGUS/filestuff}.
+ 
+ Specifying an absolute path for the include file such as;
+ @smallexample
+ 
+ (include "/u2/BOGUS/filestuff") 
+ 
+ @end smallexample
+ is permitted but is not encouraged. 
+ 
+ @node .md Directory Options
+ @subsection RTL Generation Tool Options for Directory Search
+ @cindex directory options .md
+ @cindex options, directory search
+ @cindex search path
+ 
+ The @option{-I@var{dir}} option specifies directories to search for machine descriptions.
+ For example:
+ 
+ @smallexample
+ 
+ genrecog -I/p1/abc/proc1 -I/p2/abcd/pro2 target.md
+ 
+ @end smallexample
+ 
+ 
+ Add the directory @var{dir} to the head of the list of directories to be
+ searched for header files.  This can be used to override a system machine definition
+ file, substituting your own version, since these directories are
+ searched before the default machine description file directories.  If you use more than
+ one @option{-I} option, the directories are scanned in left-to-right
+ order; the standard default directory come after.
+ 
+ @end table
+ 
  
  @node Peephole Definitions
  @section Machine-Specific Peephole Optimizers


Alan Matsuoka
GCC Engineering
Red Hat Canada, Ltd
mailto:alanm@redhat.com Tel: (416) 482-2661 x250 / Fax: (416) 482-6299


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]