mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 10:35:27 +00:00
ldtr and tr limit is 20 bits, not 16 bits
This commit is contained in:
parent
49b9f4f8da
commit
dec3615d12
4
qemu/target-i386/unicorn.c
Normal file → Executable file
4
qemu/target-i386/unicorn.c
Normal file → Executable file
|
@ -734,13 +734,13 @@ int x86_reg_write(struct uc_struct *uc, unsigned int regid, const void *value)
|
|||
X86_CPU(uc, mycpu)->env.gdt.base = (uint32_t)((uc_x86_mmr *)value)->base;
|
||||
break;
|
||||
case UC_X86_REG_LDTR:
|
||||
X86_CPU(uc, mycpu)->env.ldt.limit = (uint16_t)((uc_x86_mmr *)value)->limit;
|
||||
X86_CPU(uc, mycpu)->env.ldt.limit = ((uc_x86_mmr *)value)->limit;
|
||||
X86_CPU(uc, mycpu)->env.ldt.base = (uint32_t)((uc_x86_mmr *)value)->base;
|
||||
X86_CPU(uc, mycpu)->env.ldt.selector = (uint16_t)((uc_x86_mmr *)value)->selector;
|
||||
X86_CPU(uc, mycpu)->env.ldt.flags = ((uc_x86_mmr *)value)->flags;
|
||||
break;
|
||||
case UC_X86_REG_TR:
|
||||
X86_CPU(uc, mycpu)->env.tr.limit = (uint16_t)((uc_x86_mmr *)value)->limit;
|
||||
X86_CPU(uc, mycpu)->env.tr.limit = ((uc_x86_mmr *)value)->limit;
|
||||
X86_CPU(uc, mycpu)->env.tr.base = (uint32_t)((uc_x86_mmr *)value)->base;
|
||||
X86_CPU(uc, mycpu)->env.tr.selector = (uint16_t)((uc_x86_mmr *)value)->selector;
|
||||
X86_CPU(uc, mycpu)->env.tr.flags = ((uc_x86_mmr *)value)->flags;
|
||||
|
|
Loading…
Reference in a new issue