aicasm.h revision 68578
11590Srgrimes/* 21590Srgrimes * Assembler for the sequencer program downloaded to Aic7xxx SCSI host adapters 31590Srgrimes * 41590Srgrimes * Copyright (c) 1997 Justin T. Gibbs. 51590Srgrimes * All rights reserved. 61590Srgrimes * 71590Srgrimes * Redistribution and use in source and binary forms, with or without 81590Srgrimes * modification, are permitted provided that the following conditions 91590Srgrimes * are met: 101590Srgrimes * 1. Redistributions of source code must retain the above copyright 111590Srgrimes * notice, this list of conditions, and the following disclaimer, 121590Srgrimes * without modification. 131590Srgrimes * 2. The name of the author may not be used to endorse or promote products 141590Srgrimes * derived from this software without specific prior written permission. 151590Srgrimes * 161590Srgrimes * Alternatively, this software may be distributed under the terms of the 171590Srgrimes * GNU Public License ("GPL"). 181590Srgrimes * 191590Srgrimes * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 201590Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 211590Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 221590Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 231590Srgrimes * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 241590Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 251590Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 261590Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 271590Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 281590Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 291590Srgrimes * SUCH DAMAGE. 301590Srgrimes * 311590Srgrimes * $Id: //depot/src/aic7xxx/aicasm/aicasm.h#4 $ 321590Srgrimes * 331590Srgrimes * $FreeBSD: head/sys/dev/aic7xxx/aicasm/aicasm.h 68578 2000-11-10 19:54:17Z gibbs $ 341590Srgrimes */ 351590Srgrimes 361590Srgrimes#ifdef __linux__ 371590Srgrimes#include "../queue.h" 381590Srgrimes#else 391590Srgrimes#include <sys/queue.h> 401590Srgrimes#endif 411590Srgrimes 421590Srgrimes#ifndef TRUE 431590Srgrimes#define TRUE 1 441590Srgrimes#endif 451590Srgrimes 4611914Sphk#ifndef FALSE 471590Srgrimes#define FALSE 0 481590Srgrimes#endif 491590Srgrimes 501590Srgrimestypedef struct path_entry { 511590Srgrimes char *directory; 521590Srgrimes int quoted_includes_only; 531590Srgrimes SLIST_ENTRY(path_entry) links; 541590Srgrimes} *path_entry_t; 551590Srgrimes 561590Srgrimestypedef enum { 571590Srgrimes QUOTED_INCLUDE, 581590Srgrimes BRACKETED_INCLUDE, 591590Srgrimes SOURCE_FILE 601590Srgrimes} include_type; 611590Srgrimes 621590SrgrimesSLIST_HEAD(path_list, path_entry); 631590Srgrimes 641590Srgrimesextern struct path_list search_path; 651590Srgrimesextern struct cs_tailq cs_tailq; 661590Srgrimesextern struct scope_list scope_stack; 6737455Sbdeextern struct symlist patch_functions; 681590Srgrimesextern int includes_search_curdir; /* False if we've seen -I- */ 691590Srgrimesextern char *appname; 701590Srgrimesextern int yylineno; 711590Srgrimesextern char *yyfilename; 721590Srgrimes 731590Srgrimesvoid stop(const char *errstring, int err_code); 741590Srgrimesvoid include_file(char *file_name, include_type type); 751590Srgrimesstruct instruction *seq_alloc(void); 761590Srgrimesstruct critical_section *cs_alloc(void); 771590Srgrimesstruct scope *scope_alloc(void); 781590Srgrimesvoid process_scope(struct scope *); 791590Srgrimes