summaryrefslogtreecommitdiffstats
path: root/sys/dev/aic7xxx/aicasm/aicasm_symbol.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/aic7xxx/aicasm/aicasm_symbol.c')
-rw-r--r--sys/dev/aic7xxx/aicasm/aicasm_symbol.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/sys/dev/aic7xxx/aicasm/aicasm_symbol.c b/sys/dev/aic7xxx/aicasm/aicasm_symbol.c
index 1e51d62..974c8c4 100644
--- a/sys/dev/aic7xxx/aicasm/aicasm_symbol.c
+++ b/sys/dev/aic7xxx/aicasm/aicasm_symbol.c
@@ -191,11 +191,11 @@ symlist_search(symlist_t *symlist, char *symname)
{
symbol_node_t *curnode;
- curnode = symlist->slh_first;
+ curnode = SLIST_FIRST(symlist);
while(curnode != NULL) {
if (strcmp(symname, curnode->symbol->name) == 0)
break;
- curnode = curnode->links.sle_next;
+ curnode = SLIST_NEXT(curnode, links);
}
return (curnode);
}
@@ -231,7 +231,7 @@ symlist_add(symlist_t *symlist, symbol_t *symbol, int how)
/* NOTREACHED */
}
- curnode = symlist->slh_first;
+ curnode = SLIST_FIRST(symlist);
if (curnode == NULL
|| (mask && (curnode->symbol->info.minfo->mask >
newnode->symbol->info.minfo->mask))
@@ -242,14 +242,14 @@ symlist_add(symlist_t *symlist, symbol_t *symbol, int how)
}
while (1) {
- if (curnode->links.sle_next == NULL) {
+ if (SLIST_NEXT(curnode, links) == NULL) {
SLIST_INSERT_AFTER(curnode, newnode,
links);
break;
} else {
symbol_t *cursymbol;
- cursymbol = curnode->links.sle_next->symbol;
+ cursymbol = SLIST_NEXT(curnode, links)->symbol;
if ((mask && (cursymbol->info.minfo->mask >
symbol->info.minfo->mask))
|| (!mask &&(cursymbol->info.rinfo->address >
@@ -259,7 +259,7 @@ symlist_add(symlist_t *symlist, symbol_t *symbol, int how)
break;
}
}
- curnode = curnode->links.sle_next;
+ curnode = SLIST_NEXT(curnode, links);
}
} else {
SLIST_INSERT_HEAD(symlist, newnode, links);
@@ -271,9 +271,9 @@ symlist_free(symlist_t *symlist)
{
symbol_node_t *node1, *node2;
- node1 = symlist->slh_first;
+ node1 = SLIST_FIRST(symlist);
while (node1 != NULL) {
- node2 = node1->links.sle_next;
+ node2 = SLIST_NEXT(node1, links);
free(node1);
node1 = node2;
}
@@ -287,7 +287,7 @@ symlist_merge(symlist_t *symlist_dest, symlist_t *symlist_src1,
symbol_node_t *node;
*symlist_dest = *symlist_src1;
- while((node = symlist_src2->slh_first) != NULL) {
+ while((node = SLIST_FIRST(symlist_src2)) != NULL) {
SLIST_REMOVE_HEAD(symlist_src2, links);
SLIST_INSERT_HEAD(symlist_dest, node, links);
}
@@ -357,28 +357,28 @@ symtable_dump(FILE *ofile)
}
/* Put in the masks and bits */
- while (masks.slh_first != NULL) {
+ while (SLIST_FIRST(&masks) != NULL) {
symbol_node_t *curnode;
symbol_node_t *regnode;
char *regname;
- curnode = masks.slh_first;
+ curnode = SLIST_FIRST(&masks);
SLIST_REMOVE_HEAD(&masks, links);
regnode =
- curnode->symbol->info.minfo->symrefs.slh_first;
+ SLIST_FIRST(&curnode->symbol->info.minfo->symrefs);
regname = regnode->symbol->name;
regnode = symlist_search(&registers, regname);
SLIST_INSERT_AFTER(regnode, curnode, links);
}
/* Add the aliases */
- while (aliases.slh_first != NULL) {
+ while (SLIST_FIRST(&aliases) != NULL) {
symbol_node_t *curnode;
symbol_node_t *regnode;
char *regname;
- curnode = aliases.slh_first;
+ curnode = SLIST_FIRST(&aliases);
SLIST_REMOVE_HEAD(&aliases, links);
regname = curnode->symbol->info.ainfo->parent->name;
@@ -391,13 +391,13 @@ symtable_dump(FILE *ofile)
"/*
* DO NOT EDIT - This file is automatically generated.
*/\n");
- while (registers.slh_first != NULL) {
+ while (SLIST_FIRST(&registers) != NULL) {
symbol_node_t *curnode;
u_int8_t value;
char *tab_str;
char *tab_str2;
- curnode = registers.slh_first;
+ curnode = SLIST_FIRST(&registers);
SLIST_REMOVE_HEAD(&registers, links);
switch(curnode->symbol->type) {
case REGISTER:
@@ -439,10 +439,10 @@ symtable_dump(FILE *ofile)
}
fprintf(ofile, "\n\n");
- while (constants.slh_first != NULL) {
+ while (SLIST_FIRST(&constants) != NULL) {
symbol_node_t *curnode;
- curnode = constants.slh_first;
+ curnode = SLIST_FIRST(&constants);
SLIST_REMOVE_HEAD(&constants, links);
fprintf(ofile, "#define\t%-8s\t0x%02x\n",
curnode->symbol->name,
@@ -453,10 +453,10 @@ symtable_dump(FILE *ofile)
fprintf(ofile, "\n\n/* Downloaded Constant Definitions */\n");
- while (download_constants.slh_first != NULL) {
+ while (SLIST_FIRST(&download_constants) != NULL) {
symbol_node_t *curnode;
- curnode = download_constants.slh_first;
+ curnode = SLIST_FIRST(&download_constants);
SLIST_REMOVE_HEAD(&download_constants, links);
fprintf(ofile, "#define\t%-8s\t0x%02x\n",
curnode->symbol->name,
OpenPOWER on IntegriCloud