| 8614 | } |
| 8615 | |
| 8616 | void 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 | |
| 8645 | void writeBlockWithEipCount(struct GenData* data, struct Block* block, S32 eipCount) { |
| 8646 | char tmp[16]; |
no test coverage detected