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