クラス Onikiri::PPC64Linux::PPC64Decoder

#include <PPC64Decoder.h>

すべてのメンバ一覧

Public メソッド

void Decode (u32 codeWord, DecodedInsn *out)
 PPC64Decoder ()

Static Public 変数

static const int ADDRESS_REG = 76
static const int COND_REG0 = 64
static const int COUNT_REG = 73
static const int FP_REG0 = 32
static const int FPSCR_REG = 75
static const int GP_REG0 = 0
static const int LINK_REG = 72
static const int XER_REG = 74

構成

struct  DecodedInsn


説明

PPC64Decoder.h40 行で定義されています。


コンストラクタとデストラクタ

PPC64Decoder::PPC64Decoder (  ) 

PPC64Decoder.cpp606 行で定義されています。

00607 {
00608 }


関数

void PPC64Decoder::Decode ( u32  codeWord,
DecodedInsn out 
)

PPC64Decoder.cpp610 行で定義されています。

参照先 Onikiri::PPC64Linux::PPC64Decoder::DecodedInsn::clear()Onikiri::PPC64Linux::PPC64Decoder::DecodedInsn::CodeWordCOND_REG0CRICRNDecodeInfoOnikiri::EmulatorUtility::ExtractBits()FP_REG0FPRGP_REG0GPROnikiri::PPC64Linux::PPC64Decoder::DecodedInsn::ImmMB5Onikiri::PPC64Linux::PPC64Decoder::DecodedInsn::RegSH6SIMUIM.

00611 {
00612     out->clear();
00613 
00614     out->CodeWord = codeWord;
00615 
00616     const DecodeInfo& decodeInfo = GetDecodeInfo(codeWord);
00617 
00618     for (int i = 0; i < MaxOperands; i ++) {
00619         const OperandFormat& operand = decodeInfo.DecodeInfoElem[i].Operand;
00620         const int decodedPlace = decodeInfo.DecodeInfoElem[i].DecodedPlace;
00621 
00622         if (decodedPlace == NONE) {
00623             break;
00624         }
00625 
00626         u64 value = 0;
00627 
00628         // OperandFormat ]codeWordo
00629         switch (operand.Type) {
00630         case GPR:
00631             value = ExtractBits<u64>(codeWord, operand.BitIndex, operand.BitCount) + GP_REG0;
00632             break;
00633         case FPR:
00634             value = ExtractBits<u64>(codeWord, operand.BitIndex, operand.BitCount) + FP_REG0;
00635             break;
00636         case CRN:
00637             value = ExtractBits<u64>(codeWord, operand.BitIndex, operand.BitCount) + COND_REG0;
00638             break;
00639         //case SPR:
00640         //  break;
00641         case CRI:
00642         case UIM:
00643             value = ExtractBits<u64>(codeWord, operand.BitIndex, operand.BitCount);
00644             break;
00645         case SIM:
00646             value = ExtractBits<u64>(codeWord, operand.BitIndex, operand.BitCount, true);
00647             break;
00648         case SH6:
00649             value = (ExtractBits<u64>(codeWord, 1, 1) << 5) | ExtractBits(codeWord, 11, 5);
00650             break;
00651         case MB5:
00652             value = (ExtractBits<u64>(codeWord, 5, 1) << 5) | ExtractBits(codeWord, 6, 5);
00653             break;
00654         }
00655 
00656         if (D_R0 <= decodedPlace && decodedPlace <= D_R3) {
00657             // Reg
00658             out->Reg[decodedPlace-D_R0] = static_cast<int>(value);
00659         }
00660         else if (D_I0 <= decodedPlace && decodedPlace <= D_I3) {
00661             // Imm
00662             out->Imm[decodedPlace-D_I0] = value;
00663         }
00664     }
00665 }

関数の呼び出しグラフ:


変数

const int Onikiri::PPC64Linux::PPC64Decoder::ADDRESS_REG = 76 [static]

PPC64Decoder.h50 行で定義されています。

const int Onikiri::PPC64Linux::PPC64Decoder::COND_REG0 = 64 [static]

PPC64Decoder.h45 行で定義されています。

参照元 Decode().

const int Onikiri::PPC64Linux::PPC64Decoder::COUNT_REG = 73 [static]

PPC64Decoder.h47 行で定義されています。

const int Onikiri::PPC64Linux::PPC64Decoder::FP_REG0 = 32 [static]

PPC64Decoder.h44 行で定義されています。

参照元 Decode().

const int Onikiri::PPC64Linux::PPC64Decoder::FPSCR_REG = 75 [static]

PPC64Decoder.h49 行で定義されています。

const int Onikiri::PPC64Linux::PPC64Decoder::GP_REG0 = 0 [static]

PPC64Decoder.h43 行で定義されています。

参照元 Decode().

const int Onikiri::PPC64Linux::PPC64Decoder::LINK_REG = 72 [static]

PPC64Decoder.h46 行で定義されています。

const int Onikiri::PPC64Linux::PPC64Decoder::XER_REG = 74 [static]

PPC64Decoder.h48 行で定義されています。


このクラスの説明は次のファイルから生成されました:
Onikiri2に対してTue Jun 18 15:32:39 2013に生成されました。  doxygen 1.4.7