Lines Matching defs:buf

90 	char *buf = buffer[3 & ++n];
94 snprintf(buf, 64, ".L%u", bb->nr);
95 return buf;
102 char *buf;
109 buf = buffer[3 & ++n];
116 snprintf(buf, 64, "<bad symbol>");
120 snprintf(buf, 64, "%s", show_label(sym->bb_target));
124 snprintf(buf, 64, "%s", show_ident(sym->ident));
128 snprintf(buf, 64, "<anon symbol:%p>", verbose ? sym : NULL);
132 snprintf(buf, 64, "<symbol value: %lld>", expr->value);
143 i = snprintf(buf, 64, "%%r%d", pseudo->nr);
145 sprintf(buf+i, "(%s)", show_ident(pseudo->ident));
150 snprintf(buf, 64, "$%#llx", value);
152 snprintf(buf, 64, "$%lld", value);
156 snprintf(buf, 64, "%%arg%d", pseudo->nr);
159 i = snprintf(buf, 64, "%%phi%d", pseudo->nr);
161 sprintf(buf+i, "(%s)", show_ident(pseudo->ident));
166 snprintf(buf, 64, "<bad pseudo type %d>", pseudo->type);
168 return buf;
281 static char *show_asm_constraints(char *buf, const char *sep, struct asm_constraint_list *list)
286 buf += sprintf(buf, "%s\"%s\"", sep, entry->constraint);
288 buf += sprintf(buf, " (%s)", show_pseudo(entry->pseudo));
290 buf += sprintf(buf, " [%s]", show_ident(entry->ident));
293 return buf;
296 static char *show_asm(char *buf, struct instruction *insn)
300 buf += sprintf(buf, "\"%s\"", insn->string);
301 buf = show_asm_constraints(buf, "\n\t\tout: ", rules->outputs);
302 buf = show_asm_constraints(buf, "\n\t\tin: ", rules->inputs);
303 buf = show_asm_constraints(buf, "\n\t\tclobber: ", rules->clobbers);
304 return buf;
311 char *buf;
313 buf = buffer;
315 buf += sprintf(buf, "# ");
320 buf += sprintf(buf, "opcode:%d", opcode);
322 buf += sprintf(buf, "%s", op);
324 buf += sprintf(buf, ".%d", insn->size);
325 memset(buf, ' ', 20);
326 buf++;
329 if (buf < buffer + 12)
330 buf = buffer + 12;
334 buf += sprintf(buf, "%s", show_pseudo(insn->src));
338 buf += sprintf(buf, "%s, %s, %s", show_pseudo(insn->cond), show_label(insn->bb_true), show_label(insn->bb_false));
342 buf += sprintf(buf, "%s", show_label(insn->bb_true));
346 buf += sprintf(buf, "%s <- ", show_pseudo(insn->target));
347 buf += sprintf(buf, "%s", show_label(insn->bb_true));
352 buf += sprintf(buf, "%s <- ", show_pseudo(insn->target));
355 buf += sprintf(buf, "%s", "<none>");
361 buf += sprintf(buf, "%lld", expr->value);
364 buf += sprintf(buf, "%Le", expr->fvalue);
367 buf += sprintf(buf, "%.40s", show_string(expr->string));
370 buf += sprintf(buf, "%s", show_ident(expr->symbol->ident));
373 buf += sprintf(buf, "%s", show_label(expr->symbol->bb_target));
376 buf += sprintf(buf, "SETVAL EXPR TYPE %d", expr->type);
381 buf += sprintf(buf, "%s <- ", show_pseudo(insn->target));
382 buf += sprintf(buf, "%Le", insn->fvalue);
387 buf += sprintf(buf, "%s", show_pseudo(insn->cond));
390 buf += sprintf(buf, ", %lld -> %s", jmp->begin, show_label(jmp->target));
392 buf += sprintf(buf, ", %lld ... %lld -> %s", jmp->begin, jmp->end, show_label(jmp->target));
394 buf += sprintf(buf, ", default -> %s", show_label(jmp->target));
400 buf += sprintf(buf, "%s", show_pseudo(insn->src));
402 buf += sprintf(buf, ", %s", show_label(jmp->target));
410 buf += sprintf(buf, "%s <- %s ", show_pseudo(insn->target), show_pseudo(insn->phi_src));
417 buf += sprintf(buf, "%s", show_pseudo(insn->target));
421 buf += sprintf(buf, "%s %s", s, show_pseudo(phi));
427 buf += sprintf(buf, "%s <- %lld[%s]", show_pseudo(insn->target), insn->offset, show_pseudo(insn->src));
430 buf += sprintf(buf, "%s -> %lld[%s]", show_pseudo(insn->target), insn->offset, show_pseudo(insn->src));
436 buf += sprintf(buf, "%s <- ", show_pseudo(insn->target));
437 buf += sprintf(buf, "%s", show_pseudo(insn->func));
439 buf += sprintf(buf, ", %s", show_pseudo(arg));
451 buf += sprintf(buf, "%s <- (%d) %s",
459 buf += sprintf(buf, "%s <- %s, %s", show_pseudo(insn->target), show_pseudo(insn->src1), show_pseudo(insn->src2));
464 buf += sprintf(buf, "%s <- %s, %s, %s", show_pseudo(insn->target),
469 buf += sprintf(buf, "%s <- (%d) %s, %d", show_pseudo(insn->target), type_size(insn->orig_type), show_pseudo(insn->src), insn->from);
475 buf += sprintf(buf, "%s <- %s", show_pseudo(insn->target), show_pseudo(insn->src1));
479 buf += sprintf(buf, "%s%d", insn->check ? "check: " : "", insn->increment);
482 buf += sprintf(buf, "%s between %s..%s", show_pseudo(insn->src1), show_pseudo(insn->src2), show_pseudo(insn->src3));
485 buf += sprintf(buf, "%s <- %s", show_pseudo(insn->target), show_pseudo(insn->src1));
488 buf += sprintf(buf, "%s", show_pseudo(insn->target));
491 buf = show_asm(buf, insn);
494 buf += sprintf(buf, "%s <- %s", show_pseudo(insn->target), show_pseudo(insn->src));
500 if (buf >= buffer + sizeof(buffer))
501 die("instruction buffer overflowed %td\n", buf - buffer);
502 do { --buf; } while (*buf == ' ');
503 *++buf = 0;