Home | History | Annotate | Line # | Download | only in aic7xxx
aicasm.h revision 1.1
      1  1.1  fvdl /*	$NetBSD: aicasm.h,v 1.1 2000/03/15 02:09:13 fvdl Exp $	*/
      2  1.1  fvdl 
      3  1.1  fvdl /*
      4  1.1  fvdl  * Assembler for the sequencer program downloaded to Aic7xxx SCSI host adapters
      5  1.1  fvdl  *
      6  1.1  fvdl  * Copyright (c) 1997 Justin T. Gibbs.
      7  1.1  fvdl  * All rights reserved.
      8  1.1  fvdl  *
      9  1.1  fvdl  * Redistribution and use in source and binary forms, with or without
     10  1.1  fvdl  * modification, are permitted provided that the following conditions
     11  1.1  fvdl  * are met:
     12  1.1  fvdl  * 1. Redistributions of source code must retain the above copyright
     13  1.1  fvdl  *    notice, this list of conditions, and the following disclaimer,
     14  1.1  fvdl  *    without modification.
     15  1.1  fvdl  * 2. The name of the author may not be used to endorse or promote products
     16  1.1  fvdl  *    derived from this software without specific prior written permission.
     17  1.1  fvdl  *
     18  1.1  fvdl  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
     19  1.1  fvdl  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     20  1.1  fvdl  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     21  1.1  fvdl  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
     22  1.1  fvdl  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     23  1.1  fvdl  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     24  1.1  fvdl  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     25  1.1  fvdl  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     26  1.1  fvdl  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     27  1.1  fvdl  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     28  1.1  fvdl  * SUCH DAMAGE.
     29  1.1  fvdl  *
     30  1.1  fvdl  * $FreeBSD: src/sys/dev/aic7xxx/aicasm.h,v 1.6 1999/12/06 18:23:30 gibbs Exp $
     31  1.1  fvdl  */
     32  1.1  fvdl 
     33  1.1  fvdl #include <sys/queue.h>
     34  1.1  fvdl 
     35  1.1  fvdl #ifdef __NetBSD__
     36  1.1  fvdl 
     37  1.1  fvdl #define STAILQ_EMPTY		SIMPLEQ_EMPTY
     38  1.1  fvdl #define STAILQ_FIRST		SIMPLEQ_FIRST
     39  1.1  fvdl #define STAILQ_NEXT		SIMPLEQ_NEXT
     40  1.1  fvdl #define STAILQ_ENTRY		SIMPLEQ_ENTRY
     41  1.1  fvdl #define STAILQ_INIT		SIMPLEQ_INIT
     42  1.1  fvdl #define STAILQ_HEAD		SIMPLEQ_HEAD
     43  1.1  fvdl #define STAILQ_INSERT_AFTER	SIMPLEQ_INSERT_AFTER
     44  1.1  fvdl #define STAILQ_INSERT_HEAD	SIMPLEQ_INSERT_HEAD
     45  1.1  fvdl #define STAILQ_INSERT_TAIL	SIMPLEQ_INSERT_TAIL
     46  1.1  fvdl 
     47  1.1  fvdl #endif
     48  1.1  fvdl 
     49  1.1  fvdl #ifndef TRUE
     50  1.1  fvdl #define TRUE 1
     51  1.1  fvdl #endif
     52  1.1  fvdl 
     53  1.1  fvdl #ifndef FALSE
     54  1.1  fvdl #define FALSE 0
     55  1.1  fvdl #endif
     56  1.1  fvdl 
     57  1.1  fvdl typedef struct path_entry {
     58  1.1  fvdl 	char	*directory;
     59  1.1  fvdl 	int	quoted_includes_only;
     60  1.1  fvdl 	SLIST_ENTRY(path_entry) links;
     61  1.1  fvdl } *path_entry_t;
     62  1.1  fvdl 
     63  1.1  fvdl typedef enum {
     64  1.1  fvdl 	QUOTED_INCLUDE,
     65  1.1  fvdl 	BRACKETED_INCLUDE,
     66  1.1  fvdl 	SOURCE_FILE
     67  1.1  fvdl } include_type;
     68  1.1  fvdl 
     69  1.1  fvdl SLIST_HEAD(path_list, path_entry);
     70  1.1  fvdl 
     71  1.1  fvdl extern struct path_list search_path;
     72  1.1  fvdl extern struct scope_list scope_stack;
     73  1.1  fvdl extern struct symlist patch_functions;
     74  1.1  fvdl extern int includes_search_curdir;		/* False if we've seen -I- */
     75  1.1  fvdl extern char *appname;
     76  1.1  fvdl extern int yylineno;
     77  1.1  fvdl extern char *yyfilename;
     78  1.1  fvdl 
     79  1.1  fvdl void stop(const char *errstring, int err_code);
     80  1.1  fvdl void include_file(char *file_name, include_type type);
     81  1.1  fvdl struct instruction *seq_alloc(void);
     82  1.1  fvdl struct scope *scope_alloc(void);
     83  1.1  fvdl void process_scope(struct scope *);
     84