mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 10:25:28 +00:00
efa10a2286
Currently call gates are always treated as 32-bit gates. In IA-32e mode (either compatibility or 64-bit submode), system segment descriptors are always 64-bit. Treating them as 32-bit has the expected unfortunate effect: only the lower 32 bits of the offset are loaded, the stack pointer is truncated, a bad new stack pointer is loaded from the TSS (if switching privilege levels), etc. This change adds support for 64-bit call gate to the lcall and ljmp instructions. Additionally, there should be a check for non-canonical stack pointers, but I've omitted that since there doesn't seem to be checks for non-canonical addresses in this code elsewhere. I've left the raise_exception_err_ra lines unwapped at 80 columns to match the style in the rest of the file. Backports commit 0aca060526d3ff9632aaed66e8611814580c13de from qemu |
||
---|---|---|
.. | ||
arch_memory_mapping.c | ||
bpt_helper.c | ||
cc_helper.c | ||
cc_helper_template.h | ||
cpu-qom.h | ||
cpu.c | ||
cpu.h | ||
excp_helper.c | ||
fpu_helper.c | ||
helper.c | ||
helper.h | ||
int_helper.c | ||
Makefile.objs | ||
mem_helper.c | ||
misc_helper.c | ||
mpx_helper.c | ||
ops_sse.h | ||
ops_sse_header.h | ||
seg_helper.c | ||
shift_helper_template.h | ||
smm_helper.c | ||
svm.h | ||
svm_helper.c | ||
TODO | ||
topology.h | ||
translate.c | ||
unicorn.c | ||
unicorn.h |