• Home
  • Raw
  • Download

Lines Matching refs:fp

76 static void dump_header(FILE *fp, struct bifrost_header header, bool verbose)  in dump_header()  argument
78 fprintf(fp, "ds(%u) ", header.dependency_slot); in dump_header()
81 fprintf(fp, "osrb "); in dump_header()
83 fprintf(fp, "%s ", bi_flow_control_name(header.flow_control)); in dump_header()
86 fprintf(fp, "inf_suppress "); in dump_header()
88 fprintf(fp, "nan_suppress "); in dump_header()
91 fprintf(fp, "ftz_dx11 "); in dump_header()
93 fprintf(fp, "ftz_hsa "); in dump_header()
95 fprintf(fp, "ftz_au "); in dump_header()
101 fprintf(fp, "fpe_ts "); in dump_header()
103 fprintf(fp, "fpe_pd "); in dump_header()
105 fprintf(fp, "fpe_psqr "); in dump_header()
108 fprintf(fp, "%s ", bi_message_type_name(header.message_type)); in dump_header()
111 fprintf(fp, "td "); in dump_header()
114 fprintf(fp, "ncph "); in dump_header()
117 fprintf(fp, "next_%s ", bi_message_type_name(header.next_message_type)); in dump_header()
119 fprintf(fp, "dwb("); in dump_header()
124 fprintf(fp, ", "); in dump_header()
126 fprintf(fp, "%u", i); in dump_header()
130 fprintf(fp, ") "); in dump_header()
133 fprintf(fp, "\n"); in dump_header()
136 static struct bifrost_reg_ctrl DecodeRegCtrl(FILE *fp, struct bifrost_regs regs, bool first) in DecodeRegCtrl() argument
162 static void dump_regs(FILE *fp, struct bifrost_regs srcs, bool first) in dump_regs() argument
164 struct bifrost_reg_ctrl ctrl = DecodeRegCtrl(fp, srcs, first); in dump_regs()
165 fprintf(fp, " # "); in dump_regs()
167 fprintf(fp, "slot 0: r%u ", get_reg0(srcs)); in dump_regs()
169 fprintf(fp, "slot 1: r%u ", get_reg1(srcs)); in dump_regs()
174 fprintf(fp, "slot 2: r%u (write FMA) ", srcs.reg2); in dump_regs()
176 fprintf(fp, "slot 2: r%u (write lo FMA) ", srcs.reg2); in dump_regs()
178 fprintf(fp, "slot 2: r%u (write hi FMA) ", srcs.reg2); in dump_regs()
180 fprintf(fp, "slot 2: r%u (read) ", srcs.reg2); in dump_regs()
183 fprintf(fp, "slot 3: r%u (write %s) ", srcs.reg3, slot3_fma); in dump_regs()
185 fprintf(fp, "slot 3: r%u (write lo %s) ", srcs.reg3, slot3_fma); in dump_regs()
187 fprintf(fp, "slot 3: r%u (write hi %s) ", srcs.reg3, slot3_fma); in dump_regs()
190 fprintf(fp, "fau %X ", srcs.fau_idx); in dump_regs()
192 fprintf(fp, "\n"); in dump_regs()
196 bi_disasm_dest_mask(FILE *fp, enum bifrost_reg_op op) in bi_disasm_dest_mask() argument
199 fprintf(fp, ".h0"); in bi_disasm_dest_mask()
201 fprintf(fp, ".h1"); in bi_disasm_dest_mask()
205 bi_disasm_dest_fma(FILE *fp, struct bifrost_regs *next_regs, bool last) in bi_disasm_dest_fma() argument
208 struct bifrost_reg_ctrl ctrl = DecodeRegCtrl(fp, *next_regs, last); in bi_disasm_dest_fma()
210 fprintf(fp, "r%u:t0", next_regs->reg2); in bi_disasm_dest_fma()
211 bi_disasm_dest_mask(fp, ctrl.slot23.slot2); in bi_disasm_dest_fma()
213 fprintf(fp, "r%u:t0", next_regs->reg3); in bi_disasm_dest_fma()
214 bi_disasm_dest_mask(fp, ctrl.slot23.slot3); in bi_disasm_dest_fma()
216 fprintf(fp, "t0"); in bi_disasm_dest_fma()
220 bi_disasm_dest_add(FILE *fp, struct bifrost_regs *next_regs, bool last) in bi_disasm_dest_add() argument
223 struct bifrost_reg_ctrl ctrl = DecodeRegCtrl(fp, *next_regs, last); in bi_disasm_dest_add()
226 fprintf(fp, "r%u:t1", next_regs->reg3); in bi_disasm_dest_add()
227 bi_disasm_dest_mask(fp, ctrl.slot23.slot3); in bi_disasm_dest_add()
229 fprintf(fp, "t1"); in bi_disasm_dest_add()
232 static void dump_const_imm(FILE *fp, uint32_t imm) in dump_const_imm() argument
239 fprintf(fp, "0x%08x /* %f */", imm, fi.f); in dump_const_imm()
243 dump_pc_imm(FILE *fp, uint64_t imm, unsigned branch_offset, enum bi_constmod mod, bool high32) in dump_pc_imm() argument
246 dump_const_imm(fp, imm); in dump_pc_imm()
279 fprintf(fp, "clause_%" PRId64, branch_offset + (offs / 16)); in dump_pc_imm()
282 fprintf(fp, " >> 32"); in dump_pc_imm()
287 fprintf(fp, " /* XXX: likely an infinite loop */"); in dump_pc_imm()
304 static void dump_fau_src(FILE *fp, struct bifrost_regs srcs, unsigned branch_offset, struct bi_cons… in dump_fau_src() argument
308 fprintf(fp, "u%u.w%u", uniform, high32); in dump_fau_src()
314 dump_pc_imm(fp, imm, branch_offset, consts->mods[idx], high32); in dump_fau_src()
316 dump_const_imm(fp, imm >> 32); in dump_fau_src()
318 dump_const_imm(fp, imm); in dump_fau_src()
322 fprintf(fp, "#0"); in dump_fau_src()
325 fprintf(fp, "lane_id"); in dump_fau_src()
328 fprintf(fp, "warp_id"); in dump_fau_src()
331 fprintf(fp, "core_id"); in dump_fau_src()
334 fprintf(fp, "framebuffer_size"); in dump_fau_src()
337 fprintf(fp, "atest_datum"); in dump_fau_src()
340 fprintf(fp, "sample"); in dump_fau_src()
350 fprintf(fp, "blend_descriptor_%u", (unsigned) srcs.fau_idx - 8); in dump_fau_src()
353 fprintf(fp, "XXX - reserved%u", (unsigned) srcs.fau_idx); in dump_fau_src()
358 fprintf(fp, ".y"); in dump_fau_src()
360 fprintf(fp, ".x"); in dump_fau_src()
365 dump_src(FILE *fp, unsigned src, struct bifrost_regs srcs, unsigned branch_offset, struct bi_consta… in dump_src() argument
369 fprintf(fp, "r%u", get_reg0(srcs)); in dump_src()
372 fprintf(fp, "r%u", get_reg1(srcs)); in dump_src()
375 fprintf(fp, "r%u", srcs.reg2); in dump_src()
379 fprintf(fp, "#0"); in dump_src()
381 fprintf(fp, "t"); // i.e. the output of FMA this cycle in dump_src()
384 dump_fau_src(fp, srcs, branch_offset, consts, false); in dump_src()
387 dump_fau_src(fp, srcs, branch_offset, consts, true); in dump_src()
390 fprintf(fp, "t0"); in dump_src()
393 fprintf(fp, "t1"); in dump_src()
441 static void dump_clause(FILE *fp, uint32_t *words, unsigned *size, unsigned offset, bool verbose) in dump_clause() argument
453 fprintf(fp, "# "); in dump_clause()
455 fprintf(fp, "%08x ", words[3 - j]); // low bit on the right in dump_clause()
456 fprintf(fp, "\n"); in dump_clause()
476 fprintf(fp, "# tag: 0x%02x\n", tag); in dump_clause()
643 fprintf(fp, "# header: %012" PRIx64 "\n", header_bits); in dump_clause()
648 dump_header(fp, header, verbose); in dump_clause()
650 fprintf(fp, "{\n"); in dump_clause()
664 fprintf(fp, " # regs: %016" PRIx64 "\n", instrs[i].reg_bits); in dump_clause()
665 dump_regs(fp, regs, i == 0); in dump_clause()
668 bi_disasm_fma(fp, instrs[i].fma_bits, &regs, &next_regs, in dump_clause()
672 bi_disasm_add(fp, instrs[i].add_bits, &regs, &next_regs, in dump_clause()
676 fprintf(fp, "}\n"); in dump_clause()
680 … fprintf(fp, "# const%d: %08" PRIx64 "\n", 2 * i, consts.raw[i] & 0xffffffff); in dump_clause()
681 fprintf(fp, "# const%d: %08" PRIx64 "\n", 2 * i + 1, consts.raw[i] >> 32); in dump_clause()
685 fprintf(fp, "\n"); in dump_clause()
689 void disassemble_bifrost(FILE *fp, uint8_t *code, size_t size, bool verbose) in disassemble_bifrost() argument
701 fprintf(fp, "clause_%u:\n", offset); in disassemble_bifrost()
704 dump_clause(fp, words, &size, offset, verbose); in disassemble_bifrost()