934 |
env->eflags &= ~(TF_MASK | VM_MASK | RF_MASK | NT_MASK); |
env->eflags &= ~(TF_MASK | VM_MASK | RF_MASK | NT_MASK); |
935 |
} |
} |
936 |
|
|
937 |
void helper_syscall(void) |
void helper_syscall(int next_eip_addend) |
938 |
{ |
{ |
939 |
int selector; |
int selector; |
940 |
|
|
943 |
} |
} |
944 |
selector = (env->star >> 32) & 0xffff; |
selector = (env->star >> 32) & 0xffff; |
945 |
if (env->hflags & HF_LMA_MASK) { |
if (env->hflags & HF_LMA_MASK) { |
946 |
ECX = env->eip; |
ECX = env->eip + next_eip_addend; |
947 |
env->regs[11] = compute_eflags(); |
env->regs[11] = compute_eflags(); |
948 |
|
|
949 |
cpu_x86_set_cpl(env, 0); |
cpu_x86_set_cpl(env, 0); |
963 |
else |
else |
964 |
env->eip = env->cstar; |
env->eip = env->cstar; |
965 |
} else { |
} else { |
966 |
ECX = (uint32_t)env->eip; |
ECX = (uint32_t)(env->eip + next_eip_addend); |
967 |
|
|
968 |
cpu_x86_set_cpl(env, 0); |
cpu_x86_set_cpl(env, 0); |
969 |
cpu_x86_load_seg_cache(env, R_CS, selector & 0xfffc, |
cpu_x86_load_seg_cache(env, R_CS, selector & 0xfffc, |
1119 |
fprintf(logfile, " EAX=" TARGET_FMT_lx, EAX); |
fprintf(logfile, " EAX=" TARGET_FMT_lx, EAX); |
1120 |
} |
} |
1121 |
fprintf(logfile, "\n"); |
fprintf(logfile, "\n"); |
|
cpu_dump_state(env, logfile, fprintf, X86_DUMP_CCOP); |
|
1122 |
#if 0 |
#if 0 |
1123 |
|
cpu_dump_state(env, logfile, fprintf, X86_DUMP_CCOP); |
1124 |
{ |
{ |
1125 |
int i; |
int i; |
1126 |
uint8_t *ptr; |
uint8_t *ptr; |