mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-22 20:15:28 +00:00
UC_OPT_WINDOWS_TIB: Windows 64 uses GS segment rather than FS segment for TIB
This commit is contained in:
parent
1b16b5e8fe
commit
03aed19145
|
@ -1128,8 +1128,18 @@ static uc_err x86_option(struct uc_struct *uc, uc_opt_type type, size_t value)
|
||||||
if (type != UC_OPT_WINDOWS_TIB)
|
if (type != UC_OPT_WINDOWS_TIB)
|
||||||
return UC_ERR_OPT_INVALID;
|
return UC_ERR_OPT_INVALID;
|
||||||
|
|
||||||
// TODO: setup limit?
|
switch(uc->mode) {
|
||||||
X86_CPU(uc, mycpu)->env.segs[R_FS].base = value;
|
default:
|
||||||
|
break;
|
||||||
|
case UC_MODE_32:
|
||||||
|
// TODO: setup limit?
|
||||||
|
X86_CPU(uc, mycpu)->env.segs[R_FS].base = value;
|
||||||
|
break;
|
||||||
|
case UC_MODE_64:
|
||||||
|
// TODO: setup limit?
|
||||||
|
X86_CPU(uc, mycpu)->env.segs[R_GS].base = value;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
return UC_ERR_OK;
|
return UC_ERR_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue