aicasm.h revision 65943
1283407Sdchagin/* 2283407Sdchagin * Assembler for the sequencer program downloaded to Aic7xxx SCSI host adapters 3283407Sdchagin * 4283407Sdchagin * Copyright (c) 1997 Justin T. Gibbs. 5283407Sdchagin * All rights reserved. 6283407Sdchagin * 7283407Sdchagin * Redistribution and use in source and binary forms, with or without 8283407Sdchagin * modification, are permitted provided that the following conditions 9283407Sdchagin * are met: 10283407Sdchagin * 1. Redistributions of source code must retain the above copyright 11283407Sdchagin * notice, this list of conditions, and the following disclaimer, 12283407Sdchagin * without modification. 13283407Sdchagin * 2. The name of the author may not be used to endorse or promote products 14283407Sdchagin * derived from this software without specific prior written permission. 15283407Sdchagin * 16283407Sdchagin * Alternatively, this software may be distributed under the terms of the 17283407Sdchagin * GNU Public License ("GPL"). 18283407Sdchagin * 19283407Sdchagin * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 20283407Sdchagin * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21283407Sdchagin * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22283407Sdchagin * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 23283407Sdchagin * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24283407Sdchagin * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25283407Sdchagin * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26283407Sdchagin * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27283407Sdchagin * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28283407Sdchagin * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29283407Sdchagin * SUCH DAMAGE. 30283407Sdchagin * 31283407Sdchagin * $Id$ 32293523Sdchagin * 33283407Sdchagin * $FreeBSD: head/sys/dev/aic7xxx/aicasm/aicasm.h 65943 2000-09-16 20:02:39Z gibbs $ 34293523Sdchagin */ 35293523Sdchagin 36293523Sdchagin#ifdef __linux__ 37283407Sdchagin#include "../queue.h" 38283407Sdchagin#else 39283407Sdchagin#include <sys/queue.h> 40283407Sdchagin#endif 41283407Sdchagin 42283407Sdchagin#ifndef TRUE 43283407Sdchagin#define TRUE 1 44283407Sdchagin#endif 45283407Sdchagin 46283407Sdchagin#ifndef FALSE 47283407Sdchagin#define FALSE 0 48283407Sdchagin#endif 49283407Sdchagin 50283407Sdchagintypedef struct path_entry { 51283407Sdchagin char *directory; 52283407Sdchagin int quoted_includes_only; 53283407Sdchagin SLIST_ENTRY(path_entry) links; 54283407Sdchagin} *path_entry_t; 55283407Sdchagin 56283407Sdchagintypedef enum { 57283407Sdchagin QUOTED_INCLUDE, 58283407Sdchagin BRACKETED_INCLUDE, 59283407Sdchagin SOURCE_FILE 60283407Sdchagin} include_type; 61283407Sdchagin 62283407SdchaginSLIST_HEAD(path_list, path_entry); 63283407Sdchagin 64283407Sdchaginextern struct path_list search_path; 65283407Sdchaginextern struct scope_list scope_stack; 66283407Sdchaginextern struct symlist patch_functions; 67283407Sdchaginextern int includes_search_curdir; /* False if we've seen -I- */ 68283407Sdchaginextern char *appname; 69283407Sdchaginextern int yylineno; 70283407Sdchaginextern char *yyfilename; 71283407Sdchagin 72283407Sdchaginvoid stop(const char *errstring, int err_code); 73283407Sdchaginvoid include_file(char *file_name, include_type type); 74283407Sdchaginstruct instruction *seq_alloc(void); 75283407Sdchaginstruct scope *scope_alloc(void); 76283407Sdchaginvoid process_scope(struct scope *); 77283407Sdchagin