Statistics
| Branch: | Revision:

root / target-mips / exec.h @ 01179c38

History | View | Annotate | Download (4.4 kB)

1
#if !defined(__QEMU_MIPS_EXEC_H__)
2
#define __QEMU_MIPS_EXEC_H__
3

    
4
//#define DEBUG_OP
5

    
6
#include "config.h"
7
#include "mips-defs.h"
8
#include "dyngen-exec.h"
9
#include "cpu-defs.h"
10

    
11
register struct CPUMIPSState *env asm(AREG0);
12

    
13
#if TARGET_LONG_BITS > HOST_LONG_BITS
14
#define T0 (env->t0)
15
#define T1 (env->t1)
16
#define T2 (env->t2)
17
#else
18
register target_ulong T0 asm(AREG1);
19
register target_ulong T1 asm(AREG2);
20
register target_ulong T2 asm(AREG3);
21
#endif
22

    
23
#if defined (USE_HOST_FLOAT_REGS)
24
#error "implement me."
25
#else
26
#define FDT0 (env->ft0.fd)
27
#define FDT1 (env->ft1.fd)
28
#define FDT2 (env->ft2.fd)
29
#define FST0 (env->ft0.fs[FP_ENDIAN_IDX])
30
#define FST1 (env->ft1.fs[FP_ENDIAN_IDX])
31
#define FST2 (env->ft2.fs[FP_ENDIAN_IDX])
32
#define DT0 (env->ft0.d)
33
#define DT1 (env->ft1.d)
34
#define DT2 (env->ft2.d)
35
#define WT0 (env->ft0.w[FP_ENDIAN_IDX])
36
#define WT1 (env->ft1.w[FP_ENDIAN_IDX])
37
#define WT2 (env->ft2.w[FP_ENDIAN_IDX])
38
#endif
39

    
40
#if defined (DEBUG_OP)
41
# define RETURN() __asm__ __volatile__("nop" : : : "memory");
42
#else
43
# define RETURN() __asm__ __volatile__("" : : : "memory");
44
#endif
45

    
46
#include "cpu.h"
47
#include "exec-all.h"
48

    
49
#if !defined(CONFIG_USER_ONLY)
50
#include "softmmu_exec.h"
51
#endif /* !defined(CONFIG_USER_ONLY) */
52

    
53
static inline void env_to_regs(void)
54
{
55
}
56

    
57
static inline void regs_to_env(void)
58
{
59
}
60

    
61
#ifdef TARGET_MIPS64
62
#if TARGET_LONG_BITS > HOST_LONG_BITS
63
void do_dsll (void);
64
void do_dsll32 (void);
65
void do_dsra (void);
66
void do_dsra32 (void);
67
void do_dsrl (void);
68
void do_dsrl32 (void);
69
void do_drotr (void);
70
void do_drotr32 (void);
71
void do_dsllv (void);
72
void do_dsrav (void);
73
void do_dsrlv (void);
74
void do_drotrv (void);
75
#endif
76
#endif
77

    
78
#if HOST_LONG_BITS < 64
79
void do_div (void);
80
#endif
81
#if TARGET_LONG_BITS > HOST_LONG_BITS
82
void do_mult (void);
83
void do_multu (void);
84
void do_madd (void);
85
void do_maddu (void);
86
void do_msub (void);
87
void do_msubu (void);
88
#endif
89
#ifdef TARGET_MIPS64
90
void do_ddiv (void);
91
#if TARGET_LONG_BITS > HOST_LONG_BITS
92
void do_ddivu (void);
93
#endif
94
void do_dmult (void);
95
void do_dmultu (void);
96
#endif
97
void do_mfc0_random(void);
98
void do_mfc0_count(void);
99
void do_mtc0_entryhi(uint32_t in);
100
void do_mtc0_status_debug(uint32_t old, uint32_t val);
101
void do_mtc0_status_irqraise_debug(void);
102
void do_tlbwi (void);
103
void do_tlbwr (void);
104
void do_tlbp (void);
105
void do_tlbr (void);
106
void dump_fpu(CPUState *env);
107
void fpu_dump_state(CPUState *env, FILE *f, 
108
                    int (*fpu_fprintf)(FILE *f, const char *fmt, ...),
109
                    int flags);
110
void dump_sc (void);
111
void do_lwl_raw (uint32_t);
112
void do_lwr_raw (uint32_t);
113
uint32_t do_swl_raw (uint32_t);
114
uint32_t do_swr_raw (uint32_t);
115
#ifdef TARGET_MIPS64
116
void do_ldl_raw (uint64_t);
117
void do_ldr_raw (uint64_t);
118
uint64_t do_sdl_raw (uint64_t);
119
uint64_t do_sdr_raw (uint64_t);
120
#endif
121
#if !defined(CONFIG_USER_ONLY)
122
void do_lwl_user (uint32_t);
123
void do_lwl_kernel (uint32_t);
124
void do_lwr_user (uint32_t);
125
void do_lwr_kernel (uint32_t);
126
uint32_t do_swl_user (uint32_t);
127
uint32_t do_swl_kernel (uint32_t);
128
uint32_t do_swr_user (uint32_t);
129
uint32_t do_swr_kernel (uint32_t);
130
#ifdef TARGET_MIPS64
131
void do_ldl_user (uint64_t);
132
void do_ldl_kernel (uint64_t);
133
void do_ldr_user (uint64_t);
134
void do_ldr_kernel (uint64_t);
135
uint64_t do_sdl_user (uint64_t);
136
uint64_t do_sdl_kernel (uint64_t);
137
uint64_t do_sdr_user (uint64_t);
138
uint64_t do_sdr_kernel (uint64_t);
139
#endif
140
#endif
141
void do_pmon (int function);
142

    
143
void dump_sc (void);
144

    
145
int cpu_mips_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
146
                               int is_user, int is_softmmu);
147
void do_interrupt (CPUState *env);
148
void invalidate_tlb (CPUState *env, int idx, int use_extra);
149

    
150
void cpu_loop_exit(void);
151
void do_raise_exception_err (uint32_t exception, int error_code);
152
void do_raise_exception (uint32_t exception);
153
void do_raise_exception_direct_err (uint32_t exception, int error_code);
154
void do_raise_exception_direct (uint32_t exception);
155

    
156
void cpu_dump_state(CPUState *env, FILE *f, 
157
                    int (*cpu_fprintf)(FILE *f, const char *fmt, ...),
158
                    int flags);
159
void cpu_mips_irqctrl_init (void);
160
uint32_t cpu_mips_get_random (CPUState *env);
161
uint32_t cpu_mips_get_count (CPUState *env);
162
void cpu_mips_store_count (CPUState *env, uint32_t value);
163
void cpu_mips_store_compare (CPUState *env, uint32_t value);
164
void cpu_mips_update_irq (CPUState *env);
165
void cpu_mips_clock_init (CPUState *env);
166
void cpu_mips_tlb_flush (CPUState *env, int flush_global);
167

    
168
#endif /* !defined(__QEMU_MIPS_EXEC_H__) */