#include <GenericOperation.h>
Public メソッド | |
Type | operator() (OpEmulationState *opState) |
GenericOperation.h の 915 行で定義されています。
Type Onikiri::EmulatorUtility::Operation::NumberOfLeadingZeros< Type, TSrc >::operator() | ( | OpEmulationState * | opState | ) | [inline] |
GenericOperation.h の 917 行で定義されています。
00918 { 00919 u64 value = static_cast<u64>( TSrc()(opState)); 00920 00921 value |= (value >> 1); 00922 value |= (value >> 2); 00923 value |= (value >> 4); 00924 value |= (value >> 8); 00925 value |= (value >> 16); 00926 00927 value = ~value; 00928 00929 value = (value & 0x55555555) + (value >> 1 & 0x55555555); 00930 value = (value & 0x33333333) + (value >> 2 & 0x33333333); 00931 value = (value & 0x0f0f0f0f) + (value >> 4 & 0x0f0f0f0f); 00932 value = (value & 0x00ff00ff) + (value >> 8 & 0x00ff00ff); 00933 return static_cast<Type>((value & 0x0000ffff) + (value >>16 & 0x0000ffff)); 00934 }