Skip to content

Commit

Permalink
Switch remaining CP0 instructions to TCG or helper functions.
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4708 c046a42c-6fe2-441c-8c8c-71466251a162
  • Loading branch information
ths committed Jun 9, 2008
1 parent 176a4f2 commit f1aa632
Show file tree
Hide file tree
Showing 5 changed files with 1,179 additions and 1,236 deletions.
35 changes: 1 addition & 34 deletions target-mips/exec.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,6 @@ register target_ulong T1 asm(AREG2);
#include "softmmu_exec.h"
#endif /* !defined(CONFIG_USER_ONLY) */

#if defined(TARGET_MIPS64)
#if TARGET_LONG_BITS > HOST_LONG_BITS
void do_dsll (void);
void do_dsll32 (void);
void do_dsra (void);
void do_dsra32 (void);
void do_dsrl (void);
void do_dsrl32 (void);
void do_drotr (void);
void do_drotr32 (void);
void do_dsllv (void);
void do_dsrav (void);
void do_dsrlv (void);
void do_drotrv (void);
void do_dclo (void);
void do_dclz (void);
#endif
#endif

#if HOST_LONG_BITS < 64
void do_div (void);
#endif
#if TARGET_LONG_BITS > HOST_LONG_BITS
void do_mult (void);
void do_multu (void);
Expand All @@ -92,15 +70,7 @@ void do_mulhiu (void);
void do_mulshi (void);
void do_mulshiu (void);
#endif
#if defined(TARGET_MIPS64)
void do_ddiv (void);
#if TARGET_LONG_BITS > HOST_LONG_BITS
void do_ddivu (void);
#endif
#endif
void do_mfc0_random(void);
void do_mfc0_count(void);
void do_mtc0_entryhi(uint32_t in);

void do_mtc0_status_debug(uint32_t old, uint32_t val);
void do_mtc0_status_irqraise_debug(void);
void dump_fpu(CPUState *env);
Expand Down Expand Up @@ -133,9 +103,6 @@ void cpu_mips_update_irq (CPUState *env);
void cpu_mips_clock_init (CPUState *env);
void cpu_mips_tlb_flush (CPUState *env, int flush_global);

void do_cfc1 (int reg);
void do_ctc1 (int reg);

#define FOP_PROTO(op) \
void do_float_ ## op ## _s(void); \
void do_float_ ## op ## _d(void);
Expand Down
118 changes: 118 additions & 0 deletions target-mips/helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,121 @@ DEF_HELPER(void, do_clz, (void))
DEF_HELPER(void, do_dclo, (void))
DEF_HELPER(void, do_dclz, (void))
#endif

/* CP0 helpers */
#ifndef CONFIG_USER_ONLY
DEF_HELPER(void, do_mfc0_mvpcontrol, (void))
DEF_HELPER(void, do_mfc0_mvpconf0, (void))
DEF_HELPER(void, do_mfc0_mvpconf1, (void))
DEF_HELPER(void, do_mfc0_random, (void))
DEF_HELPER(void, do_mfc0_tcstatus, (void))
DEF_HELPER(void, do_mftc0_tcstatus, (void))
DEF_HELPER(void, do_mfc0_tcbind, (void))
DEF_HELPER(void, do_mftc0_tcbind, (void))
DEF_HELPER(void, do_mfc0_tcrestart, (void))
DEF_HELPER(void, do_mftc0_tcrestart, (void))
DEF_HELPER(void, do_mfc0_tchalt, (void))
DEF_HELPER(void, do_mftc0_tchalt, (void))
DEF_HELPER(void, do_mfc0_tccontext, (void))
DEF_HELPER(void, do_mftc0_tccontext, (void))
DEF_HELPER(void, do_mfc0_tcschedule, (void))
DEF_HELPER(void, do_mftc0_tcschedule, (void))
DEF_HELPER(void, do_mfc0_tcschefback, (void))
DEF_HELPER(void, do_mftc0_tcschefback, (void))
DEF_HELPER(void, do_mfc0_count, (void))
DEF_HELPER(void, do_mftc0_entryhi, (void))
DEF_HELPER(void, do_mftc0_status, (void))
DEF_HELPER(void, do_mfc0_lladdr, (void))
DEF_HELPER(void, do_mfc0_watchlo, (uint32_t sel))
DEF_HELPER(void, do_mfc0_watchhi, (uint32_t sel))
DEF_HELPER(void, do_mfc0_debug, (void))
DEF_HELPER(void, do_mftc0_debug, (void))
#ifdef TARGET_MIPS64
DEF_HELPER(void, do_dmfc0_tcrestart, (void))
DEF_HELPER(void, do_dmfc0_tchalt, (void))
DEF_HELPER(void, do_dmfc0_tccontext, (void))
DEF_HELPER(void, do_dmfc0_tcschedule, (void))
DEF_HELPER(void, do_dmfc0_tcschefback, (void))
DEF_HELPER(void, do_dmfc0_lladdr, (void))
DEF_HELPER(void, do_dmfc0_watchlo, (uint32_t sel))
#endif /* TARGET_MIPS64 */

DEF_HELPER(void, do_mtc0_index, (void))
DEF_HELPER(void, do_mtc0_mvpcontrol, (void))
DEF_HELPER(void, do_mtc0_vpecontrol, (void))
DEF_HELPER(void, do_mtc0_vpeconf0, (void))
DEF_HELPER(void, do_mtc0_vpeconf1, (void))
DEF_HELPER(void, do_mtc0_yqmask, (void))
DEF_HELPER(void, do_mtc0_vpeopt, (void))
DEF_HELPER(void, do_mtc0_entrylo0, (void))
DEF_HELPER(void, do_mtc0_tcstatus, (void))
DEF_HELPER(void, do_mttc0_tcstatus, (void))
DEF_HELPER(void, do_mtc0_tcbind, (void))
DEF_HELPER(void, do_mttc0_tcbind, (void))
DEF_HELPER(void, do_mtc0_tcrestart, (void))
DEF_HELPER(void, do_mttc0_tcrestart, (void))
DEF_HELPER(void, do_mtc0_tchalt, (void))
DEF_HELPER(void, do_mttc0_tchalt, (void))
DEF_HELPER(void, do_mtc0_tccontext, (void))
DEF_HELPER(void, do_mttc0_tccontext, (void))
DEF_HELPER(void, do_mtc0_tcschedule, (void))
DEF_HELPER(void, do_mttc0_tcschedule, (void))
DEF_HELPER(void, do_mtc0_tcschefback, (void))
DEF_HELPER(void, do_mttc0_tcschefback, (void))
DEF_HELPER(void, do_mtc0_entrylo1, (void))
DEF_HELPER(void, do_mtc0_context, (void))
DEF_HELPER(void, do_mtc0_pagemask, (void))
DEF_HELPER(void, do_mtc0_pagegrain, (void))
DEF_HELPER(void, do_mtc0_wired, (void))
DEF_HELPER(void, do_mtc0_srsconf0, (void))
DEF_HELPER(void, do_mtc0_srsconf1, (void))
DEF_HELPER(void, do_mtc0_srsconf2, (void))
DEF_HELPER(void, do_mtc0_srsconf3, (void))
DEF_HELPER(void, do_mtc0_srsconf4, (void))
DEF_HELPER(void, do_mtc0_hwrena, (void))
DEF_HELPER(void, do_mtc0_count, (void))
DEF_HELPER(void, do_mtc0_entryhi, (void))
DEF_HELPER(void, do_mttc0_entryhi, (void))
DEF_HELPER(void, do_mtc0_compare, (void))
DEF_HELPER(void, do_mtc0_status, (void))
DEF_HELPER(void, do_mttc0_status, (void))
DEF_HELPER(void, do_mtc0_intctl, (void))
DEF_HELPER(void, do_mtc0_srsctl, (void))
DEF_HELPER(void, do_mtc0_cause, (void))
DEF_HELPER(void, do_mtc0_ebase, (void))
DEF_HELPER(void, do_mtc0_config0, (void))
DEF_HELPER(void, do_mtc0_config2, (void))
DEF_HELPER(void, do_mtc0_watchlo, (uint32_t sel))
DEF_HELPER(void, do_mtc0_watchhi, (uint32_t sel))
DEF_HELPER(void, do_mtc0_xcontext, (void))
DEF_HELPER(void, do_mtc0_framemask, (void))
DEF_HELPER(void, do_mtc0_debug, (void))
DEF_HELPER(void, do_mttc0_debug, (void))
DEF_HELPER(void, do_mtc0_performance0, (void))
DEF_HELPER(void, do_mtc0_taglo, (void))
DEF_HELPER(void, do_mtc0_datalo, (void))
DEF_HELPER(void, do_mtc0_taghi, (void))
DEF_HELPER(void, do_mtc0_datahi, (void))
#endif /* !CONFIG_USER_ONLY */

/* MIPS MT functions */
DEF_HELPER(void, do_mftgpr, (uint32_t sel))
DEF_HELPER(void, do_mftlo, (uint32_t sel))
DEF_HELPER(void, do_mfthi, (uint32_t sel))
DEF_HELPER(void, do_mftacx, (uint32_t sel))
DEF_HELPER(void, do_mftdsp, (void))
DEF_HELPER(void, do_mttgpr, (uint32_t sel))
DEF_HELPER(void, do_mttlo, (uint32_t sel))
DEF_HELPER(void, do_mtthi, (uint32_t sel))
DEF_HELPER(void, do_mttacx, (uint32_t sel))
DEF_HELPER(void, do_mttdsp, (void))
DEF_HELPER(void, do_dmt, (void))
DEF_HELPER(void, do_emt, (void))
DEF_HELPER(void, do_dvpe, (void))
DEF_HELPER(void, do_evpe, (void))
DEF_HELPER(void, do_fork, (void))
DEF_HELPER(void, do_yield, (void))

/* CP1 functions */
DEF_HELPER(void, do_cfc1, (uint32_t reg))
DEF_HELPER(void, do_ctc1, (uint32_t reg))
Loading

0 comments on commit f1aa632

Please sign in to comment.