summaryrefslogtreecommitdiff
path: root/sys/dev/microcode/aic7xxx/aicasm_symbol.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/microcode/aic7xxx/aicasm_symbol.h')
-rw-r--r--sys/dev/microcode/aic7xxx/aicasm_symbol.h59
1 files changed, 35 insertions, 24 deletions
diff --git a/sys/dev/microcode/aic7xxx/aicasm_symbol.h b/sys/dev/microcode/aic7xxx/aicasm_symbol.h
index 08f2acb2102..5eb293f56a6 100644
--- a/sys/dev/microcode/aic7xxx/aicasm_symbol.h
+++ b/sys/dev/microcode/aic7xxx/aicasm_symbol.h
@@ -1,8 +1,11 @@
-/* $OpenBSD: aicasm_symbol.h,v 1.7 2002/06/30 18:25:58 smurph Exp $ */
+/* $OpenBSD: aicasm_symbol.h,v 1.8 2003/12/24 23:27:55 krw Exp $ */
+/* $NetBSD: aicasm_symbol.h,v 1.2 2003/04/19 19:26:11 fvdl Exp $ */
+
/*
* Aic7xxx SCSI host adapter firmware asssembler symbol table definitions
*
* Copyright (c) 1997 Justin T. Gibbs.
+ * Copyright (c) 2002 Adaptec Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -37,10 +40,14 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
- * $FreeBSD: src/sys/dev/aic7xxx/aicasm/aicasm_symbol.h,v 1.15 2002/06/05 22:51:54 gibbs Exp $
+ * $FreeBSD: src/sys/dev/aic7xxx/aicasm/aicasm_symbol.h,v 1.16 2002/08/31 06:39:41 gibbs Exp $
*/
+#ifdef __linux__
+#include "../queue.h"
+#else
#include <sys/queue.h>
+#endif
typedef enum {
UNINITIALIZED,
@@ -48,14 +55,16 @@ typedef enum {
ALIAS,
SCBLOC,
SRAMLOC,
+ ENUM_ENTRY,
+ FIELD,
MASK,
- BIT,
+ ENUM,
CONST,
DOWNLOAD_CONST,
LABEL,
CONDITIONAL,
MACRO
-}symtype;
+} symtype;
typedef enum {
RO = 0x01,
@@ -63,25 +72,27 @@ typedef enum {
RW = 0x03
}amode_t;
+typedef SLIST_HEAD(symlist, symbol_node) symlist_t;
+
struct reg_info {
- u_int address;
- int size;
- amode_t mode;
- u_int8_t valid_bitmask;
- u_int8_t modes;
- int typecheck_masks;
+ u_int address;
+ int size;
+ amode_t mode;
+ symlist_t fields;
+ uint8_t valid_bitmask;
+ uint8_t modes;
+ int typecheck_masks;
};
-typedef SLIST_HEAD(symlist, symbol_node) symlist_t;
-
-struct mask_info {
+struct field_info {
symlist_t symrefs;
- u_int8_t mask;
+ uint8_t value;
+ uint8_t mask;
};
struct const_info {
u_int value;
- int define;
+ int define;
};
struct alias_info {
@@ -119,12 +130,12 @@ typedef struct symbol {
char *name;
symtype type;
union {
- struct reg_info *rinfo;
- struct mask_info *minfo;
+ struct reg_info *rinfo;
+ struct field_info *finfo;
struct const_info *cinfo;
struct alias_info *ainfo;
struct label_info *linfo;
- struct cond_info *condinfo;
+ struct cond_info *condinfo;
struct macro_info *macroinfo;
}info;
} symbol_t;
@@ -137,12 +148,12 @@ typedef struct symbol_ref {
typedef struct symbol_node {
SLIST_ENTRY(symbol_node) links;
symbol_t *symbol;
-}symbol_node_t;
+} symbol_node_t;
typedef struct critical_section {
- TAILQ_ENTRY(critical_section) links;
- int begin_addr;
- int end_addr;
+ TAILQ_ENTRY(critical_section) links;
+ int begin_addr;
+ int end_addr;
} critical_section_t;
typedef enum {
@@ -193,5 +204,5 @@ void
void symlist_free(symlist_t *symlist);
void symlist_merge(symlist_t *symlist_dest, symlist_t *symlist_src1,
- symlist_t *symlist_src2);
-void symtable_dump(FILE *ofile);
+ symlist_t *symlist_src2);
+void symtable_dump(FILE *ofile, FILE *dfile);