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

Function gen040

source/emulation/cpu/srcgen.cpp:704–722  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

702void OPCALL inc16_reg(struct CPU* cpu, struct Op* op);
703void OPCALL inc16_reg_noflags(struct CPU* cpu, struct Op* op);
704void gen040(struct GenData* data, struct Op* op) {
705 if (op->func==inc16_reg) {
706 out(data, "cpu->oldcf=");
707 out(data, getFlag(data, CF));
708 out(data, "; cpu->dst.u16 = ");
709 out(data, r16(op->r1));
710 out(data, "; cpu->result.u16=cpu->dst.u16 + 1; cpu->lazyFlags = FLAGS_INC16; ");
711 data->lazyFlags = sFLAGS_INC16;
712 out(data, r16(op->r1));
713 out(data, " = cpu->result.u16;CYCLES(1);");
714 } else if (op->func==inc16_reg_noflags) {
715 out(data, r16(op->r1));
716 out(data, " = ");
717 out(data, r16(op->r1));
718 out(data, " + 1;CYCLES(1);");
719 } else {
720 kpanic("gen040");
721 }
722}
723
724void OPCALL dec16_reg(struct CPU* cpu, struct Op* op);
725void OPCALL dec16_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