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

Method decode

source/emulation/cpu/decoder.cpp:4687–4715  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4685class DecodeFPU4 : public DecodeFunc {
4686public:
4687 void decode(DecodeData* data, DecodedOp* op) const override {
4688 U8 rm = data->fetch8();
4689
4690 if (rm >= 0xc0) {
4691 op->reg = E(rm);
4692 switch ((rm >> 3) & 7) {
4693 case 0: op->inst = FADD_STi_ST0; break;
4694 case 1: op->inst = FMUL_STi_ST0; break;
4695 case 2: op->inst = FCOM_STi; break;
4696 case 3: op->inst = FCOM_STi_Pop; break;
4697 case 4: op->inst = FSUBR_STi_ST0; break;
4698 case 5: op->inst = FSUB_STi_ST0; break;
4699 case 6: op->inst = FDIVR_STi_ST0; break;
4700 case 7: op->inst = FDIV_STi_ST0; break;
4701 }
4702 } else {
4703 decodeEa(data, op, rm);
4704 switch ((rm >> 3) & 7) {
4705 case 0: op->inst = FADD_DOUBLE_REAL; break;
4706 case 1: op->inst = FMUL_DOUBLE_REAL; break;
4707 case 2: op->inst = FCOM_DOUBLE_REAL; break;
4708 case 3: op->inst = FCOM_DOUBLE_REAL_Pop; break;
4709 case 4: op->inst = FSUB_DOUBLE_REAL; break;
4710 case 5: op->inst = FSUBR_DOUBLE_REAL; break;
4711 case 6: op->inst = FDIV_DOUBLE_REAL; break;
4712 case 7: op->inst = FDIVR_DOUBLE_REAL; break;
4713 }
4714 }
4715 }
4716};
4717
4718class DecodeFPU5 : public DecodeFunc {

Callers

nothing calls this directly

Calls 2

decodeEaFunction · 0.85
fetch8Method · 0.80

Tested by

no test coverage detected