#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.h の 40 行で定義されています。
PPC64Decoder::PPC64Decoder | ( | ) |
void PPC64Decoder::Decode | ( | u32 | codeWord, | |
DecodedInsn * | out | |||
) |
PPC64Decoder.cpp の 610 行で定義されています。
参照先 Onikiri::PPC64Linux::PPC64Decoder::DecodedInsn::clear()・Onikiri::PPC64Linux::PPC64Decoder::DecodedInsn::CodeWord・COND_REG0・CRI・CRN・DecodeInfo・Onikiri::EmulatorUtility::ExtractBits()・FP_REG0・FPR・GP_REG0・GPR・Onikiri::PPC64Linux::PPC64Decoder::DecodedInsn::Imm・MB5・Onikiri::PPC64Linux::PPC64Decoder::DecodedInsn::Reg・SH6・SIM・UIM.
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.h の 50 行で定義されています。
const int Onikiri::PPC64Linux::PPC64Decoder::COND_REG0 = 64 [static] |
const int Onikiri::PPC64Linux::PPC64Decoder::COUNT_REG = 73 [static] |
PPC64Decoder.h の 47 行で定義されています。
const int Onikiri::PPC64Linux::PPC64Decoder::FP_REG0 = 32 [static] |
const int Onikiri::PPC64Linux::PPC64Decoder::FPSCR_REG = 75 [static] |
PPC64Decoder.h の 49 行で定義されています。
const int Onikiri::PPC64Linux::PPC64Decoder::GP_REG0 = 0 [static] |
const int Onikiri::PPC64Linux::PPC64Decoder::LINK_REG = 72 [static] |
PPC64Decoder.h の 46 行で定義されています。
const int Onikiri::PPC64Linux::PPC64Decoder::XER_REG = 74 [static] |
PPC64Decoder.h の 48 行で定義されています。