diff --git a/InstructionSets/PowerPC/Instruction.hpp b/InstructionSets/PowerPC/Instruction.hpp index 349715148..ccfbc6be7 100644 --- a/InstructionSets/PowerPC/Instruction.hpp +++ b/InstructionSets/PowerPC/Instruction.hpp @@ -315,7 +315,15 @@ enum class Operation: uint8_t { /// i.e. if rA() is 0 then the value 0 is used, not the contents of r0. stwx, - subfx, subfcx, + subfx, + + /// Subtract from carrying. + /// subfc, subfc., subfco, subfco. + /// + /// rD() = -rA() +rB() + 1 + /// + /// oe(), rc() apply. + subfcx, subfex, /// Subtract from immediate carrying diff --git a/OSBindings/Mac/Clock SignalTests/DingusdevPowerPCTests.mm b/OSBindings/Mac/Clock SignalTests/DingusdevPowerPCTests.mm index d858c8392..f3e0be5c5 100644 --- a/OSBindings/Mac/Clock SignalTests/DingusdevPowerPCTests.mm +++ b/OSBindings/Mac/Clock SignalTests/DingusdevPowerPCTests.mm @@ -116,6 +116,17 @@ void AssertEqualOperationName(NSString *lhs, NSString *rhs) { #undef ABCz +#define ABD(x) \ + case Operation::x: \ + AssertEqualOperationName(operation, @#x); \ + [self testABDInstruction:instruction columns:columns testZero:NO]; \ + break; + +// ABD(subfc); +// ABD(subfc_); + +#undef ABD + case Operation::bcx: case Operation::bclrx: case Operation::bcctrx: {