Revision 49a945a3
b/cpu-exec.c | ||
---|---|---|
56 | 56 |
|
57 | 57 |
void cpu_loop_exit(void) |
58 | 58 |
{ |
59 |
/* NOTE: the register at this point must be saved by hand because |
|
60 |
longjmp restore them */ |
|
61 |
regs_to_env(); |
|
62 | 59 |
longjmp(env->jmp_env, 1); |
63 | 60 |
} |
64 | 61 |
|
... | ... | |
130 | 127 |
|
131 | 128 |
tb_invalidated_flag = 0; |
132 | 129 |
|
133 |
regs_to_env(); /* XXX: do it just before cpu_gen_code() */ |
|
134 |
|
|
135 | 130 |
/* find translated block using physical mappings */ |
136 | 131 |
phys_pc = get_phys_addr_code(env, pc); |
137 | 132 |
phys_page1 = phys_pc & TARGET_PAGE_MASK; |
... | ... | |
230 | 225 |
#include "hostregs_helper.h" |
231 | 226 |
env = env1; |
232 | 227 |
|
233 |
env_to_regs(); |
|
234 | 228 |
#if defined(TARGET_I386) |
235 | 229 |
/* put eflags in CPU temporary format */ |
236 | 230 |
CC_SRC = env->eflags & (CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C); |
... | ... | |
544 | 538 |
#ifdef CONFIG_DEBUG_EXEC |
545 | 539 |
if (qemu_loglevel_mask(CPU_LOG_TB_CPU)) { |
546 | 540 |
/* restore flags in standard format */ |
547 |
regs_to_env(); |
|
548 | 541 |
#if defined(TARGET_I386) |
549 | 542 |
env->eflags = env->eflags | helper_cc_compute_all(CC_OP) | (DF & DF_MASK); |
550 | 543 |
log_cpu_state(env, X86_DUMP_CCOP); |
... | ... | |
651 | 644 |
/* reset soft MMU for next block (it can currently |
652 | 645 |
only be set by a memory fault) */ |
653 | 646 |
} /* for(;;) */ |
654 |
} else { |
|
655 |
env_to_regs(); |
|
656 | 647 |
} |
657 | 648 |
} /* for(;;) */ |
658 | 649 |
|
b/target-alpha/exec.h | ||
---|---|---|
39 | 39 |
#include "softmmu_exec.h" |
40 | 40 |
#endif /* !defined(CONFIG_USER_ONLY) */ |
41 | 41 |
|
42 |
static inline void env_to_regs(void) |
|
43 |
{ |
|
44 |
} |
|
45 |
|
|
46 |
static inline void regs_to_env(void) |
|
47 |
{ |
|
48 |
} |
|
49 |
|
|
50 | 42 |
static inline int cpu_has_work(CPUState *env) |
51 | 43 |
{ |
52 | 44 |
return (env->interrupt_request & CPU_INTERRUPT_HARD); |
b/target-arm/exec.h | ||
---|---|---|
26 | 26 |
#include "cpu.h" |
27 | 27 |
#include "exec-all.h" |
28 | 28 |
|
29 |
static inline void env_to_regs(void) |
|
30 |
{ |
|
31 |
} |
|
32 |
|
|
33 |
static inline void regs_to_env(void) |
|
34 |
{ |
|
35 |
} |
|
36 |
|
|
37 | 29 |
static inline int cpu_has_work(CPUState *env) |
38 | 30 |
{ |
39 | 31 |
return (env->interrupt_request & |
b/target-cris/exec.h | ||
---|---|---|
24 | 24 |
#include "cpu.h" |
25 | 25 |
#include "exec-all.h" |
26 | 26 |
|
27 |
static inline void env_to_regs(void) |
|
28 |
{ |
|
29 |
} |
|
30 |
|
|
31 |
static inline void regs_to_env(void) |
|
32 |
{ |
|
33 |
} |
|
34 |
|
|
35 | 27 |
#if !defined(CONFIG_USER_ONLY) |
36 | 28 |
#include "softmmu_exec.h" |
37 | 29 |
#endif |
b/target-i386/exec.h | ||
---|---|---|
290 | 290 |
(eflags & update_mask) | 0x2; |
291 | 291 |
} |
292 | 292 |
|
293 |
static inline void env_to_regs(void) |
|
294 |
{ |
|
295 |
} |
|
296 |
|
|
297 |
static inline void regs_to_env(void) |
|
298 |
{ |
|
299 |
} |
|
300 |
|
|
301 | 293 |
static inline int cpu_has_work(CPUState *env) |
302 | 294 |
{ |
303 | 295 |
int work; |
b/target-m68k/exec.h | ||
---|---|---|
28 | 28 |
#include "cpu.h" |
29 | 29 |
#include "exec-all.h" |
30 | 30 |
|
31 |
static inline void env_to_regs(void) |
|
32 |
{ |
|
33 |
} |
|
34 |
|
|
35 |
static inline void regs_to_env(void) |
|
36 |
{ |
|
37 |
} |
|
38 |
|
|
39 | 31 |
#if !defined(CONFIG_USER_ONLY) |
40 | 32 |
#include "softmmu_exec.h" |
41 | 33 |
#endif |
b/target-microblaze/exec.h | ||
---|---|---|
23 | 23 |
#include "cpu.h" |
24 | 24 |
#include "exec-all.h" |
25 | 25 |
|
26 |
static inline void env_to_regs(void) |
|
27 |
{ |
|
28 |
} |
|
29 |
|
|
30 |
static inline void regs_to_env(void) |
|
31 |
{ |
|
32 |
} |
|
33 |
|
|
34 | 26 |
#if !defined(CONFIG_USER_ONLY) |
35 | 27 |
#include "softmmu_exec.h" |
36 | 28 |
#endif |
b/target-mips/exec.h | ||
---|---|---|
25 | 25 |
void cpu_mips_clock_init (CPUState *env); |
26 | 26 |
void cpu_mips_tlb_flush (CPUState *env, int flush_global); |
27 | 27 |
|
28 |
static inline void env_to_regs(void) |
|
29 |
{ |
|
30 |
} |
|
31 |
|
|
32 |
static inline void regs_to_env(void) |
|
33 |
{ |
|
34 |
} |
|
35 |
|
|
36 | 28 |
static inline int cpu_has_work(CPUState *env) |
37 | 29 |
{ |
38 | 30 |
return (env->interrupt_request & |
b/target-ppc/exec.h | ||
---|---|---|
35 | 35 |
#include "softmmu_exec.h" |
36 | 36 |
#endif /* !defined(CONFIG_USER_ONLY) */ |
37 | 37 |
|
38 |
static inline void env_to_regs(void) |
|
39 |
{ |
|
40 |
} |
|
41 |
|
|
42 |
static inline void regs_to_env(void) |
|
43 |
{ |
|
44 |
} |
|
45 |
|
|
46 | 38 |
static inline int cpu_has_work(CPUState *env) |
47 | 39 |
{ |
48 | 40 |
return (msr_ee && (env->interrupt_request & CPU_INTERRUPT_HARD)); |
b/target-s390x/exec.h | ||
---|---|---|
35 | 35 |
return env->interrupt_request & CPU_INTERRUPT_HARD; // guess |
36 | 36 |
} |
37 | 37 |
|
38 |
static inline void regs_to_env(void) |
|
39 |
{ |
|
40 |
} |
|
41 |
|
|
42 |
static inline void env_to_regs(void) |
|
43 |
{ |
|
44 |
} |
|
45 |
|
|
46 | 38 |
static inline int cpu_halted(CPUState *env) |
47 | 39 |
{ |
48 | 40 |
if (!env->halted) { |
b/target-sh4/exec.h | ||
---|---|---|
47 | 47 |
#include "softmmu_exec.h" |
48 | 48 |
#endif |
49 | 49 |
|
50 |
static inline void regs_to_env(void) |
|
51 |
{ |
|
52 |
/* XXXXX */ |
|
53 |
} |
|
54 |
|
|
55 |
static inline void env_to_regs(void) |
|
56 |
{ |
|
57 |
/* XXXXX */ |
|
58 |
} |
|
59 |
|
|
60 | 50 |
#endif /* _EXEC_SH4_H */ |
b/target-sparc/exec.h | ||
---|---|---|
13 | 13 |
#include "cpu.h" |
14 | 14 |
#include "exec-all.h" |
15 | 15 |
|
16 |
static inline void env_to_regs(void) |
|
17 |
{ |
|
18 |
} |
|
19 |
|
|
20 |
static inline void regs_to_env(void) |
|
21 |
{ |
|
22 |
} |
|
23 |
|
|
24 | 16 |
/* op_helper.c */ |
25 | 17 |
void do_interrupt(CPUState *env); |
26 | 18 |
|
Also available in: Unified diff