MCPcopy Create free account
hub / github.com/aldelaro5/dolphin-memory-engine / Opcode63Handler

Method Opcode63Handler

Source/Common/PPC/PowerPCDisassembler.cpp:1460–1591  ·  view source on GitHub ↗

handles all for opcode 63

Source from the content-addressed store, hash-verified

1458
1459// handles all for opcode 63
1460std::string PowerPCDisassembler::Opcode63Handler(const u32 binary)
1461{
1462 u32 d = ValueAtBits(binary, 6, 5);
1463 u32 a = ValueAtBits(binary, 11, 5);
1464 u32 b = ValueAtBits(binary, 16, 5);
1465 u32 c = ValueAtBits(binary, 21, 5);
1466 u32 ext_5 = ValueAtBits(binary, 26, 5);
1467 u32 ext_10 = ValueAtBits(binary, 21, 10);
1468 u32 rc = ValueAtBits(binary, 31, 1);
1469 std::string mnemonic;
1470
1471 switch (ext_5)
1472 {
1473 case 0:
1474 switch (ext_10)
1475 {
1476 case 0:
1477 if ((d & 3) || rc)
1478 return ILL(binary);
1479 return "fcmpu " + Alias(d >> 2, "cr") + ", " + Alias(a, "f") + ", " + Alias(b, "f");
1480 case 32:
1481 if ((d & 3) || rc)
1482 return ILL(binary);
1483 return "fcmpo " + Alias(d >> 2, "cr") + ", " + Alias(a, "f") + ", " + Alias(b, "f");
1484 case 64:
1485 if ((d & 3) || (a & 3) || b || rc)
1486 return ILL(binary);
1487 return "mcrfs " + Alias(d >> 2, "cr") + ", " + Alias(a >> 2, "cr");
1488 default:
1489 return ILL(binary);
1490 }
1491 case 6:
1492 switch (ext_10)
1493 {
1494 case 38:
1495 if (a || b)
1496 return ILL(binary);
1497 return MA("mtfsb1", rc) + " " + TS(d);
1498 case 70:
1499 if (a || b)
1500 return ILL(binary);
1501 return MA("mtfsb0", rc) + " " + TS(d);
1502 case 134:
1503 if ((a & 0xF) || (b & 1) || (d & 3))
1504 return ILL(binary);
1505 return MA("mtfsfi", rc) + " " + Alias(d >> 2, "cr") + "," + TS(b >> 1);
1506 default:
1507 return ILL(binary);
1508 }
1509 case 7:
1510 switch (ext_10)
1511 {
1512 case 583:
1513 if (a || b)
1514 return ILL(binary);
1515 return MA("mffs", rc) + " " + Alias(d, "r");
1516 case 711:
1517 if ((d >> 4) || (a & 1))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected