Statistics
| Branch: | Revision:

root / target-mips / exec.h @ 8294eba1

History | View | Annotate | Download (4.3 kB)

1 6af0bf9c bellard
#if !defined(__QEMU_MIPS_EXEC_H__)
2 6af0bf9c bellard
#define __QEMU_MIPS_EXEC_H__
3 6af0bf9c bellard
4 01dbbdf1 bellard
//#define DEBUG_OP
5 6af0bf9c bellard
6 c570fd16 ths
#include "config.h"
7 6af0bf9c bellard
#include "mips-defs.h"
8 6af0bf9c bellard
#include "dyngen-exec.h"
9 6af0bf9c bellard
10 6af0bf9c bellard
register struct CPUMIPSState *env asm(AREG0);
11 6af0bf9c bellard
12 6af0bf9c bellard
#if defined (USE_64BITS_REGS)
13 6af0bf9c bellard
typedef int64_t host_int_t;
14 6af0bf9c bellard
typedef uint64_t host_uint_t;
15 6af0bf9c bellard
#else
16 6af0bf9c bellard
typedef int32_t host_int_t;
17 6af0bf9c bellard
typedef uint32_t host_uint_t;
18 6af0bf9c bellard
#endif
19 6af0bf9c bellard
20 c570fd16 ths
#if TARGET_LONG_BITS > HOST_LONG_BITS
21 c570fd16 ths
#define T0 (env->t0)
22 c570fd16 ths
#define T1 (env->t1)
23 c570fd16 ths
#define T2 (env->t2)
24 c570fd16 ths
#else
25 6af0bf9c bellard
register host_uint_t T0 asm(AREG1);
26 6af0bf9c bellard
register host_uint_t T1 asm(AREG2);
27 6af0bf9c bellard
register host_uint_t T2 asm(AREG3);
28 c570fd16 ths
#endif
29 6af0bf9c bellard
30 6af0bf9c bellard
#if defined (USE_HOST_FLOAT_REGS)
31 6ea83fed bellard
#error "implement me."
32 6af0bf9c bellard
#else
33 6ea83fed bellard
#define FDT0 (env->ft0.fd)
34 6ea83fed bellard
#define FDT1 (env->ft1.fd)
35 6ea83fed bellard
#define FDT2 (env->ft2.fd)
36 6ea83fed bellard
#define FST0 (env->ft0.fs[FP_ENDIAN_IDX])
37 6ea83fed bellard
#define FST1 (env->ft1.fs[FP_ENDIAN_IDX])
38 6ea83fed bellard
#define FST2 (env->ft2.fs[FP_ENDIAN_IDX])
39 6ea83fed bellard
#define DT0 (env->ft0.d)
40 6ea83fed bellard
#define DT1 (env->ft1.d)
41 6ea83fed bellard
#define DT2 (env->ft2.d)
42 6ea83fed bellard
#define WT0 (env->ft0.w[FP_ENDIAN_IDX])
43 6ea83fed bellard
#define WT1 (env->ft1.w[FP_ENDIAN_IDX])
44 6ea83fed bellard
#define WT2 (env->ft2.w[FP_ENDIAN_IDX])
45 6af0bf9c bellard
#endif
46 6af0bf9c bellard
47 6af0bf9c bellard
#if defined (DEBUG_OP)
48 70ead434 ths
# define RETURN() __asm__ __volatile__("nop" : : : "memory");
49 6af0bf9c bellard
#else
50 70ead434 ths
# define RETURN() __asm__ __volatile__("" : : : "memory");
51 6af0bf9c bellard
#endif
52 6af0bf9c bellard
53 6af0bf9c bellard
#include "cpu.h"
54 6af0bf9c bellard
#include "exec-all.h"
55 6af0bf9c bellard
56 6af0bf9c bellard
#if !defined(CONFIG_USER_ONLY)
57 a9049a07 bellard
#include "softmmu_exec.h"
58 6af0bf9c bellard
#endif /* !defined(CONFIG_USER_ONLY) */
59 6af0bf9c bellard
60 6af0bf9c bellard
static inline void env_to_regs(void)
61 6af0bf9c bellard
{
62 6af0bf9c bellard
}
63 6af0bf9c bellard
64 6af0bf9c bellard
static inline void regs_to_env(void)
65 6af0bf9c bellard
{
66 6af0bf9c bellard
}
67 6af0bf9c bellard
68 c570fd16 ths
#ifdef MIPS_HAS_MIPS64
69 c570fd16 ths
#if TARGET_LONG_BITS > HOST_LONG_BITS
70 c570fd16 ths
void do_dsll (void);
71 c570fd16 ths
void do_dsll32 (void);
72 c570fd16 ths
void do_dsra (void);
73 c570fd16 ths
void do_dsra32 (void);
74 c570fd16 ths
void do_dsrl (void);
75 c570fd16 ths
void do_dsrl32 (void);
76 c570fd16 ths
void do_drotr (void);
77 c570fd16 ths
void do_drotr32 (void);
78 c570fd16 ths
void do_dsllv (void);
79 c570fd16 ths
void do_dsrav (void);
80 c570fd16 ths
void do_dsrlv (void);
81 c570fd16 ths
void do_drotrv (void);
82 c570fd16 ths
#endif
83 c570fd16 ths
#endif
84 c570fd16 ths
85 c570fd16 ths
#if TARGET_LONG_BITS > HOST_LONG_BITS
86 6af0bf9c bellard
void do_mult (void);
87 6af0bf9c bellard
void do_multu (void);
88 6af0bf9c bellard
void do_madd (void);
89 6af0bf9c bellard
void do_maddu (void);
90 6af0bf9c bellard
void do_msub (void);
91 6af0bf9c bellard
void do_msubu (void);
92 c570fd16 ths
void do_ddiv (void);
93 c570fd16 ths
void do_ddivu (void);
94 c570fd16 ths
#endif
95 c570fd16 ths
#ifdef MIPS_HAS_MIPS64
96 c570fd16 ths
void do_dmult (void);
97 c570fd16 ths
void do_dmultu (void);
98 6af0bf9c bellard
#endif
99 873eb012 ths
void do_mfc0_random(void);
100 873eb012 ths
void do_mfc0_count(void);
101 7a387fff ths
void do_mtc0_entryhi(uint32_t in);
102 8c0fdd85 ths
void do_mtc0_status_debug(uint32_t old, uint32_t val);
103 8c0fdd85 ths
void do_mtc0_status_irqraise_debug(void);
104 6af0bf9c bellard
void do_tlbwi (void);
105 6af0bf9c bellard
void do_tlbwr (void);
106 6af0bf9c bellard
void do_tlbp (void);
107 6af0bf9c bellard
void do_tlbr (void);
108 6ea83fed bellard
void dump_fpu(CPUState *env);
109 6ea83fed bellard
void fpu_dump_state(CPUState *env, FILE *f, 
110 6ea83fed bellard
                    int (*fpu_fprintf)(FILE *f, const char *fmt, ...),
111 6ea83fed bellard
                    int flags);
112 6ea83fed bellard
void dump_sc (void);
113 4ad40f36 bellard
void do_lwl_raw (uint32_t);
114 4ad40f36 bellard
void do_lwr_raw (uint32_t);
115 4ad40f36 bellard
uint32_t do_swl_raw (uint32_t);
116 4ad40f36 bellard
uint32_t do_swr_raw (uint32_t);
117 c570fd16 ths
#ifdef MIPS_HAS_MIPS64
118 c570fd16 ths
void do_ldl_raw (uint64_t);
119 c570fd16 ths
void do_ldr_raw (uint64_t);
120 c570fd16 ths
uint64_t do_sdl_raw (uint64_t);
121 c570fd16 ths
uint64_t do_sdr_raw (uint64_t);
122 c570fd16 ths
#endif
123 6af0bf9c bellard
#if !defined(CONFIG_USER_ONLY)
124 4ad40f36 bellard
void do_lwl_user (uint32_t);
125 4ad40f36 bellard
void do_lwl_kernel (uint32_t);
126 4ad40f36 bellard
void do_lwr_user (uint32_t);
127 4ad40f36 bellard
void do_lwr_kernel (uint32_t);
128 4ad40f36 bellard
uint32_t do_swl_user (uint32_t);
129 4ad40f36 bellard
uint32_t do_swl_kernel (uint32_t);
130 4ad40f36 bellard
uint32_t do_swr_user (uint32_t);
131 4ad40f36 bellard
uint32_t do_swr_kernel (uint32_t);
132 c570fd16 ths
#ifdef MIPS_HAS_MIPS64
133 c570fd16 ths
void do_ldl_user (uint64_t);
134 c570fd16 ths
void do_ldl_kernel (uint64_t);
135 c570fd16 ths
void do_ldr_user (uint64_t);
136 c570fd16 ths
void do_ldr_kernel (uint64_t);
137 c570fd16 ths
uint64_t do_sdl_user (uint64_t);
138 c570fd16 ths
uint64_t do_sdl_kernel (uint64_t);
139 c570fd16 ths
uint64_t do_sdr_user (uint64_t);
140 c570fd16 ths
uint64_t do_sdr_kernel (uint64_t);
141 c570fd16 ths
#endif
142 6af0bf9c bellard
#endif
143 6af0bf9c bellard
void do_pmon (int function);
144 6af0bf9c bellard
145 d2ec1774 pbrook
void dump_sc (void);
146 d2ec1774 pbrook
147 6af0bf9c bellard
int cpu_mips_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
148 6af0bf9c bellard
                               int is_user, int is_softmmu);
149 6af0bf9c bellard
void do_interrupt (CPUState *env);
150 2ee4aed8 bellard
void invalidate_tlb (CPUState *env, int idx, int use_extra);
151 6af0bf9c bellard
152 6af0bf9c bellard
void cpu_loop_exit(void);
153 6af0bf9c bellard
void do_raise_exception_err (uint32_t exception, int error_code);
154 6af0bf9c bellard
void do_raise_exception (uint32_t exception);
155 4ad40f36 bellard
void do_raise_exception_direct (uint32_t exception);
156 6af0bf9c bellard
157 6af0bf9c bellard
void cpu_dump_state(CPUState *env, FILE *f, 
158 6af0bf9c bellard
                    int (*cpu_fprintf)(FILE *f, const char *fmt, ...),
159 6af0bf9c bellard
                    int flags);
160 6af0bf9c bellard
void cpu_mips_irqctrl_init (void);
161 6af0bf9c bellard
uint32_t cpu_mips_get_random (CPUState *env);
162 6af0bf9c bellard
uint32_t cpu_mips_get_count (CPUState *env);
163 6af0bf9c bellard
void cpu_mips_store_count (CPUState *env, uint32_t value);
164 6af0bf9c bellard
void cpu_mips_store_compare (CPUState *env, uint32_t value);
165 4de9b249 ths
void cpu_mips_update_irq(CPUState *env);
166 6af0bf9c bellard
void cpu_mips_clock_init (CPUState *env);
167 814b9a47 ths
void cpu_mips_tlb_flush (CPUState *env, int flush_global);
168 6af0bf9c bellard
169 6af0bf9c bellard
#endif /* !defined(__QEMU_MIPS_EXEC_H__) */