#include <CommonConverter.h>
Onikiri::EmulatorUtility::CommonConverter< Traits >に対する継承グラフ
Public 型 | |
typedef Traits::CodeWordType | CodeWordType |
typedef Traits::DecoderType | DecoderType |
typedef Traits::OpInfoType | OpInfoType |
typedef ParamExchange | ParamExchangeType |
Public メソッド | |
CommonConverter () | |
template<typename Iter> | |
void | Convert (CodeWordType codeWord, Iter out) const |
virtual | ~CommonConverter () |
Static Public 変数 | |
static const int | MaxOpInfoInCode = Traits::MaxOpInfoDefs |
Protected 型 | |
typedef DecoderType::DecodedInsn | DecodedInsn |
typedef std::map< CodeWordType, OpcodeMap, std::greater< CodeWordType > > | MaskMap |
typedef std::map< CodeWordType, const OpDef * > | OpcodeMap |
typedef OpInfoType::OperandType | OperandType |
Protected メソッド | |
void | AddToOpMap (OpDef *opDefs, int count) |
OpInfoType | ConvertOneOpInfo (const DecodedInsn &decoded, const OpInfoDef &opInfoDef, int microOpNum, int microOpIndex, const char *mnemonic) const |
const OpDef * | FindOpDef (CodeWordType codeWord) const |
virtual int | GetActualRegNumber (int regTemplate, const DecodedInsn &decoded) const =0 |
virtual std::pair< OperandType, int > | GetActualSrcOperand (int srcTemplate, const DecodedInsn &decoded) const =0 |
virtual const OpDef * | GetOpDefUnknown () const =0 |
bool | IsSplitLoadStoreEnabled () const |
virtual bool | IsZeroReg (int reg) const =0 |
Static Protected 変数 | |
static const int | MaxDstOperands = Traits::MaxDstOperands |
static const int | MaxOpInfoDefs = Traits::MaxOpInfoDefs |
static const int | MaxSrcOperands = Traits::MaxSrcOperands |
構成 | |
struct | OpDef |
struct | OpInfoDef |
CommonConverter.h の 43 行で定義されています。
typedef Traits::CodeWordType Onikiri::EmulatorUtility::CommonConverter< Traits >::CodeWordType |
CommonConverter.h の 49 行で定義されています。
typedef DecoderType::DecodedInsn Onikiri::EmulatorUtility::CommonConverter< Traits >::DecodedInsn [protected] |
CommonConverter.h の 81 行で定義されています。
typedef Traits::DecoderType Onikiri::EmulatorUtility::CommonConverter< Traits >::DecoderType |
CommonConverter.h の 48 行で定義されています。
typedef std::map<CodeWordType, OpcodeMap, std::greater<CodeWordType> > Onikiri::EmulatorUtility::CommonConverter< Traits >::MaskMap [protected] |
CommonConverter.h の 118 行で定義されています。
typedef std::map<CodeWordType, const OpDef *> Onikiri::EmulatorUtility::CommonConverter< Traits >::OpcodeMap [protected] |
CommonConverter.h の 116 行で定義されています。
typedef OpInfoType::OperandType Onikiri::EmulatorUtility::CommonConverter< Traits >::OperandType [protected] |
CommonConverter.h の 82 行で定義されています。
typedef Traits::OpInfoType Onikiri::EmulatorUtility::CommonConverter< Traits >::OpInfoType |
CommonConverter.h の 47 行で定義されています。
typedef ParamExchange Onikiri::EmulatorUtility::CommonConverter< Traits >::ParamExchangeType |
CommonConverter.h の 62 行で定義されています。
Onikiri::EmulatorUtility::CommonConverter< Traits >::CommonConverter | ( | ) |
CommonConverter.h の 141 行で定義されています。
参照先 Onikiri::ParamExchange::LoadParam().
00142 { 00143 LoadParam(); 00144 }
関数の呼び出しグラフ:
Onikiri::EmulatorUtility::CommonConverter< Traits >::~CommonConverter | ( | ) | [virtual] |
CommonConverter.h の 147 行で定義されています。
参照先 Onikiri::ParamExchange::ReleaseParam().
00148 { 00149 ReleaseParam(); 00150 }
関数の呼び出しグラフ:
void Onikiri::EmulatorUtility::CommonConverter< Traits >::AddToOpMap | ( | OpDef * | opDefs, | |
int | count | |||
) | [protected] |
CommonConverter.h の 181 行で定義されています。
参照先 ASSERT.
参照元 Onikiri::AlphaLinux::Alpha64Converter::Alpha64Converter()・Onikiri::PPC64Linux::PPC64Converter::PPC64Converter().
00182 { 00183 for (int i = 0; i < count; i ++) { 00184 const OpDef &opdef = opDefs[i]; 00185 00186 ASSERT(m_opMap[opdef.Mask].find(opdef.Opcode) == m_opMap[opdef.Mask].end(), "opcode conflict detected"); 00187 m_opMap[opdef.Mask][opdef.Opcode] = &opdef; 00188 } 00189 }
Here is the caller graph for this function:
void Onikiri::EmulatorUtility::CommonConverter< Traits >::Convert | ( | CodeWordType | codeWord, | |
Iter | out | |||
) | const |
CommonConverter.h の 154 行で定義されています。
参照先 Onikiri::EmulatorUtility::CommonConverter< Traits >::ConvertOneOpInfo()・Onikiri::EmulatorUtility::CommonConverter< Traits >::FindOpDef()・Onikiri::EmulatorUtility::CommonConverter< Traits >::OpDef::Name・Onikiri::EmulatorUtility::CommonConverter< Traits >::OpDef::nOpInfoDefs・Onikiri::EmulatorUtility::CommonConverter< Traits >::OpDef::OpInfoDefs.
00155 { 00156 DecoderType decoder; 00157 DecodedInsn decoded; 00158 decoder.Decode(codeWord, &decoded); 00159 const OpDef* opdef = FindOpDef(codeWord); 00160 00161 for (int i = 0; i < opdef->nOpInfoDefs; i ++) { 00162 const OpInfoDef &opInfoDef = opdef->OpInfoDefs[i]; 00163 *out++ = 00164 ConvertOneOpInfo( 00165 decoded, 00166 opInfoDef, 00167 opdef->nOpInfoDefs, 00168 i, 00169 opdef->Name 00170 ); 00171 } 00172 }
関数の呼び出しグラフ:
CommonConverter< Traits >::OpInfoType Onikiri::EmulatorUtility::CommonConverter< Traits >::ConvertOneOpInfo | ( | const DecodedInsn & | decoded, | |
const OpInfoDef & | opInfoDef, | |||
int | microOpNum, | |||
int | microOpIndex, | |||
const char * | mnemonic | |||
) | const [protected] |
CommonConverter.h の 209 行で定義されています。
参照先 ASSERT・Onikiri::EmulatorUtility::CommonConverter< Traits >::OpInfoDef::DstTemplate・Onikiri::EmulatorUtility::CommonConverter< Traits >::OpInfoDef::Func・Onikiri::EmulatorUtility::CommonConverter< Traits >::GetActualRegNumber()・Onikiri::EmulatorUtility::CommonConverter< Traits >::GetActualSrcOperand()・Onikiri::EmulatorUtility::CommonConverter< Traits >::OpInfoDef::Iclass・Onikiri::EmulatorUtility::CommonConverter< Traits >::IsZeroReg()・Onikiri::EmulatorUtility::CommonConverter< Traits >::MaxDstOperands・Onikiri::EmulatorUtility::CommonConverter< Traits >::MaxSrcOperands・Onikiri::EmulatorUtility::CommonConverter< Traits >::OpInfoDef::SrcTemplate・Onikiri::OpClassCode::UNDEF.
参照元 Onikiri::EmulatorUtility::CommonConverter< Traits >::Convert().
00216 { 00217 OpInfoType opInfo(OpClass(opInfoDef.Iclass)); 00218 00219 ASSERT(opInfoDef.Func != 0, "opInfoDef.Func is null"); // nOpInfoDefs s 00220 opInfo.SetEmulationFunc(opInfoDef.Func); 00221 opInfo.SetMicroOpNum( microNum ); 00222 opInfo.SetMicroOpIndex( microOpIndex ); 00223 opInfo.SetMnemonic(mnemonic); 00224 00225 // `Cl 00226 if (opInfoDef.Iclass == OpClassCode::UNDEF) { 00227 opInfo.SetDstOpNum(0); 00228 opInfo.SetSrcOpNum(1); 00229 opInfo.SetImmNum(1); 00230 00231 opInfo.SetSrcRegNum(0); 00232 opInfo.SetDstRegNum(0); 00233 00234 opInfo.SetImmOpMap(0, 0); 00235 opInfo.SetImm(0, static_cast<s32>(decoded.CodeWord)); 00236 return opInfo; 00237 } 00238 00239 // xxxMap CommonOpInfo.h Q 00240 00241 // Dst IyhWX^ 00242 // Dstev[gdecodedWX^ 00243 int dstRegNum = 0; 00244 int dstOpNum = 0; 00245 for (int i = 0; i < MaxDstOperands; i ++) { 00246 int dstTemplate = opInfoDef.DstTemplate[i]; 00247 if (dstTemplate == -1) 00248 break; 00249 00250 int dstReg = GetActualRegNumber( dstTemplate, decoded ); 00251 ASSERT(dstReg != -1); 00252 00253 if (!IsZeroReg(dstReg)) { 00254 opInfo.SetDstRegOpMap(dstRegNum, i); 00255 00256 opInfo.SetDstReg(dstRegNum, dstReg); 00257 dstRegNum ++; 00258 } 00259 dstOpNum ++; 00260 } 00261 opInfo.SetDstOpNum(dstOpNum); 00262 opInfo.SetDstRegNum(dstRegNum); 00263 00264 // Src Iyh (WX^El) 00265 int srcRegNum = 0; 00266 int srcOpNum = 0; 00267 int immNum = 0; 00268 for (int i = 0; i < MaxSrcOperands; i ++) { 00269 int srcTemplate = opInfoDef.SrcTemplate[i]; 00270 if (srcTemplate == -1) 00271 break; 00272 00273 std::pair<OperandType, int> operand = GetActualSrcOperand( srcTemplate, decoded ); 00274 switch (operand.first) { 00275 case OpInfoType::REG: 00276 { 00277 int srcReg = operand.second; 00278 ASSERT(srcReg != -1); 00279 00280 if (IsZeroReg(srcReg)) { 00281 // l 0 00282 opInfo.SetImmOpMap(immNum, i); 00283 00284 opInfo.SetImm(immNum, 0); 00285 immNum ++; 00286 } 00287 else { 00288 opInfo.SetSrcRegOpMap(srcRegNum, i); 00289 00290 opInfo.SetSrcReg(srcRegNum, srcReg); 00291 srcRegNum ++; 00292 } 00293 } 00294 break; 00295 case OpInfoType::IMM: 00296 { 00297 int immIndex = operand.second; 00298 00299 opInfo.SetImmOpMap(immNum, i); 00300 00301 opInfo.SetImm(immNum, decoded.Imm[immIndex]); 00302 immNum ++; 00303 } 00304 break; 00305 default: 00306 ASSERT(0, "Alpha64Converter Logic Error : invalid SrcType"); 00307 } 00308 00309 srcOpNum ++; 00310 } 00311 opInfo.SetSrcOpNum(srcOpNum); 00312 opInfo.SetSrcRegNum(srcRegNum); 00313 opInfo.SetImmNum(immNum); 00314 00315 return opInfo; 00316 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
const CommonConverter< Traits >::OpDef * Onikiri::EmulatorUtility::CommonConverter< Traits >::FindOpDef | ( | CodeWordType | codeWord | ) | const [protected] |
CommonConverter.h の 193 行で定義されています。
参照先 Onikiri::EmulatorUtility::CommonConverter< Traits >::GetOpDefUnknown().
参照元 Onikiri::EmulatorUtility::CommonConverter< Traits >::Convert().
00194 { 00195 // Mask T 00196 for (typename MaskMap::const_iterator e = m_opMap.begin(); e != m_opMap.end(); ++e) { 00197 u32 mask = e->first; 00198 typename OpcodeMap::const_iterator i = e->second.find(codeWord & mask); 00199 if (i != e->second.end()) 00200 return i->second; 00201 } 00202 00203 return GetOpDefUnknown(); 00204 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
virtual int Onikiri::EmulatorUtility::CommonConverter< Traits >::GetActualRegNumber | ( | int | regTemplate, | |
const DecodedInsn & | decoded | |||
) | const [protected, pure virtual] |
参照元 Onikiri::EmulatorUtility::CommonConverter< Traits >::ConvertOneOpInfo().
Here is the caller graph for this function:
virtual std::pair<OperandType, int> Onikiri::EmulatorUtility::CommonConverter< Traits >::GetActualSrcOperand | ( | int | srcTemplate, | |
const DecodedInsn & | decoded | |||
) | const [protected, pure virtual] |
参照元 Onikiri::EmulatorUtility::CommonConverter< Traits >::ConvertOneOpInfo().
Here is the caller graph for this function:
virtual const OpDef* Onikiri::EmulatorUtility::CommonConverter< Traits >::GetOpDefUnknown | ( | ) | const [protected, pure virtual] |
参照元 Onikiri::EmulatorUtility::CommonConverter< Traits >::FindOpDef().
Here is the caller graph for this function:
bool Onikiri::EmulatorUtility::CommonConverter< Traits >::IsSplitLoadStoreEnabled | ( | ) | const [protected] |
CommonConverter.h の 175 行で定義されています。
参照元 Onikiri::AlphaLinux::Alpha64Converter::Alpha64Converter()・Onikiri::PPC64Linux::PPC64Converter::PPC64Converter().
Here is the caller graph for this function:
virtual bool Onikiri::EmulatorUtility::CommonConverter< Traits >::IsZeroReg | ( | int | reg | ) | const [protected, pure virtual] |
参照元 Onikiri::EmulatorUtility::CommonConverter< Traits >::ConvertOneOpInfo().
Here is the caller graph for this function:
const int Onikiri::EmulatorUtility::CommonConverter< Traits >::MaxDstOperands = Traits::MaxDstOperands [static, protected] |
const int Onikiri::EmulatorUtility::CommonConverter< Traits >::MaxOpInfoDefs = Traits::MaxOpInfoDefs [static, protected] |
CommonConverter.h の 76 行で定義されています。
const int Onikiri::EmulatorUtility::CommonConverter< Traits >::MaxOpInfoInCode = Traits::MaxOpInfoDefs [static] |
CommonConverter.h の 51 行で定義されています。
const int Onikiri::EmulatorUtility::CommonConverter< Traits >::MaxSrcOperands = Traits::MaxSrcOperands [static, protected] |