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

Method decode

source/emulation/cpu/decoder.cpp:4495–4523  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4493class DecodeFPU0 : public DecodeFunc {
4494public:
4495 void decode(DecodeData* data, DecodedOp* op) const override {
4496 U8 rm = data->fetch8();
4497
4498 if (rm >= 0xc0) {
4499 op->reg = E(rm);
4500 switch (G(rm)) {
4501 case 0: op->inst = FADD_ST0_STj; break;
4502 case 1: op->inst = FMUL_ST0_STj; break;
4503 case 2: op->inst = FCOM_STi; break;
4504 case 3: op->inst = FCOM_STi_Pop; break;
4505 case 4: op->inst = FSUB_ST0_STj; break;
4506 case 5: op->inst = FSUBR_ST0_STj; break;
4507 case 6: op->inst = FDIV_ST0_STj; break;
4508 case 7: op->inst = FDIVR_ST0_STj; break;
4509 }
4510 } else {
4511 decodeEa(data, op, rm);
4512 switch (G(rm)) {
4513 case 0: op->inst = FADD_SINGLE_REAL; break;
4514 case 1: op->inst = FMUL_SINGLE_REAL; break;
4515 case 2: op->inst = FCOM_SINGLE_REAL; break;
4516 case 3: op->inst = FCOM_SINGLE_REAL_Pop; break;
4517 case 4: op->inst = FSUB_SINGLE_REAL; break;
4518 case 5: op->inst = FSUBR_SINGLE_REAL; break;
4519 case 6: op->inst = FDIV_SINGLE_REAL; break;
4520 case 7: op->inst = FDIVR_SINGLE_REAL; break;
4521 }
4522 }
4523 }
4524};
4525
4526class DecodeFPU1 : public DecodeFunc {

Callers

nothing calls this directly

Calls 2

decodeEaFunction · 0.85
fetch8Method · 0.80

Tested by

no test coverage detected