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

Function gen048

source/emulation/cpu/srcgen.cpp:726–744  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

724void OPCALL dec16_reg(struct CPU* cpu, struct Op* op);
725void OPCALL dec16_reg_noflags(struct CPU* cpu, struct Op* op);
726void gen048(struct GenData* data, struct Op* op) {
727 if (op->func==dec16_reg) {
728 out(data, "cpu->oldcf=");
729 out(data, getFlag(data, CF));
730 out(data, "; cpu->dst.u16 = ");
731 out(data, r16(op->r1));
732 out(data, "; cpu->result.u16=cpu->dst.u16 - 1; cpu->lazyFlags = FLAGS_DEC16; ");
733 data->lazyFlags = sFLAGS_DEC16;
734 out(data, r16(op->r1));
735 out(data, " = cpu->result.u16;CYCLES(1);");
736 } else if (op->func==dec16_reg_noflags) {
737 out(data, r16(op->r1));
738 out(data, " = ");
739 out(data, r16(op->r1));
740 out(data, " - 1;CYCLES(1);");
741 } else {
742 kpanic("gen048");
743 }
744}
745
746void OPCALL inc32_reg(struct CPU* cpu, struct Op* op);
747void OPCALL inc32_reg_noflags(struct CPU* cpu, struct Op* op);

Callers

nothing calls this directly

Calls 4

getFlagFunction · 0.85
r16Function · 0.85
kpanicFunction · 0.85
outFunction · 0.70

Tested by

no test coverage detected