1
0
mirror of https://github.com/DoctorWkt/unix-jun72.git synced 2026-04-13 15:43:39 +00:00

Ensure that we keep to evenly-aligned instructions: helps with jsr r5.

Ensure that function symbols overrride branch symbols.
This commit is contained in:
warren.toomey
2008-05-23 00:21:50 +00:00
parent 606cabd497
commit 475017c951
2 changed files with 6 additions and 1 deletions

View File

@@ -166,6 +166,8 @@ int guess_jsr_r5(int addr)
add_symbol(addr, SYM_JSRDATA, 2);
return(2);
} else {
/* Ensure length is word-aligned */
if ((addr+len)%2) len++;
add_symbol(addr, SYM_JSRTEXT, len);
return(len);
}
@@ -182,6 +184,7 @@ void printquoted(char *str)
}
str++;
}
printf("\\0");
}
/*

View File

@@ -34,7 +34,9 @@ void add_symbol(int addr, int type, int size)
struct symbol *s;
/* See if we have a symbol already defined at this address */
if (symtypelist[type].table[addr] != NULL) return;
/* If there is one and its type is >= ours, don't put a new one in */
if ((symtypelist[type].table[addr] != NULL) &&
(symtypelist[type].table[addr]->type >= type)) return;
/* No, so create one */
s= malloc(sizeof(struct symbol));