diff options
author | Peter Johnson <peter@tortall.net> | 2004-09-13 02:44:00 +0000 |
---|---|---|
committer | Peter Johnson <peter@tortall.net> | 2004-09-13 02:44:00 +0000 |
commit | ad2c7b3e3fc570be20a8c29dd2f464e587324e36 (patch) | |
tree | 76c9da71739de8017a499b0f0cad7837c8c24146 /libyasm/bytecode.h | |
parent | ddbfba0fbe2b13e600a2a3f3c7a075f4231f2b50 (diff) | |
download | yasm-ad2c7b3e3fc570be20a8c29dd2f464e587324e36.tar.gz |
* bc-int.h (yasm_bytecode): Add new pointer to array symrecs. This is a
NULL-terminated array of labels that point to this bytecode (as the bytecode
previous to the label). NULL if no labels point to this bytecode.
* bytecode.c (yasm_bc_create_common): Initialize symrecs variable to NULL.
* bytecode.c (yasm_bc_destroy): Delete symrecs variable.
* bytecode.h (yasm_bc__add_symrec): Declare new function.
* bytecode.c (yasm_bc__add_symrec): New.
* symrec.c (yasm_symtab_define_label): Call yasm_bc__add_symrec().
This new functionality is needed to make writing certain dbgfmt routines
easier.
svn path=/trunk/yasm/; revision=1147
Diffstat (limited to 'libyasm/bytecode.h')
-rw-r--r-- | libyasm/bytecode.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libyasm/bytecode.h b/libyasm/bytecode.h index 2718968a..720c19a1 100644 --- a/libyasm/bytecode.h +++ b/libyasm/bytecode.h @@ -159,6 +159,15 @@ void yasm_bc_set_multiple(yasm_bytecode *bc, /*@keep@*/ yasm_expr *e); */ /*@dependent@*/ /*@null@*/ yasm_section *yasm_bc_get_section (yasm_bytecode *bc); + +#ifdef YASM_LIB_INTERNAL +/** Add to the list of symrecs that reference a bytecode. For symrec use + * only. + * \param bc bytecode + * \param sym symbol + */ +void yasm_bc__add_symrec(yasm_bytecode *bc, /*@dependent@*/ yasm_symrec *sym); +#endif /** Delete (free allocated memory for) a bytecode. * \param bc bytecode (only pointer to it); may be NULL |