#include <PPC64Operation.h>
Public メソッド | |
Type | operator() (EmulatorUtility::OpEmulationState *opState) |
PPC64Operation.h の 277 行で定義されています。
Type Onikiri::PPC64Linux::Operation::PPC64FPToInt< Type, TSrc, RoundMode >::operator() | ( | EmulatorUtility::OpEmulationState * | opState | ) | [inline] |
PPC64Operation.h の 279 行で定義されています。
00280 { 00281 typedef typename EmulatorUtility::signed_type<Type>::type SignedType; 00282 typedef typename TSrc::result_type FPType; 00283 // 2 00284 const SignedType maxValue = std::numeric_limits<SignedType>::max(); 00285 const SignedType minValue = std::numeric_limits<SignedType>::min(); 00286 FPType value = static_cast<FPType>( TSrc()(opState) ); 00287 00288 if (value > static_cast<FPType>(maxValue)) 00289 return maxValue; 00290 else if (value < static_cast<FPType>(minValue)) 00291 return minValue; 00292 else 00293 return static_cast<Type>(value); 00294 }