Lines Matching defs:bb
201 helper calls. The BB is scanned top to bottom and memory events
312 /* The array of InstrInfo's is part of BB struct. */
313 BB* bb;
315 /* BB seen before (ie. re-instrumentation) */
321 // current offset of guest instructions from BB start
375 'consumes' slots in cgs->bb. */
732 end of BB instrumentation. */
738 tl_assert(clgs->ii_index < clgs->bb->instr_count);
739 ii = &clgs->bb->instr[ clgs->ii_index ];
759 // return total number of cost values needed for this BB
767 CLG_ASSERT(clgs->bb->instr_count == clgs->ii_index);
769 ii = &clgs->bb->instr[i];
811 /* First pass over a BB to instrument, counting instructions and jumps
812 * This is needed for the size of the BB struct to allocate
854 /* if the last instructions of BB conditionally jumps to next instruction
855 * (= first instruction of next BB in memory), this is a inverted by VEX.
872 /* add helper call to setup_bbcc, with pointer to BB struct as argument
875 * - jmps_passed has number of cond.jumps passed in last executed BB
876 * - current_bbcc has a pointer to the BBCC of the last executed BB
878 * current_bbcc->bb->jmp_addr
889 * set current_bbcc to BBCC that gets the costs for this BB execution
898 arg1 = mkIRExpr_HWord( (HWord)clgs->bb );
929 CLG_DEBUG(5, "instrument(BB %#lx) [Instrumentation OFF]\n",
934 CLG_DEBUG(3, "+ instrument(BB %#lx)\n", (Addr)closure->readdr);
956 /* Get BB struct (creating if necessary).
961 clgs.bb = CLG_(get_bb)(origAddr, sbIn, &(clgs.seen_before));
1107 if (cJumps+1 == clgs.bb->cjmp_count)
1108 inverted = clgs.bb->cjmp_inverted;
1167 clgs.bb->jmp[cJumps].instr = clgs.ii_index-1;
1168 clgs.bb->jmp[cJumps].jmpkind = jk;
1217 /* At the end of the bb. Flush outstandings. */
1220 /* Always update global variable jmps_passed at end of bb.
1225 if (clgs.bb->cjmp_inverted) jmps_passed--;
1230 CLG_ASSERT(clgs.bb->cjmp_count == cJumps);
1231 CLG_ASSERT(clgs.bb->instr_count = clgs.ii_index);
1233 /* Info for final exit from BB */
1246 clgs.bb->jmp[cJumps].jmpkind = jk;
1247 /* Instruction index of the call/ret at BB end
1249 clgs.bb->jmp[cJumps].instr = clgs.ii_index-1;
1253 if (clgs.bb->cjmp_inverted) {
1257 jk = clgs.bb->jmp[cJumps].jmpkind;
1258 clgs.bb->jmp[cJumps].jmpkind = clgs.bb->jmp[cJumps-1].jmpkind;
1259 clgs.bb->jmp[cJumps-1].jmpkind = jk;
1260 instr = clgs.bb->jmp[cJumps].instr;
1261 clgs.bb->jmp[cJumps].instr = clgs.bb->jmp[cJumps-1].instr;
1262 clgs.bb->jmp[cJumps-1].instr = instr;
1266 CLG_ASSERT(clgs.bb->cost_count == update_cost_offsets(&clgs));
1267 CLG_ASSERT(clgs.bb->instr_len = clgs.instr_offset);
1270 clgs.bb->cost_count = update_cost_offsets(&clgs);
1271 clgs.bb->instr_len = clgs.instr_offset;
1274 CLG_DEBUG(3, "- instrument(BB %#lx): byteLen %u, CJumps %u, CostLen %u\n",
1275 origAddr, clgs.bb->instr_len,
1276 clgs.bb->cjmp_count, clgs.bb->cost_count);
1280 CLG_DEBUG(3, "%d ", clgs.bb->jmp[i].instr);
1282 clgs.bb->cjmp_inverted ? "yes":"no");
1289 /*--- Discarding BB info ---*/
1307 // Get BB info, remove from table, free BB info. Simple! Note that we
1783 VG_(message)(Vg_DebugMsg, "BB lookups: %d\n",