|
|
1.1 root 1: #ifndef EXEC_SPARC_H
2: #define EXEC_SPARC_H 1
3: #include "config.h"
1.1.1.4 ! root 4: #include "dyngen-exec.h"
1.1 root 5:
6: register struct CPUSPARCState *env asm(AREG0);
1.1.1.3 root 7:
1.1 root 8: #ifdef TARGET_SPARC64
9: #define T0 (env->t0)
10: #define T1 (env->t1)
11: #define T2 (env->t2)
12: #define REGWPTR env->regwptr
13: #else
14: register uint32_t T0 asm(AREG1);
15: register uint32_t T1 asm(AREG2);
16:
17: #undef REG_REGWPTR // Broken
18: #ifdef REG_REGWPTR
1.1.1.3 root 19: #if defined(__sparc__)
20: register uint32_t *REGWPTR asm(AREG4);
21: #else
1.1 root 22: register uint32_t *REGWPTR asm(AREG3);
1.1.1.3 root 23: #endif
1.1 root 24: #define reg_REGWPTR
25:
26: #ifdef AREG4
27: register 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
35: register uint32_t T2 asm(AREG3);
1.1.1.3 root 36: #endif
1.1 root 37: #define reg_T2
38: #endif
39:
40: #define FT0 (env->ft0)
41: #define FT1 (env->ft1)
42: #define DT0 (env->dt0)
43: #define DT1 (env->dt1)
1.1.1.4 ! root 44: #if defined(CONFIG_USER_ONLY)
! 45: #define QT0 (env->qt0)
! 46: #define QT1 (env->qt1)
! 47: #endif
1.1 root 48:
49: #include "cpu.h"
50: #include "exec-all.h"
51:
52: void cpu_lock(void);
53: void cpu_unlock(void);
54: void cpu_loop_exit(void);
55: void helper_flush(target_ulong addr);
56: void helper_ld_asi(int asi, int size, int sign);
1.1.1.4 ! root 57: void helper_st_asi(int asi, int size);
! 58: void helper_ldf_asi(int asi, int size, int rd);
! 59: void helper_stf_asi(int asi, int size, int rd);
1.1 root 60: void helper_rett(void);
61: void helper_ldfsr(void);
62: void set_cwp(int new_cwp);
63: void do_fitos(void);
64: void do_fitod(void);
65: void do_fabss(void);
66: void do_fsqrts(void);
67: void do_fsqrtd(void);
68: void do_fcmps(void);
69: void do_fcmpd(void);
1.1.1.4 ! root 70: void do_fcmpes(void);
! 71: void do_fcmped(void);
! 72: #if defined(CONFIG_USER_ONLY)
! 73: void do_fitoq(void);
! 74: void do_fsqrtq(void);
! 75: void do_fcmpq(void);
! 76: void do_fcmpeq(void);
! 77: #endif
1.1 root 78: #ifdef TARGET_SPARC64
79: void do_fabsd(void);
1.1.1.4 ! root 80: void do_fxtos(void);
! 81: void do_fxtod(void);
1.1 root 82: void do_fcmps_fcc1(void);
83: void do_fcmpd_fcc1(void);
84: void do_fcmps_fcc2(void);
85: void do_fcmpd_fcc2(void);
86: void do_fcmps_fcc3(void);
87: void do_fcmpd_fcc3(void);
1.1.1.4 ! root 88: void do_fcmpes_fcc1(void);
! 89: void do_fcmped_fcc1(void);
! 90: void do_fcmpes_fcc2(void);
! 91: void do_fcmped_fcc2(void);
! 92: void do_fcmpes_fcc3(void);
! 93: void do_fcmped_fcc3(void);
! 94: #if defined(CONFIG_USER_ONLY)
! 95: void do_fabsq(void);
! 96: void do_fxtoq(void);
! 97: void do_fcmpq_fcc1(void);
! 98: void do_fcmpq_fcc2(void);
! 99: void do_fcmpq_fcc3(void);
! 100: void do_fcmpeq_fcc1(void);
! 101: void do_fcmpeq_fcc2(void);
! 102: void do_fcmpeq_fcc3(void);
! 103: #endif
1.1 root 104: void do_popc();
105: void do_wrpstate();
106: void do_done();
107: void do_retry();
108: #endif
109: void do_ldd_kernel(target_ulong addr);
110: void do_ldd_user(target_ulong addr);
111: void do_ldd_raw(target_ulong addr);
112: void do_interrupt(int intno);
113: void raise_exception(int tt);
1.1.1.4 ! root 114: void check_ieee_exceptions();
1.1 root 115: void memcpy32(target_ulong *dst, const target_ulong *src);
116: target_ulong mmu_probe(CPUState *env, target_ulong address, int mmulev);
117: void dump_mmu(CPUState *env);
118: void helper_debug();
119: void do_wrpsr();
120: void do_rdpsr();
121:
122: /* XXX: move that to a generic header */
123: #if !defined(CONFIG_USER_ONLY)
1.1.1.2 root 124: #include "softmmu_exec.h"
1.1 root 125: #endif /* !defined(CONFIG_USER_ONLY) */
126:
127: static inline void env_to_regs(void)
128: {
1.1.1.2 root 129: #if defined(reg_REGWPTR)
130: REGWPTR = env->regbase + (env->cwp * 16);
131: env->regwptr = REGWPTR;
132: #endif
1.1 root 133: }
134:
135: static inline void regs_to_env(void)
136: {
137: }
138:
139: int cpu_sparc_handle_mmu_fault(CPUState *env, target_ulong address, int rw,
1.1.1.4 ! root 140: int mmu_idx, int is_softmmu);
! 141:
! 142: static inline int cpu_halted(CPUState *env) {
! 143: if (!env->halted)
! 144: return 0;
! 145: if ((env->interrupt_request & CPU_INTERRUPT_HARD) && (env->psret != 0)) {
! 146: env->halted = 0;
! 147: return 0;
! 148: }
! 149: return EXCP_HALTED;
! 150: }
1.1 root 151:
152: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.