mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-03 15:55:37 +00:00
call int80 callback from x86_64 syscall helper
This commit is contained in:
parent
1c72fdb627
commit
0ac3cf99d4
|
@ -22,6 +22,7 @@
|
||||||
#include "qemu/log.h"
|
#include "qemu/log.h"
|
||||||
#include "exec/helper-proto.h"
|
#include "exec/helper-proto.h"
|
||||||
#include "exec/cpu_ldst.h"
|
#include "exec/cpu_ldst.h"
|
||||||
|
#include "uc_priv.h"
|
||||||
|
|
||||||
//#define DEBUG_PCALL
|
//#define DEBUG_PCALL
|
||||||
|
|
||||||
|
@ -944,6 +945,16 @@ void helper_syscall(CPUX86State *env, int next_eip_addend)
|
||||||
#else
|
#else
|
||||||
void helper_syscall(CPUX86State *env, int next_eip_addend)
|
void helper_syscall(CPUX86State *env, int next_eip_addend)
|
||||||
{
|
{
|
||||||
|
// Unicorn: call interrupt callback if registered
|
||||||
|
struct uc_struct *uc = env->uc;
|
||||||
|
if (uc->hook_intr_idx) {
|
||||||
|
((uc_cb_hookintr_t)uc->hook_callbacks[uc->hook_intr_idx].callback)(
|
||||||
|
(uch)uc, 80,
|
||||||
|
uc->hook_callbacks[uc->hook_intr_idx].user_data);
|
||||||
|
env->eip += next_eip_addend;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int selector;
|
int selector;
|
||||||
|
|
||||||
if (!(env->efer & MSR_EFER_SCE)) {
|
if (!(env->efer & MSR_EFER_SCE)) {
|
||||||
|
|
Loading…
Reference in a new issue