aicasm.h 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /*
  2. * Assembler for the sequencer program downloaded to Aic7xxx SCSI host adapters
  3. *
  4. * Copyright (c) 1997 Justin T. Gibbs.
  5. * Copyright (c) 2001, 2002 Adaptec Inc.
  6. * All rights reserved.
  7. *
  8. * Redistribution and use in source and binary forms, with or without
  9. * modification, are permitted provided that the following conditions
  10. * are met:
  11. * 1. Redistributions of source code must retain the above copyright
  12. * notice, this list of conditions, and the following disclaimer,
  13. * without modification.
  14. * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  15. * substantially similar to the "NO WARRANTY" disclaimer below
  16. * ("Disclaimer") and any redistribution must be conditioned upon
  17. * including a substantially similar Disclaimer requirement for further
  18. * binary redistribution.
  19. * 3. Neither the names of the above-listed copyright holders nor the names
  20. * of any contributors may be used to endorse or promote products derived
  21. * from this software without specific prior written permission.
  22. *
  23. * Alternatively, this software may be distributed under the terms of the
  24. * GNU General Public License ("GPL") version 2 as published by the Free
  25. * Software Foundation.
  26. *
  27. * NO WARRANTY
  28. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  29. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  30. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
  31. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  32. * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  33. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  34. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  35. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  36. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  37. * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  38. * POSSIBILITY OF SUCH DAMAGES.
  39. *
  40. * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm.h#14 $
  41. *
  42. * $FreeBSD$
  43. */
  44. #ifdef __linux__
  45. #include "../queue.h"
  46. #else
  47. #include <sys/queue.h>
  48. #endif
  49. #ifndef TRUE
  50. #define TRUE 1
  51. #endif
  52. #ifndef FALSE
  53. #define FALSE 0
  54. #endif
  55. typedef struct path_entry {
  56. char *directory;
  57. int quoted_includes_only;
  58. SLIST_ENTRY(path_entry) links;
  59. } *path_entry_t;
  60. typedef enum {
  61. QUOTED_INCLUDE,
  62. BRACKETED_INCLUDE,
  63. SOURCE_FILE
  64. } include_type;
  65. SLIST_HEAD(path_list, path_entry);
  66. extern struct path_list search_path;
  67. extern struct cs_tailq cs_tailq;
  68. extern struct scope_list scope_stack;
  69. extern struct symlist patch_functions;
  70. extern int includes_search_curdir; /* False if we've seen -I- */
  71. extern char *appname;
  72. extern char *stock_include_file;
  73. extern int yylineno;
  74. extern char *yyfilename;
  75. extern char *prefix;
  76. extern char *patch_arg_list;
  77. extern char *versions;
  78. extern int src_mode;
  79. extern int dst_mode;
  80. struct symbol;
  81. void stop(const char *errstring, int err_code);
  82. void include_file(char *file_name, include_type type);
  83. void expand_macro(struct symbol *macro_symbol);
  84. struct instruction *seq_alloc(void);
  85. struct critical_section *cs_alloc(void);
  86. struct scope *scope_alloc(void);
  87. void process_scope(struct scope *);