mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-25 01:00:01 +00:00
Enable x86 disassembly in jit compare.
This commit is contained in:
parent
6f9ea6ef4b
commit
498d0b9adc
@ -25,6 +25,7 @@
|
||||
#include "ui/viewgroup.h"
|
||||
#include "ui/ui.h"
|
||||
#include "ext/disarm.h"
|
||||
#include "ext/udis86/udis86.h"
|
||||
|
||||
#include "Common/LogManager.h"
|
||||
#include "Common/CPUDetect.h"
|
||||
@ -491,7 +492,19 @@ void JitCompareScreen::UpdateDisasm() {
|
||||
rightDisasm_->Add(new TextView(targetDis[i]));
|
||||
}
|
||||
#else
|
||||
rightDisasm_->Add(new TextView("No x86 disassembler available"));
|
||||
ud_t ud_obj;
|
||||
ud_init(&ud_obj);
|
||||
#ifdef _M_X64
|
||||
ud_set_mode(&ud_obj, 64);
|
||||
#endif
|
||||
ud_set_pc(&ud_obj, (intptr_t)block->normalEntry);
|
||||
ud_set_vendor(&ud_obj, UD_VENDOR_ANY);
|
||||
ud_set_syntax(&ud_obj, UD_SYN_INTEL);
|
||||
|
||||
ud_set_input_buffer(&ud_obj, block->normalEntry, block->codeSize);
|
||||
while (ud_disassemble(&ud_obj) != 0) {
|
||||
rightDisasm_->Add(new TextView(ud_insn_asm(&ud_obj)));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user