#include <GenericOperation.h>
Public メソッド | |
RegisterType | operator() (OpEmulationState *opState) |
GenericOperation.h の 602 行で定義されています。
RegisterType Onikiri::EmulatorUtility::Operation::CarryOfAddWithCarry< Type, TSrc1, TSrc2, TSrcCarry >::operator() | ( | OpEmulationState * | opState | ) | [inline] |
GenericOperation.h の 604 行で定義されています。
00605 { 00606 Type lhs = static_cast<Type>( TSrc1()(opState) ); 00607 Type rhs = static_cast<Type>( TSrc2()(opState) ); 00608 Type carry = static_cast<Type>( TSrcCarry()(opState) ); 00609 00610 ASSERT(carry == 0 || carry == 1); 00611 00612 if (lhs + rhs < rhs || lhs + rhs + carry < rhs) // lhs, rhs ~0 lhs + rhs + 1 < rhs (ex. 255 + 255 + 1 = 255) 00613 return 1; 00614 else 00615 return 0; 00616 }