]> git.proxmox.com Git - mirror_qemu.git/blame - target-sparc/exec.h
Replace is_user variable with mmu_idx in softmmu core,
[mirror_qemu.git] / target-sparc / exec.h
CommitLineData
7a3f1944
FB
1#ifndef EXEC_SPARC_H
2#define EXEC_SPARC_H 1
3475187d 3#include "config.h"
8294eba1 4#include "dyngen-exec.h"
7a3f1944
FB
5
6register struct CPUSPARCState *env asm(AREG0);
01d6a890 7
af7bf89b
FB
8#ifdef TARGET_SPARC64
9#define T0 (env->t0)
10#define T1 (env->t1)
11#define T2 (env->t2)
3475187d 12#define REGWPTR env->regwptr
af7bf89b 13#else
7a3f1944
FB
14register uint32_t T0 asm(AREG1);
15register uint32_t T1 asm(AREG2);
3475187d
FB
16
17#undef REG_REGWPTR // Broken
18#ifdef REG_REGWPTR
01d6a890
TS
19#if defined(__sparc__)
20register uint32_t *REGWPTR asm(AREG4);
21#else
3475187d 22register uint32_t *REGWPTR asm(AREG3);
01d6a890 23#endif
3475187d
FB
24#define reg_REGWPTR
25
26#ifdef AREG4
27register uint32_t T2 asm(AREG4);
28#define reg_T2
29#else
30#define T2 (env->t2)
31#endif
32
33#else
34#define REGWPTR env->regwptr
7a3f1944 35register uint32_t T2 asm(AREG3);
01d6a890 36#endif
3475187d
FB
37#define reg_T2
38#endif
3475187d 39
e8af50a3
FB
40#define FT0 (env->ft0)
41#define FT1 (env->ft1)
e8af50a3
FB
42#define DT0 (env->dt0)
43#define DT1 (env->dt1)
7a3f1944
FB
44
45#include "cpu.h"
46#include "exec-all.h"
47
48void cpu_lock(void);
49void cpu_unlock(void);
50void cpu_loop_exit(void);
658138bc 51void helper_flush(target_ulong addr);
e8af50a3 52void helper_ld_asi(int asi, int size, int sign);
81ad8ba2 53void helper_st_asi(int asi, int size);
3391c818
BS
54void helper_ldf_asi(int asi, int size, int rd);
55void helper_stf_asi(int asi, int size, int rd);
e8af50a3 56void helper_rett(void);
8d5f07fa 57void helper_ldfsr(void);
e8af50a3 58void set_cwp(int new_cwp);
a0c4cb4a
FB
59void do_fitos(void);
60void do_fitod(void);
e8af50a3
FB
61void do_fabss(void);
62void do_fsqrts(void);
63void do_fsqrtd(void);
64void do_fcmps(void);
65void do_fcmpd(void);
417454b0
BS
66void do_fcmpes(void);
67void do_fcmped(void);
3475187d
FB
68#ifdef TARGET_SPARC64
69void do_fabsd(void);
70void do_fcmps_fcc1(void);
71void do_fcmpd_fcc1(void);
72void do_fcmps_fcc2(void);
73void do_fcmpd_fcc2(void);
74void do_fcmps_fcc3(void);
75void do_fcmpd_fcc3(void);
417454b0
BS
76void do_fcmpes_fcc1(void);
77void do_fcmped_fcc1(void);
78void do_fcmpes_fcc2(void);
79void do_fcmped_fcc2(void);
80void do_fcmpes_fcc3(void);
81void do_fcmped_fcc3(void);
3475187d 82void do_popc();
83469015
FB
83void do_wrpstate();
84void do_done();
85void do_retry();
3475187d 86#endif
af7bf89b
FB
87void do_ldd_kernel(target_ulong addr);
88void do_ldd_user(target_ulong addr);
89void do_ldd_raw(target_ulong addr);
878d3096 90void do_interrupt(int intno);
e8af50a3 91void raise_exception(int tt);
417454b0 92void check_ieee_exceptions();
af7bf89b 93void memcpy32(target_ulong *dst, const target_ulong *src);
ee5bbe38
FB
94target_ulong mmu_probe(CPUState *env, target_ulong address, int mmulev);
95void dump_mmu(CPUState *env);
e80cfcfc 96void helper_debug();
af7bf89b
FB
97void do_wrpsr();
98void do_rdpsr();
e8af50a3
FB
99
100/* XXX: move that to a generic header */
101#if !defined(CONFIG_USER_ONLY)
a9049a07 102#include "softmmu_exec.h"
e8af50a3 103#endif /* !defined(CONFIG_USER_ONLY) */
0d1a29f9
FB
104
105static inline void env_to_regs(void)
106{
aea3ce4c
FB
107#if defined(reg_REGWPTR)
108 REGWPTR = env->regbase + (env->cwp * 16);
109 env->regwptr = REGWPTR;
110#endif
0d1a29f9
FB
111}
112
113static inline void regs_to_env(void)
114{
115}
116
9d893301 117int cpu_sparc_handle_mmu_fault(CPUState *env, target_ulong address, int rw,
6ebbf390 118 int mmu_idx, int is_softmmu);
9d893301 119
bfed01fc
TS
120static inline int cpu_halted(CPUState *env) {
121 if (!env->halted)
122 return 0;
123 if ((env->interrupt_request & CPU_INTERRUPT_HARD) && (env->psret != 0)) {
124 env->halted = 0;
125 return 0;
126 }
127 return EXCP_HALTED;
128}
129
7a3f1944 130#endif