aicasm.h revision 68578
1248619Sdes/*
2106121Sdes * Assembler for the sequencer program downloaded to Aic7xxx SCSI host adapters
3106121Sdes *
4106121Sdes * Copyright (c) 1997 Justin T. Gibbs.
5106121Sdes * All rights reserved.
6106121Sdes *
7106121Sdes * Redistribution and use in source and binary forms, with or without
8106121Sdes * modification, are permitted provided that the following conditions
9106121Sdes * are met:
10106121Sdes * 1. Redistributions of source code must retain the above copyright
11106121Sdes *    notice, this list of conditions, and the following disclaimer,
12106121Sdes *    without modification.
13106121Sdes * 2. The name of the author may not be used to endorse or promote products
14106121Sdes *    derived from this software without specific prior written permission.
15106121Sdes *
16124208Sdes * Alternatively, this software may be distributed under the terms of the
17106121Sdes * GNU Public License ("GPL").
18106121Sdes *
19106121Sdes * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
20106121Sdes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21106121Sdes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22106121Sdes * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
23106121Sdes * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24106121Sdes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25106121Sdes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26106121Sdes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27106121Sdes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28106121Sdes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29106121Sdes * SUCH DAMAGE.
30106121Sdes *
31106121Sdes * $Id: //depot/src/aic7xxx/aicasm/aicasm.h#4 $
32106121Sdes *
33106121Sdes * $FreeBSD: head/sys/dev/aic7xxx/aicasm/aicasm.h 68578 2000-11-10 19:54:17Z gibbs $
34106121Sdes */
35157016Sdes
36157016Sdes#ifdef __linux__
37106121Sdes#include "../queue.h"
38106121Sdes#else
39106121Sdes#include <sys/queue.h>
40106121Sdes#endif
41137015Sdes
42137015Sdes#ifndef TRUE
43106121Sdes#define TRUE 1
44106121Sdes#endif
45106121Sdes
46106121Sdes#ifndef FALSE
47137015Sdes#define FALSE 0
48106121Sdes#endif
49106121Sdes
50106121Sdestypedef struct path_entry {
51106121Sdes	char	*directory;
52106121Sdes	int	quoted_includes_only;
53106121Sdes	SLIST_ENTRY(path_entry) links;
54106121Sdes} *path_entry_t;
55106121Sdes
56106121Sdestypedef enum {
57106121Sdes	QUOTED_INCLUDE,
58137015Sdes	BRACKETED_INCLUDE,
59106121Sdes	SOURCE_FILE
60106121Sdes} include_type;
61106121Sdes
62106121SdesSLIST_HEAD(path_list, path_entry);
63106121Sdes
64106121Sdesextern struct path_list search_path;
65106121Sdesextern struct cs_tailq cs_tailq;
66106121Sdesextern struct scope_list scope_stack;
67106121Sdesextern struct symlist patch_functions;
68106121Sdesextern int includes_search_curdir;		/* False if we've seen -I- */
69106121Sdesextern char *appname;
70106121Sdesextern int yylineno;
71106121Sdesextern char *yyfilename;
72106121Sdes
73106121Sdesvoid stop(const char *errstring, int err_code);
74106121Sdesvoid include_file(char *file_name, include_type type);
75106121Sdesstruct instruction *seq_alloc(void);
76106121Sdesstruct critical_section *cs_alloc(void);
77106121Sdesstruct scope *scope_alloc(void);
78106121Sdesvoid process_scope(struct scope *);
79106121Sdes