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

Method Opcode31Handler

Source/Common/PPC/PowerPCDisassembler.cpp:907–1384  ·  view source on GitHub ↗

handles all for opcode 31. This took ages to do

Source from the content-addressed store, hash-verified

905
906// handles all for opcode 31. This took ages to do
907std::string PowerPCDisassembler::Opcode31Handler(const u32 binary)
908{
909 u32 d = ValueAtBits(binary, 6, 5);
910 u32 a = ValueAtBits(binary, 11, 5);
911 u32 b = ValueAtBits(binary, 16, 5);
912
913 u32 ext_10 = ValueAtBits(binary, 21, 10);
914
915 u32 cmp_type = ValueAtBits(binary, 10, 1);
916 u32 add_letter_o = ValueAtBits(binary, 21, 1);
917 u32 rc = ValueAtBits(binary, 31, 1);
918 u32 mtcrf_amt = ValueAtBits(binary, 12, 8);
919 u32 mtsr_amt = ValueAtBits(binary, 12, 4);
920 std::string mnemonic;
921
922 switch (ext_10)
923 {
924 case 412:
925 return MA("orc", rc) + " " + Alias(a, "r") + ", " + Alias(d, "r") + ", " + Alias(b, "r");
926 case 373:
927 if (rc)
928 return ILL(binary);
929 return "lwaux " + Alias(d, "r") + ", " + Alias(a, "r") + ", " + Alias(b, "r");
930 case 20:
931 if (rc)
932 return ILL(binary);
933 return "lwarx " + Alias(d, "r") + ", " + Alias(a, "r") + ", " + Alias(b, "r");
934 case 534:
935 if (rc)
936 return ILL(binary);
937 return "lwbrx " + Alias(d, "r") + ", " + Alias(a, "r") + ", " + Alias(b, "r");
938 case 597:
939 if (rc)
940 return ILL(binary);
941 return "lswi " + Alias(d, "r") + ", " + Alias(a, "r") + "," + TS(b);
942 case 279:
943 if (rc)
944 return ILL(binary);
945 return "lhzx " + Alias(d, "r") + ", " + Alias(a, "r") + ", " + Alias(b, "r");
946 case 311:
947 if (rc)
948 return ILL(binary);
949 return "lhzux " + Alias(d, "r") + ", " + Alias(a, "r") + ", " + Alias(b, "r");
950 case 790:
951 if (rc)
952 return ILL(binary);
953 return "lhbrx " + Alias(d, "r") + ", " + Alias(a, "r") + ", " + Alias(b, "r");
954 case 343:
955 if (rc)
956 return ILL(binary);
957 return "lhax " + Alias(d, "r") + ", " + Alias(a, "r") + ", " + Alias(b, "r");
958 case 375:
959 if (rc)
960 return ILL(binary);
961 return "lhaux " + Alias(d, "r") + ", " + Alias(a, "r") + ", " + Alias(b, "r");
962 case 535:
963 return "lfsx " + Alias(d, "f") + ", " + Alias(a, "r") + ", " + Alias(b, "r");
964 case 567:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected