yasm_bytecode * yasm_bc_create_org(unsigned long start, unsigned long fill, unsigned long line) { bytecode_org *org = yasm_xmalloc(sizeof(bytecode_org)); org->start = start; org->fill = fill; return yasm_bc_create_common(&bc_org_callback, org, line); }
yasm_bytecode * yasm_bc_create_align(yasm_expr *boundary, yasm_expr *fill, yasm_expr *maxskip, const unsigned char **code_fill, unsigned long line) { bytecode_align *align = yasm_xmalloc(sizeof(bytecode_align)); align->boundary = boundary; align->fill = fill; align->maxskip = maxskip; align->code_fill = code_fill; return yasm_bc_create_common(&bc_align_callback, align, line); }
yasm_bytecode * yasm_bc_create_incbin(char *filename, yasm_expr *start, yasm_expr *maxlen, yasm_linemap *linemap, unsigned long line) { bytecode_incbin *incbin = yasm_xmalloc(sizeof(bytecode_incbin)); unsigned long xline; /* Find from filename based on line number */ yasm_linemap_lookup(linemap, line, &incbin->from, &xline); /*@-mustfree@*/ incbin->filename = filename; incbin->start = start; incbin->maxlen = maxlen; /*@=mustfree@*/ return yasm_bc_create_common(&bc_incbin_callback, incbin, line); }
yasm_section * yasm_cv__generate_type(yasm_object *object) { int new; unsigned long indx = CV_FIRST_NONPRIM; yasm_section *debug_type; yasm_bytecode *bc; cv_type *type; debug_type = yasm_object_get_general(object, ".debug$T", 1, 0, 0, &new, 0); /* Add label type */ type = cv_type_create(indx++); cv_type_append_leaf(type, cv_leaf_create_label(0)); bc = yasm_bc_create_common(&cv_type_bc_callback, type, 0); yasm_bc_finalize(bc, yasm_cv__append_bc(debug_type, bc)); yasm_bc_calc_len(bc, NULL, NULL); return debug_type; } static void cv_leaf_destroy(cv_leaf *leaf) { const char *ch = leaf->format; int arg = 0; while (*ch) { switch (*ch) { case 'b':