構造体 テンプレート Onikiri::EmulatorUtility::Operation::CarryOfAddWithCarry< Type, TSrc1, TSrc2, TSrcCarry >

#include <GenericOperation.h>

すべてのメンバ一覧

Public メソッド

RegisterType operator() (OpEmulationState *opState)


説明

template<typename Type, typename TSrc1, typename TSrc2, typename TSrcCarry>
struct Onikiri::EmulatorUtility::Operation::CarryOfAddWithCarry< Type, TSrc1, TSrc2, TSrcCarry >

GenericOperation.h602 行で定義されています。


関数

template<typename Type, typename TSrc1, typename TSrc2, typename TSrcCarry>
RegisterType Onikiri::EmulatorUtility::Operation::CarryOfAddWithCarry< Type, TSrc1, TSrc2, TSrcCarry >::operator() ( OpEmulationState opState  )  [inline]

GenericOperation.h604 行で定義されています。

参照先 ASSERTType.

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     }


この構造体の説明は次のファイルから生成されました:
Onikiri2に対してTue Jun 18 15:31:59 2013に生成されました。  doxygen 1.4.7