18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Assembler for the sequencer program downloaded to Aic7xxx SCSI host adapters 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Copyright (c) 1997 Justin T. Gibbs. 58c2ecf20Sopenharmony_ci * Copyright (c) 2001, 2002 Adaptec Inc. 68c2ecf20Sopenharmony_ci * All rights reserved. 78c2ecf20Sopenharmony_ci * 88c2ecf20Sopenharmony_ci * Redistribution and use in source and binary forms, with or without 98c2ecf20Sopenharmony_ci * modification, are permitted provided that the following conditions 108c2ecf20Sopenharmony_ci * are met: 118c2ecf20Sopenharmony_ci * 1. Redistributions of source code must retain the above copyright 128c2ecf20Sopenharmony_ci * notice, this list of conditions, and the following disclaimer, 138c2ecf20Sopenharmony_ci * without modification. 148c2ecf20Sopenharmony_ci * 2. Redistributions in binary form must reproduce at minimum a disclaimer 158c2ecf20Sopenharmony_ci * substantially similar to the "NO WARRANTY" disclaimer below 168c2ecf20Sopenharmony_ci * ("Disclaimer") and any redistribution must be conditioned upon 178c2ecf20Sopenharmony_ci * including a substantially similar Disclaimer requirement for further 188c2ecf20Sopenharmony_ci * binary redistribution. 198c2ecf20Sopenharmony_ci * 3. Neither the names of the above-listed copyright holders nor the names 208c2ecf20Sopenharmony_ci * of any contributors may be used to endorse or promote products derived 218c2ecf20Sopenharmony_ci * from this software without specific prior written permission. 228c2ecf20Sopenharmony_ci * 238c2ecf20Sopenharmony_ci * Alternatively, this software may be distributed under the terms of the 248c2ecf20Sopenharmony_ci * GNU General Public License ("GPL") version 2 as published by the Free 258c2ecf20Sopenharmony_ci * Software Foundation. 268c2ecf20Sopenharmony_ci * 278c2ecf20Sopenharmony_ci * NO WARRANTY 288c2ecf20Sopenharmony_ci * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 298c2ecf20Sopenharmony_ci * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 308c2ecf20Sopenharmony_ci * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR 318c2ecf20Sopenharmony_ci * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 328c2ecf20Sopenharmony_ci * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 338c2ecf20Sopenharmony_ci * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 348c2ecf20Sopenharmony_ci * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 358c2ecf20Sopenharmony_ci * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 368c2ecf20Sopenharmony_ci * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 378c2ecf20Sopenharmony_ci * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 388c2ecf20Sopenharmony_ci * POSSIBILITY OF SUCH DAMAGES. 398c2ecf20Sopenharmony_ci * 408c2ecf20Sopenharmony_ci * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm.h#14 $ 418c2ecf20Sopenharmony_ci * 428c2ecf20Sopenharmony_ci * $FreeBSD$ 438c2ecf20Sopenharmony_ci */ 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci#include "../queue.h" 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci#ifndef TRUE 488c2ecf20Sopenharmony_ci#define TRUE 1 498c2ecf20Sopenharmony_ci#endif 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci#ifndef FALSE 528c2ecf20Sopenharmony_ci#define FALSE 0 538c2ecf20Sopenharmony_ci#endif 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_citypedef struct path_entry { 568c2ecf20Sopenharmony_ci char *directory; 578c2ecf20Sopenharmony_ci int quoted_includes_only; 588c2ecf20Sopenharmony_ci SLIST_ENTRY(path_entry) links; 598c2ecf20Sopenharmony_ci} *path_entry_t; 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_citypedef enum { 628c2ecf20Sopenharmony_ci QUOTED_INCLUDE, 638c2ecf20Sopenharmony_ci BRACKETED_INCLUDE, 648c2ecf20Sopenharmony_ci SOURCE_FILE 658c2ecf20Sopenharmony_ci} include_type; 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ciSLIST_HEAD(path_list, path_entry); 688c2ecf20Sopenharmony_ci 698c2ecf20Sopenharmony_ciextern struct path_list search_path; 708c2ecf20Sopenharmony_ciextern struct cs_tailq cs_tailq; 718c2ecf20Sopenharmony_ciextern struct scope_list scope_stack; 728c2ecf20Sopenharmony_ciextern struct symlist patch_functions; 738c2ecf20Sopenharmony_ciextern int includes_search_curdir; /* False if we've seen -I- */ 748c2ecf20Sopenharmony_ciextern char *appname; 758c2ecf20Sopenharmony_ciextern char *stock_include_file; 768c2ecf20Sopenharmony_ciextern int yylineno; 778c2ecf20Sopenharmony_ciextern char *yyfilename; 788c2ecf20Sopenharmony_ciextern char *prefix; 798c2ecf20Sopenharmony_ciextern char *patch_arg_list; 808c2ecf20Sopenharmony_ciextern char *versions; 818c2ecf20Sopenharmony_ciextern int src_mode; 828c2ecf20Sopenharmony_ciextern int dst_mode; 838c2ecf20Sopenharmony_cistruct symbol; 848c2ecf20Sopenharmony_ci 858c2ecf20Sopenharmony_civoid stop(const char *errstring, int err_code); 868c2ecf20Sopenharmony_civoid include_file(char *file_name, include_type type); 878c2ecf20Sopenharmony_civoid expand_macro(struct symbol *macro_symbol); 888c2ecf20Sopenharmony_cistruct instruction *seq_alloc(void); 898c2ecf20Sopenharmony_cistruct critical_section *cs_alloc(void); 908c2ecf20Sopenharmony_cistruct scope *scope_alloc(void); 918c2ecf20Sopenharmony_civoid process_scope(struct scope *); 92