Exemple #1
0
void asm_declare_single(FILE *f, decl *d)
{
	fprintf(f, "%s d%c ", d->spel, asm_type_ch(d));

	asm_declare_single_part(f, d->init);

	fputc('\n', f);
}
Exemple #2
0
void asm_declare_array(enum section_type output, const char *lbl, array_decl *ad)
{
	int i;

	fprintf(cc_out[output], "%s d%c ", lbl, ad->type == array_str ? 'b' : 'q');

	for(i = 0; i < ad->len; i++){
		if(ad->type == array_str)
			fprintf(cc_out[output], "%d", ad->data.str[i]);
		else
			asm_declare_single_part(cc_out[output], ad->data.exprs[i]);

		if(i < ad->len - 1)
			fputs(", ", cc_out[output]);
	}

	fputc('\n', cc_out[output]);
}
void gen_expr_cast_1(expr *e, FILE *f)
{
    asm_declare_single_part(f, e->expr);
}