Revision 06c2f506
b/target-i386/exec.h | ||
---|---|---|
199 | 199 |
void helper_enter_level(int level, int data32); |
200 | 200 |
void helper_sysenter(void); |
201 | 201 |
void helper_sysexit(void); |
202 |
void helper_syscall(void);
|
|
202 |
void helper_syscall(int next_eip_addend);
|
|
203 | 203 |
void helper_sysret(int dflag); |
204 | 204 |
void helper_rdtsc(void); |
205 | 205 |
void helper_rdmsr(void); |
b/target-i386/helper.c | ||
---|---|---|
934 | 934 |
env->eflags &= ~(TF_MASK | VM_MASK | RF_MASK | NT_MASK); |
935 | 935 |
} |
936 | 936 |
|
937 |
void helper_syscall(void)
|
|
937 |
void helper_syscall(int next_eip_addend)
|
|
938 | 938 |
{ |
939 | 939 |
int selector; |
940 | 940 |
|
... | ... | |
943 | 943 |
} |
944 | 944 |
selector = (env->star >> 32) & 0xffff; |
945 | 945 |
if (env->hflags & HF_LMA_MASK) { |
946 |
ECX = env->eip; |
|
946 |
ECX = env->eip + next_eip_addend;
|
|
947 | 947 |
env->regs[11] = compute_eflags(); |
948 | 948 |
|
949 | 949 |
cpu_x86_set_cpl(env, 0); |
... | ... | |
963 | 963 |
else |
964 | 964 |
env->eip = env->cstar; |
965 | 965 |
} else { |
966 |
ECX = (uint32_t)env->eip;
|
|
966 |
ECX = (uint32_t)(env->eip + next_eip_addend);
|
|
967 | 967 |
|
968 | 968 |
cpu_x86_set_cpl(env, 0); |
969 | 969 |
cpu_x86_load_seg_cache(env, R_CS, selector & 0xfffc, |
... | ... | |
1119 | 1119 |
fprintf(logfile, " EAX=" TARGET_FMT_lx, EAX); |
1120 | 1120 |
} |
1121 | 1121 |
fprintf(logfile, "\n"); |
1122 |
cpu_dump_state(env, logfile, fprintf, X86_DUMP_CCOP); |
|
1123 | 1122 |
#if 0 |
1123 |
cpu_dump_state(env, logfile, fprintf, X86_DUMP_CCOP); |
|
1124 | 1124 |
{ |
1125 | 1125 |
int i; |
1126 | 1126 |
uint8_t *ptr; |
b/target-i386/op.c | ||
---|---|---|
938 | 938 |
#ifdef TARGET_X86_64 |
939 | 939 |
void OPPROTO op_syscall(void) |
940 | 940 |
{ |
941 |
helper_syscall(); |
|
941 |
helper_syscall(PARAM1);
|
|
942 | 942 |
} |
943 | 943 |
|
944 | 944 |
void OPPROTO op_sysret(void) |
b/target-i386/translate.c | ||
---|---|---|
4626 | 4626 |
s->cc_op = CC_OP_DYNAMIC; |
4627 | 4627 |
} |
4628 | 4628 |
gen_jmp_im(pc_start - s->cs_base); |
4629 |
gen_op_syscall(); |
|
4629 |
gen_op_syscall(s->pc - pc_start);
|
|
4630 | 4630 |
gen_eob(s); |
4631 | 4631 |
break; |
4632 | 4632 |
case 0x107: /* sysret */ |
Also available in: Unified diff