本文整理汇总了C++中Disassembler::GetOutput方法的典型用法代码示例。如果您正苦于以下问题:C++ Disassembler::GetOutput方法的具体用法?C++ Disassembler::GetOutput怎么用?C++ Disassembler::GetOutput使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Disassembler
的用法示例。
在下文中一共展示了Disassembler::GetOutput方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: armv_end
void armv_end(void* codestart, u32 cycl)
{
//Normal block end
//cycle counter rv
//pop registers & return
assembler->Subs(w27, w27, cycl);
ptrdiff_t offset = reinterpret_cast<uintptr_t>(arm_exit) - assembler->GetBuffer()->GetStartAddress<uintptr_t>();
Label arm_exit_label;
assembler->BindToOffset(&arm_exit_label, offset);
assembler->B(&arm_exit_label, mi); //statically predicted as not taken
offset = reinterpret_cast<uintptr_t>(arm_dispatch) - assembler->GetBuffer()->GetStartAddress<uintptr_t>();
Label arm_dispatch_label;
assembler->BindToOffset(&arm_dispatch_label, offset);
assembler->B(&arm_dispatch_label);
assembler->FinalizeCode();
verify(assembler->GetBuffer()->GetCursorOffset() <= assembler->GetBuffer()->GetCapacity());
vmem_platform_flush_cache(
codestart, assembler->GetBuffer()->GetEndAddress<void*>(),
codestart, assembler->GetBuffer()->GetEndAddress<void*>());
icPtr += assembler->GetBuffer()->GetSizeInBytes();
#if 0
Instruction* instr_start = (Instruction *)codestart;
Instruction* instr_end = assembler->GetBuffer()->GetEndAddress<Instruction*>();
Decoder decoder;
Disassembler disasm;
decoder.AppendVisitor(&disasm);
Instruction* instr;
for (instr = instr_start; instr < instr_end; instr += kInstructionSize) {
decoder.Decode(instr);
printf("arm64 arec\t %p:\t%s\n",
reinterpret_cast<void*>(instr),
disasm.GetOutput());
}
#endif
delete assembler;
assembler = NULL;
}