MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / writeBlock

Function writeBlock

source/emulation/cpu/srcgen.cpp:8616–8643  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8614}
8615
8616void writeBlock(struct GenData* data, struct Block* block) {
8617 char tmp[16];
8618 U32 i;
8619 struct Op* op;
8620
8621 if (block->ops->func == restoreOps) {
8622 jit(data->cpu, block, data->eip);
8623 decodeBlockWithBlock(data->cpu, data->eip, block);
8624 }
8625 op = block->ops;
8626 if (op->func == firstOp)
8627 op = op->next;
8628 jit(data->cpu, block, data->eip);
8629 while (op) {
8630 for (i=0;i<data->indent;i++) {
8631 out(data, " ");
8632 }
8633 srcgen[op->inst](data, op);
8634 // the last op is responsible for handling the eip adjustment
8635 if (op->next && op->eipCount) {
8636 out(data, " cpu->eip.u32+=");
8637 itoa(op->eipCount, tmp, 10);
8638 out(data, tmp);
8639 out(data, ";\n");
8640 }
8641 op = op->next;
8642 }
8643}
8644
8645void writeBlockWithEipCount(struct GenData* data, struct Block* block, S32 eipCount) {
8646 char tmp[16];

Callers 3

genJumpFunction · 0.85
gen400Function · 0.85
generateSourceFunction · 0.85

Calls 1

outFunction · 0.70

Tested by

no test coverage detected