handles all for opcode 59
| 1404 | |
| 1405 | // handles all for opcode 59 |
| 1406 | std::string PowerPCDisassembler::Opcode59Handler(const u32 binary) |
| 1407 | { |
| 1408 | u32 d = ValueAtBits(binary, 6, 5); |
| 1409 | u32 a = ValueAtBits(binary, 11, 5); |
| 1410 | u32 b = ValueAtBits(binary, 16, 5); |
| 1411 | u32 c = ValueAtBits(binary, 21, 5); |
| 1412 | u32 ext_5 = ValueAtBits(binary, 26, 5); |
| 1413 | u32 rc = ValueAtBits(binary, 31, 1); |
| 1414 | std::string mnemonic; |
| 1415 | |
| 1416 | switch (ext_5) |
| 1417 | { |
| 1418 | case 18: |
| 1419 | if (c) |
| 1420 | return ILL(binary); |
| 1421 | return MA("fdivs", rc) + " " + Alias(d, "f") + ", " + Alias(a, "f") + ", " + Alias(b, "f"); |
| 1422 | case 20: |
| 1423 | if (c) |
| 1424 | return ILL(binary); |
| 1425 | return MA("fsubs", rc) + " " + Alias(d, "f") + ", " + Alias(a, "f") + ", " + Alias(b, "f"); |
| 1426 | case 21: |
| 1427 | if (c) |
| 1428 | return ILL(binary); |
| 1429 | return MA("fadds", rc) + " " + Alias(d, "f") + ", " + Alias(a, "f") + ", " + Alias(b, "f"); |
| 1430 | case 22: |
| 1431 | if (a || c) |
| 1432 | return ILL(binary); |
| 1433 | return MA("fsqrts", rc) + " " + Alias(d, "f") + ", " + Alias(b, "f"); |
| 1434 | case 24: |
| 1435 | if (a || c) |
| 1436 | return ILL(binary); |
| 1437 | return MA("fres", rc) + " " + Alias(d, "f") + ", " + Alias(b, "f"); |
| 1438 | case 25: |
| 1439 | if (b) |
| 1440 | return ILL(binary); |
| 1441 | return MA("fmuls", rc) + " " + Alias(d, "f") + ", " + Alias(a, "f") + ", " + Alias(c, "f"); |
| 1442 | case 28: |
| 1443 | return MA("fmsubs", rc) + " " + Alias(d, "f") + ", " + Alias(a, "f") + ", " + Alias(c, "f") + |
| 1444 | ", " + Alias(b, "f"); |
| 1445 | case 29: |
| 1446 | return MA("fmadds", rc) + " " + Alias(d, "f") + ", " + Alias(a, "f") + ", " + Alias(c, "f") + |
| 1447 | ", " + Alias(b, "f"); |
| 1448 | case 30: |
| 1449 | return MA("fnmsubs", rc) + " " + Alias(d, "f") + ", " + Alias(a, "f") + ", " + Alias(c, "f") + |
| 1450 | ", " + Alias(b, "f"); |
| 1451 | case 31: |
| 1452 | return MA("fnmadds", rc) + " " + Alias(d, "f") + ", " + Alias(a, "f") + ", " + Alias(c, "f") + |
| 1453 | ", " + Alias(b, "f"); |
| 1454 | default: |
| 1455 | return ILL(binary); |
| 1456 | } |
| 1457 | } |
| 1458 | |
| 1459 | // handles all for opcode 63 |
| 1460 | std::string PowerPCDisassembler::Opcode63Handler(const u32 binary) |
nothing calls this directly
no outgoing calls
no test coverage detected