ネームスペース Onikiri::PPC64Linux::Operation


構成

struct  PPC64CarryOfAShiftR
struct  PPC64Cntlz
struct  PPC64Compare
struct  PPC64CRAnd
struct  PPC64CRAndC
struct  PPC64CRBit
struct  PPC64CREqv
struct  PPC64CRNand
struct  PPC64CRNor
struct  PPC64CROr
struct  PPC64CROrC
struct  PPC64CRXor
struct  PPC64DecCTR
struct  PPC64FPCompare
struct  PPC64FPSCRRoundMode
struct  PPC64FPToInt
struct  PPC64FRIM
struct  PPC64FRIN
struct  PPC64FRIP
struct  PPC64FRIZ
struct  PPC64LoadWithUpdate
struct  PPC64Mask
struct  PPC64MaskInsert
struct  PPC64MTFSF
struct  PPC64MTFSFI

関数

u64 PPC64AdjustFPSCR (u64 fpscr)
template<typename TSrcTarget, typename TCond>
void PPC64BranchAbsCond (EmulatorUtility::OpEmulationState *opState)
template<typename TSrcTarget>
void PPC64BranchAbsUncond (EmulatorUtility::OpEmulationState *opState)
template<typename TSrcDisp, typename TCond>
void PPC64BranchRelCond (EmulatorUtility::OpEmulationState *opState)
template<typename TSrcDisp>
void PPC64BranchRelUncond (EmulatorUtility::OpEmulationState *opState)
template<typename Type>
int PPC64CalcFlag (Type lhs, Type rhs=0)
template<typename Type>
int PPC64CalcFlagFP (Type lhs, Type rhs=0)
template<typename TDest, typename TSrcTarget>
void PPC64CallAbsUncond (EmulatorUtility::OpEmulationState *opState)
template<typename TDest, typename TSrcDisp>
void PPC64CallRelUncond (EmulatorUtility::OpEmulationState *opState)
template<typename Type>
Type PPC64GenMask (unsigned int mb, unsigned int me)
template<typename TDestCR, typename TDestCRI, typename TOrgCR, typename TFunc>
void PPC64SetCRBit (EmulatorUtility::OpEmulationState *opState)
template<typename TDest, typename TDestFlag, typename TFunc>
void PPC64SetF (EmulatorUtility::OpEmulationState *opState)
template<typename TDest, typename TDestFlag, typename TFPSCR, typename TFunc>
void PPC64SetFPF (EmulatorUtility::OpEmulationState *opState)
template<typename TDest, typename TFunc>
void PPC64SetFPSCR (EmulatorUtility::OpEmulationState *opState)
template<typename TDest, typename TDestFlag, typename TFunc>
void PPC64SetFPSCRF (EmulatorUtility::OpEmulationState *opState)
template<typename TDest, typename TDestFlag, typename TFunc>
void PPC64SetSextF (EmulatorUtility::OpEmulationState *opState)
template<typename Type, typename TAddrDest, typename TValue, typename TAddr>
void PPC64StoreWithUpdate (EmulatorUtility::OpEmulationState *opState)
void PPC64SyscallCore (EmulatorUtility::OpEmulationState *opState)
void PPC64SyscallSetArg (EmulatorUtility::OpEmulationState *opState)


関数

u64 Onikiri::PPC64Linux::Operation::PPC64AdjustFPSCR ( u64  fpscr  )  [inline]

PPC64Operation.h106 行で定義されています。

参照元 PPC64SetFPSCR()PPC64SetFPSCRF().

00107 {
00108     fpscr &= 0x9fffffff;    // FEX, VXNA
00109 
00110     if (fpscr & 0x00000f80)
00111         fpscr |= 0x40000000;    // FEX Zbg
00112     if (fpscr & 0x01807000)
00113         fpscr |= 0x20000000;    // VX Zbg
00114 
00115     return fpscr;
00116 }

Here is the caller graph for this function:

template<typename TSrcTarget, typename TCond>
void Onikiri::PPC64Linux::Operation::PPC64BranchAbsCond ( EmulatorUtility::OpEmulationState *  opState  )  [inline]

PPC64Operation.h613 行で定義されています。

参照先 Onikiri::EmulatorUtility::OpEmulationState::SetTakenPC().

00614 {
00615     if ( TCond()(opState) ) {
00616         PPC64BranchAbsUncond<TSrcTarget>(opState);
00617     }
00618     else {
00619         RegisterType addr = TSrcTarget()(opState) & ~(RegisterType)0x03;
00620         opState->SetTakenPC( addr );
00621     }
00622 }

関数の呼び出しグラフ:

template<typename TSrcTarget>
void Onikiri::PPC64Linux::Operation::PPC64BranchAbsUncond ( EmulatorUtility::OpEmulationState *  opState  )  [inline]

PPC64Operation.h592 行で定義されています。

参照先 Onikiri::EmulatorUtility::Operation::do_branch()Onikiri::EmulatorUtility::OpEmulationState::SetTakenPC().

00593 {
00594     // <TODO> 0x03
00595     RegisterType addr = TSrcTarget()(opState) & ~(RegisterType)0x03;
00596     do_branch(opState, addr );
00597 
00598     opState->SetTakenPC(addr);
00599 }

関数の呼び出しグラフ:

template<typename TSrcDisp, typename TCond>
void Onikiri::PPC64Linux::Operation::PPC64BranchRelCond ( EmulatorUtility::OpEmulationState *  opState  )  [inline]

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

参照先 Onikiri::EmulatorUtility::cast_to_signed()Onikiri::EmulatorUtility::Operation::current_pc()Onikiri::EmulatorUtility::OpEmulationState::SetTakenPC().

00603 {
00604     if ( TCond()(opState) ) {
00605         PPC64BranchRelUncond<TSrcDisp>(opState);
00606     }
00607     else {
00608         opState->SetTakenPC( current_pc(opState) + 4*EmulatorUtility::cast_to_signed( TSrcDisp()(opState) ));
00609     }
00610 }

関数の呼び出しグラフ:

template<typename TSrcDisp>
void Onikiri::PPC64Linux::Operation::PPC64BranchRelUncond ( EmulatorUtility::OpEmulationState *  opState  )  [inline]

PPC64Operation.h583 行で定義されています。

参照先 Onikiri::EmulatorUtility::cast_to_signed()Onikiri::EmulatorUtility::Operation::current_pc()Onikiri::EmulatorUtility::Operation::do_branch()Onikiri::EmulatorUtility::OpEmulationState::SetTakenPC().

00584 {
00585     u64 target = current_pc(opState) + 4*EmulatorUtility::cast_to_signed( TSrcDisp()(opState) );
00586     do_branch(opState, target);
00587 
00588     opState->SetTakenPC(target);
00589 }

関数の呼び出しグラフ:

template<typename Type>
int Onikiri::PPC64Linux::Operation::PPC64CalcFlag ( Type  lhs,
Type  rhs = 0 
) [inline]

PPC64Operation.h54 行で定義されています。

参照元 Onikiri::PPC64Linux::Operation::PPC64Compare< Type, TSrc1, TSrc2 >::operator()()PPC64SetF()PPC64SetSextF().

00055 {
00056     if (lhs == rhs) {
00057         return 0x2;
00058     }
00059     else if (lhs > rhs) {
00060         return 0x4;
00061     }
00062     else if (lhs < rhs) {
00063         return 0x8;
00064     }
00065 
00066     return 0;   // never reached
00067 }

Here is the caller graph for this function:

template<typename Type>
int Onikiri::PPC64Linux::Operation::PPC64CalcFlagFP ( Type  lhs,
Type  rhs = 0 
) [inline]

PPC64Operation.h71 行で定義されています。

参照元 Onikiri::PPC64Linux::Operation::PPC64FPCompare< Type, TSrc1, TSrc2 >::operator()().

00072 {
00073     if (IsNAN(lhs) || IsNAN(rhs)) {
00074         return 0x1;
00075     }
00076     else if (lhs == rhs) {
00077         return 0x2;
00078     }
00079     else if (lhs > rhs) {
00080         return 0x4;
00081     }
00082     else if (lhs < rhs) {
00083         return 0x8;
00084     }
00085 
00086     return 0;   // never reached
00087 }

Here is the caller graph for this function:

template<typename TDest, typename TSrcTarget>
void Onikiri::PPC64Linux::Operation::PPC64CallAbsUncond ( EmulatorUtility::OpEmulationState *  opState  )  [inline]

PPC64Operation.h634 行で定義されています。

参照先 Onikiri::EmulatorUtility::Operation::next_pc().

00635 {
00636     // <TODO> 0x03
00637     RegisterType ret_addr = static_cast<RegisterType>( next_pc(opState) );
00638     PPC64BranchAbsUncond<TSrcTarget>(opState);
00639     TDest::SetOperand(opState, ret_addr );
00640 }

関数の呼び出しグラフ:

template<typename TDest, typename TSrcDisp>
void Onikiri::PPC64Linux::Operation::PPC64CallRelUncond ( EmulatorUtility::OpEmulationState *  opState  )  [inline]

PPC64Operation.h626 行で定義されています。

参照先 Onikiri::EmulatorUtility::Operation::next_pc().

00627 {
00628     RegisterType ret_addr = static_cast<RegisterType>( next_pc(opState) );
00629     PPC64BranchRelUncond<TSrcDisp>(opState);
00630     TDest::SetOperand(opState, ret_addr );
00631 }

関数の呼び出しグラフ:

template<typename Type>
Type Onikiri::PPC64Linux::Operation::PPC64GenMask ( unsigned int  mb,
unsigned int  me 
) [inline]

PPC64Operation.h91 行で定義されています。

参照先 Type.

00092 {
00093     unsigned int typeBits = sizeof(Type)*8;
00094 
00095     if (mb > me) {
00096         // rbgmembij0rbg
00097         return ~(Type)(shttl::mask(0, mb-me-1) << (typeBits-mb));
00098     }
00099     else {
00100         // rbgmbmeij1rbg
00101         return (Type)(shttl::mask(0, me-mb+1) << (typeBits-me-1));
00102     }
00103 }

template<typename TDestCR, typename TDestCRI, typename TOrgCR, typename TFunc>
void Onikiri::PPC64Linux::Operation::PPC64SetCRBit ( EmulatorUtility::OpEmulationState *  opState  )  [inline]

PPC64Operation.h513 行で定義されています。

00514 {
00515     u64 value = TOrgCR()(opState);
00516 
00517     if (TFunc()(opState)) {
00518         value = shttl::set_bit(value, 3-TDestCRI()(opState));
00519     }
00520     else {
00521         value = shttl::reset_bit(value, 3-TDestCRI()(opState));
00522     }
00523 
00524     TDestCR::SetOperand(opState, value);
00525 }

template<typename TDest, typename TDestFlag, typename TFunc>
void Onikiri::PPC64Linux::Operation::PPC64SetF ( EmulatorUtility::OpEmulationState *  opState  )  [inline]

PPC64Operation.h546 行で定義されています。

参照先 Onikiri::EmulatorUtility::cast_to_signed()PPC64CalcFlag().

00547 {
00548     typename TFunc::result_type result = TFunc()(opState);  // rbg
00549 
00550     TDest::SetOperand(opState, result);
00551     TDestFlag::SetOperand(opState, PPC64CalcFlag(EmulatorUtility::cast_to_signed(result)) );
00552 }

関数の呼び出しグラフ:

template<typename TDest, typename TDestFlag, typename TFPSCR, typename TFunc>
void Onikiri::PPC64Linux::Operation::PPC64SetFPF ( EmulatorUtility::OpEmulationState *  opState  )  [inline]

PPC64Operation.h556 行で定義されています。

00557 {
00558     typename TFunc::result_type result = TFunc()(opState);  // rbg
00559 
00560     TDest::SetOperand(opState, AsIntFunc<RegisterType>( result ));
00561     TDestFlag::SetOperand(opState, TFPSCR()(opState) >> 28 & 0xf );
00562 }

template<typename TDest, typename TFunc>
void Onikiri::PPC64Linux::Operation::PPC64SetFPSCR ( EmulatorUtility::OpEmulationState *  opState  )  [inline]

PPC64Operation.h528 行で定義されています。

参照先 PPC64AdjustFPSCR().

00529 {
00530     typename TFunc::result_type result = PPC64AdjustFPSCR(TFunc()(opState));
00531     
00532     TDest::SetOperand(opState, result);
00533 }

関数の呼び出しグラフ:

template<typename TDest, typename TDestFlag, typename TFunc>
void Onikiri::PPC64Linux::Operation::PPC64SetFPSCRF ( EmulatorUtility::OpEmulationState *  opState  )  [inline]

PPC64Operation.h536 行で定義されています。

参照先 PPC64AdjustFPSCR().

00537 {
00538     typename TFunc::result_type result = PPC64AdjustFPSCR(TFunc()(opState));
00539     
00540     TDest::SetOperand(opState, result);
00541     TDestFlag::SetOperand(opState, result >> 27 & 0xf );
00542 }

関数の呼び出しグラフ:

template<typename TDest, typename TDestFlag, typename TFunc>
void Onikiri::PPC64Linux::Operation::PPC64SetSextF ( EmulatorUtility::OpEmulationState *  opState  )  [inline]

PPC64Operation.h566 行で定義されています。

参照先 Onikiri::EmulatorUtility::cast_to_signed()PPC64CalcFlag().

00567 {
00568     typename EmulatorUtility::signed_type<typename TFunc::result_type>::type result = EmulatorUtility::cast_to_signed( TFunc()(opState) );  // rbg
00569 
00570     TDest::SetOperand(opState, result);
00571     TDestFlag::SetOperand(opState, PPC64CalcFlag(EmulatorUtility::cast_to_signed(result)) );
00572 }

関数の呼び出しグラフ:

template<typename Type, typename TAddrDest, typename TValue, typename TAddr>
void Onikiri::PPC64Linux::Operation::PPC64StoreWithUpdate ( EmulatorUtility::OpEmulationState *  opState  )  [inline]

PPC64Operation.h460 行で定義されています。

00461 {
00462     u64 addr = TAddr()(opState);
00463     WriteMemory<Type>(opState, addr, static_cast<Type>( TValue()(opState) ));
00464     TAddrDest::SetOperand( opState, addr );
00465 }

void Onikiri::PPC64Linux::Operation::PPC64SyscallCore ( EmulatorUtility::OpEmulationState *  opState  )  [inline]

PPC64Operation.h177 行で定義されています。

参照先 Onikiri::EmulatorUtility::SyscallConvIF::ErrorFlagIndexOnikiri::EmulatorUtility::SyscallConvIF::Execute()Onikiri::EmulatorUtility::OpEmulationState::GetProcessState()Onikiri::EmulatorUtility::SyscallConvIF::GetResult()Onikiri::EmulatorUtility::ProcessState::GetSyscallConv()Onikiri::EmulatorUtility::SyscallConvIF::RetValueIndexOnikiri::EmulatorUtility::SyscallConvIF::SetArg().

00178 {
00179     EmulatorUtility::SyscallConvIF* syscallConv = opState->GetProcessState()->GetSyscallConv();
00180     syscallConv->SetArg(3, SrcOperand<0>()(opState));
00181     syscallConv->SetArg(4, SrcOperand<1>()(opState));
00182     syscallConv->SetArg(5, SrcOperand<2>()(opState));
00183     syscallConv->SetArg(6, SrcOperand<3>()(opState));
00184     syscallConv->Execute(opState);
00185 
00186     DstOperand<0>::SetOperand(opState, syscallConv->GetResult(EmulatorUtility::SyscallConvIF::RetValueIndex) );
00187     if (syscallConv->GetResult(EmulatorUtility::SyscallConvIF::ErrorFlagIndex))
00188         DstOperand<1>::SetOperand(opState, 1);  // set SO
00189     else
00190         DstOperand<1>::SetOperand(opState, 0);
00191 }

関数の呼び出しグラフ:

void Onikiri::PPC64Linux::Operation::PPC64SyscallSetArg ( EmulatorUtility::OpEmulationState *  opState  )  [inline]

PPC64Operation.h168 行で定義されています。

参照先 Onikiri::EmulatorUtility::OpEmulationState::GetProcessState()Onikiri::EmulatorUtility::ProcessState::GetSyscallConv()Onikiri::EmulatorUtility::SyscallConvIF::SetArg().

00169 {
00170     EmulatorUtility::SyscallConvIF* syscallConv = opState->GetProcessState()->GetSyscallConv();
00171     syscallConv->SetArg(0, SrcOperand<0>()(opState));
00172     syscallConv->SetArg(1, SrcOperand<1>()(opState));
00173     syscallConv->SetArg(2, SrcOperand<2>()(opState));
00174 }

関数の呼び出しグラフ:


Onikiri2に対してTue Jun 18 15:33:06 2013に生成されました。  doxygen 1.4.7