target-mips: switch to AREG0 free mode
Add an explicit CPUState parameter instead of relying on AREG0 and switch to AREG0 free mode. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Acked-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
485d003539
commit
895c2d0435
2
configure
vendored
2
configure
vendored
|
@ -3874,7 +3874,7 @@ symlink "$source_path/Makefile.target" "$target_dir/Makefile"
|
||||||
|
|
||||||
|
|
||||||
case "$target_arch2" in
|
case "$target_arch2" in
|
||||||
alpha | arm* | cris | i386 | lm32 | m68k | microblaze* | or32 | s390x | sh4* | sparc* | unicore32 | x86_64 | xtensa* | ppc*)
|
alpha | arm* | cris | i386 | lm32 | m68k | microblaze* | mips* | or32 | s390x | sh4* | sparc* | unicore32 | x86_64 | xtensa* | ppc*)
|
||||||
echo "CONFIG_TCG_PASS_AREG0=y" >> $config_target_mak
|
echo "CONFIG_TCG_PASS_AREG0=y" >> $config_target_mak
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -1,4 +1,2 @@
|
||||||
obj-y += translate.o op_helper.o helper.o cpu.o
|
obj-y += translate.o op_helper.o helper.o cpu.o
|
||||||
obj-$(CONFIG_SOFTMMU) += machine.o
|
obj-$(CONFIG_SOFTMMU) += machine.o
|
||||||
|
|
||||||
$(obj)/op_helper.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
|
|
||||||
|
|
|
@ -38,10 +38,10 @@ struct CPUMIPSTLBContext {
|
||||||
uint32_t nb_tlb;
|
uint32_t nb_tlb;
|
||||||
uint32_t tlb_in_use;
|
uint32_t tlb_in_use;
|
||||||
int (*map_address) (struct CPUMIPSState *env, target_phys_addr_t *physical, int *prot, target_ulong address, int rw, int access_type);
|
int (*map_address) (struct CPUMIPSState *env, target_phys_addr_t *physical, int *prot, target_ulong address, int rw, int access_type);
|
||||||
void (*helper_tlbwi) (void);
|
void (*helper_tlbwi)(struct CPUMIPSState *env);
|
||||||
void (*helper_tlbwr) (void);
|
void (*helper_tlbwr)(struct CPUMIPSState *env);
|
||||||
void (*helper_tlbp) (void);
|
void (*helper_tlbp)(struct CPUMIPSState *env);
|
||||||
void (*helper_tlbr) (void);
|
void (*helper_tlbr)(struct CPUMIPSState *env);
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
r4k_tlb_t tlb[MIPS_TLB_MAX];
|
r4k_tlb_t tlb[MIPS_TLB_MAX];
|
||||||
|
@ -485,10 +485,10 @@ int fixed_mmu_map_address (CPUMIPSState *env, target_phys_addr_t *physical, int
|
||||||
target_ulong address, int rw, int access_type);
|
target_ulong address, int rw, int access_type);
|
||||||
int r4k_map_address (CPUMIPSState *env, target_phys_addr_t *physical, int *prot,
|
int r4k_map_address (CPUMIPSState *env, target_phys_addr_t *physical, int *prot,
|
||||||
target_ulong address, int rw, int access_type);
|
target_ulong address, int rw, int access_type);
|
||||||
void r4k_helper_tlbwi (void);
|
void r4k_helper_tlbwi(CPUMIPSState *env);
|
||||||
void r4k_helper_tlbwr (void);
|
void r4k_helper_tlbwr(CPUMIPSState *env);
|
||||||
void r4k_helper_tlbp (void);
|
void r4k_helper_tlbp(CPUMIPSState *env);
|
||||||
void r4k_helper_tlbr (void);
|
void r4k_helper_tlbr(CPUMIPSState *env);
|
||||||
|
|
||||||
void cpu_unassigned_access(CPUMIPSState *env, target_phys_addr_t addr,
|
void cpu_unassigned_access(CPUMIPSState *env, target_phys_addr_t addr,
|
||||||
int is_write, int is_exec, int unused, int size);
|
int is_write, int is_exec, int unused, int size);
|
||||||
|
|
|
@ -1,25 +1,25 @@
|
||||||
#include "def-helper.h"
|
#include "def-helper.h"
|
||||||
|
|
||||||
DEF_HELPER_2(raise_exception_err, noreturn, i32, int)
|
DEF_HELPER_3(raise_exception_err, noreturn, env, i32, int)
|
||||||
DEF_HELPER_1(raise_exception, noreturn, i32)
|
DEF_HELPER_2(raise_exception, noreturn, env, i32)
|
||||||
|
|
||||||
#ifdef TARGET_MIPS64
|
#ifdef TARGET_MIPS64
|
||||||
DEF_HELPER_3(ldl, tl, tl, tl, int)
|
DEF_HELPER_4(ldl, tl, env, tl, tl, int)
|
||||||
DEF_HELPER_3(ldr, tl, tl, tl, int)
|
DEF_HELPER_4(ldr, tl, env, tl, tl, int)
|
||||||
DEF_HELPER_3(sdl, void, tl, tl, int)
|
DEF_HELPER_4(sdl, void, env, tl, tl, int)
|
||||||
DEF_HELPER_3(sdr, void, tl, tl, int)
|
DEF_HELPER_4(sdr, void, env, tl, tl, int)
|
||||||
#endif
|
#endif
|
||||||
DEF_HELPER_3(lwl, tl, tl, tl, int)
|
DEF_HELPER_4(lwl, tl, env, tl, tl, int)
|
||||||
DEF_HELPER_3(lwr, tl, tl, tl, int)
|
DEF_HELPER_4(lwr, tl, env, tl, tl, int)
|
||||||
DEF_HELPER_3(swl, void, tl, tl, int)
|
DEF_HELPER_4(swl, void, env, tl, tl, int)
|
||||||
DEF_HELPER_3(swr, void, tl, tl, int)
|
DEF_HELPER_4(swr, void, env, tl, tl, int)
|
||||||
|
|
||||||
#ifndef CONFIG_USER_ONLY
|
#ifndef CONFIG_USER_ONLY
|
||||||
DEF_HELPER_2(ll, tl, tl, int)
|
DEF_HELPER_3(ll, tl, env, tl, int)
|
||||||
DEF_HELPER_3(sc, tl, tl, tl, int)
|
DEF_HELPER_4(sc, tl, env, tl, tl, int)
|
||||||
#ifdef TARGET_MIPS64
|
#ifdef TARGET_MIPS64
|
||||||
DEF_HELPER_2(lld, tl, tl, int)
|
DEF_HELPER_3(lld, tl, env, tl, int)
|
||||||
DEF_HELPER_3(scd, tl, tl, tl, int)
|
DEF_HELPER_4(scd, tl, env, tl, tl, int)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -28,186 +28,186 @@ DEF_HELPER_FLAGS_1(clz, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl)
|
||||||
#ifdef TARGET_MIPS64
|
#ifdef TARGET_MIPS64
|
||||||
DEF_HELPER_FLAGS_1(dclo, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl)
|
DEF_HELPER_FLAGS_1(dclo, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl)
|
||||||
DEF_HELPER_FLAGS_1(dclz, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl)
|
DEF_HELPER_FLAGS_1(dclz, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl)
|
||||||
DEF_HELPER_2(dmult, void, tl, tl)
|
DEF_HELPER_3(dmult, void, env, tl, tl)
|
||||||
DEF_HELPER_2(dmultu, void, tl, tl)
|
DEF_HELPER_3(dmultu, void, env, tl, tl)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DEF_HELPER_2(muls, tl, tl, tl)
|
DEF_HELPER_3(muls, tl, env, tl, tl)
|
||||||
DEF_HELPER_2(mulsu, tl, tl, tl)
|
DEF_HELPER_3(mulsu, tl, env, tl, tl)
|
||||||
DEF_HELPER_2(macc, tl, tl, tl)
|
DEF_HELPER_3(macc, tl, env, tl, tl)
|
||||||
DEF_HELPER_2(maccu, tl, tl, tl)
|
DEF_HELPER_3(maccu, tl, env, tl, tl)
|
||||||
DEF_HELPER_2(msac, tl, tl, tl)
|
DEF_HELPER_3(msac, tl, env, tl, tl)
|
||||||
DEF_HELPER_2(msacu, tl, tl, tl)
|
DEF_HELPER_3(msacu, tl, env, tl, tl)
|
||||||
DEF_HELPER_2(mulhi, tl, tl, tl)
|
DEF_HELPER_3(mulhi, tl, env, tl, tl)
|
||||||
DEF_HELPER_2(mulhiu, tl, tl, tl)
|
DEF_HELPER_3(mulhiu, tl, env, tl, tl)
|
||||||
DEF_HELPER_2(mulshi, tl, tl, tl)
|
DEF_HELPER_3(mulshi, tl, env, tl, tl)
|
||||||
DEF_HELPER_2(mulshiu, tl, tl, tl)
|
DEF_HELPER_3(mulshiu, tl, env, tl, tl)
|
||||||
DEF_HELPER_2(macchi, tl, tl, tl)
|
DEF_HELPER_3(macchi, tl, env, tl, tl)
|
||||||
DEF_HELPER_2(macchiu, tl, tl, tl)
|
DEF_HELPER_3(macchiu, tl, env, tl, tl)
|
||||||
DEF_HELPER_2(msachi, tl, tl, tl)
|
DEF_HELPER_3(msachi, tl, env, tl, tl)
|
||||||
DEF_HELPER_2(msachiu, tl, tl, tl)
|
DEF_HELPER_3(msachiu, tl, env, tl, tl)
|
||||||
|
|
||||||
#ifndef CONFIG_USER_ONLY
|
#ifndef CONFIG_USER_ONLY
|
||||||
/* CP0 helpers */
|
/* CP0 helpers */
|
||||||
DEF_HELPER_0(mfc0_mvpcontrol, tl)
|
DEF_HELPER_1(mfc0_mvpcontrol, tl, env)
|
||||||
DEF_HELPER_0(mfc0_mvpconf0, tl)
|
DEF_HELPER_1(mfc0_mvpconf0, tl, env)
|
||||||
DEF_HELPER_0(mfc0_mvpconf1, tl)
|
DEF_HELPER_1(mfc0_mvpconf1, tl, env)
|
||||||
DEF_HELPER_0(mftc0_vpecontrol, tl)
|
DEF_HELPER_1(mftc0_vpecontrol, tl, env)
|
||||||
DEF_HELPER_0(mftc0_vpeconf0, tl)
|
DEF_HELPER_1(mftc0_vpeconf0, tl, env)
|
||||||
DEF_HELPER_0(mfc0_random, tl)
|
DEF_HELPER_1(mfc0_random, tl, env)
|
||||||
DEF_HELPER_0(mfc0_tcstatus, tl)
|
DEF_HELPER_1(mfc0_tcstatus, tl, env)
|
||||||
DEF_HELPER_0(mftc0_tcstatus, tl)
|
DEF_HELPER_1(mftc0_tcstatus, tl, env)
|
||||||
DEF_HELPER_0(mfc0_tcbind, tl)
|
DEF_HELPER_1(mfc0_tcbind, tl, env)
|
||||||
DEF_HELPER_0(mftc0_tcbind, tl)
|
DEF_HELPER_1(mftc0_tcbind, tl, env)
|
||||||
DEF_HELPER_0(mfc0_tcrestart, tl)
|
DEF_HELPER_1(mfc0_tcrestart, tl, env)
|
||||||
DEF_HELPER_0(mftc0_tcrestart, tl)
|
DEF_HELPER_1(mftc0_tcrestart, tl, env)
|
||||||
DEF_HELPER_0(mfc0_tchalt, tl)
|
DEF_HELPER_1(mfc0_tchalt, tl, env)
|
||||||
DEF_HELPER_0(mftc0_tchalt, tl)
|
DEF_HELPER_1(mftc0_tchalt, tl, env)
|
||||||
DEF_HELPER_0(mfc0_tccontext, tl)
|
DEF_HELPER_1(mfc0_tccontext, tl, env)
|
||||||
DEF_HELPER_0(mftc0_tccontext, tl)
|
DEF_HELPER_1(mftc0_tccontext, tl, env)
|
||||||
DEF_HELPER_0(mfc0_tcschedule, tl)
|
DEF_HELPER_1(mfc0_tcschedule, tl, env)
|
||||||
DEF_HELPER_0(mftc0_tcschedule, tl)
|
DEF_HELPER_1(mftc0_tcschedule, tl, env)
|
||||||
DEF_HELPER_0(mfc0_tcschefback, tl)
|
DEF_HELPER_1(mfc0_tcschefback, tl, env)
|
||||||
DEF_HELPER_0(mftc0_tcschefback, tl)
|
DEF_HELPER_1(mftc0_tcschefback, tl, env)
|
||||||
DEF_HELPER_0(mfc0_count, tl)
|
DEF_HELPER_1(mfc0_count, tl, env)
|
||||||
DEF_HELPER_0(mftc0_entryhi, tl)
|
DEF_HELPER_1(mftc0_entryhi, tl, env)
|
||||||
DEF_HELPER_0(mftc0_status, tl)
|
DEF_HELPER_1(mftc0_status, tl, env)
|
||||||
DEF_HELPER_0(mftc0_cause, tl)
|
DEF_HELPER_1(mftc0_cause, tl, env)
|
||||||
DEF_HELPER_0(mftc0_epc, tl)
|
DEF_HELPER_1(mftc0_epc, tl, env)
|
||||||
DEF_HELPER_0(mftc0_ebase, tl)
|
DEF_HELPER_1(mftc0_ebase, tl, env)
|
||||||
DEF_HELPER_1(mftc0_configx, tl, tl)
|
DEF_HELPER_2(mftc0_configx, tl, env, tl)
|
||||||
DEF_HELPER_0(mfc0_lladdr, tl)
|
DEF_HELPER_1(mfc0_lladdr, tl, env)
|
||||||
DEF_HELPER_1(mfc0_watchlo, tl, i32)
|
DEF_HELPER_2(mfc0_watchlo, tl, env, i32)
|
||||||
DEF_HELPER_1(mfc0_watchhi, tl, i32)
|
DEF_HELPER_2(mfc0_watchhi, tl, env, i32)
|
||||||
DEF_HELPER_0(mfc0_debug, tl)
|
DEF_HELPER_1(mfc0_debug, tl, env)
|
||||||
DEF_HELPER_0(mftc0_debug, tl)
|
DEF_HELPER_1(mftc0_debug, tl, env)
|
||||||
#ifdef TARGET_MIPS64
|
#ifdef TARGET_MIPS64
|
||||||
DEF_HELPER_0(dmfc0_tcrestart, tl)
|
DEF_HELPER_1(dmfc0_tcrestart, tl, env)
|
||||||
DEF_HELPER_0(dmfc0_tchalt, tl)
|
DEF_HELPER_1(dmfc0_tchalt, tl, env)
|
||||||
DEF_HELPER_0(dmfc0_tccontext, tl)
|
DEF_HELPER_1(dmfc0_tccontext, tl, env)
|
||||||
DEF_HELPER_0(dmfc0_tcschedule, tl)
|
DEF_HELPER_1(dmfc0_tcschedule, tl, env)
|
||||||
DEF_HELPER_0(dmfc0_tcschefback, tl)
|
DEF_HELPER_1(dmfc0_tcschefback, tl, env)
|
||||||
DEF_HELPER_0(dmfc0_lladdr, tl)
|
DEF_HELPER_1(dmfc0_lladdr, tl, env)
|
||||||
DEF_HELPER_1(dmfc0_watchlo, tl, i32)
|
DEF_HELPER_2(dmfc0_watchlo, tl, env, i32)
|
||||||
#endif /* TARGET_MIPS64 */
|
#endif /* TARGET_MIPS64 */
|
||||||
|
|
||||||
DEF_HELPER_1(mtc0_index, void, tl)
|
DEF_HELPER_2(mtc0_index, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_mvpcontrol, void, tl)
|
DEF_HELPER_2(mtc0_mvpcontrol, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_vpecontrol, void, tl)
|
DEF_HELPER_2(mtc0_vpecontrol, void, env, tl)
|
||||||
DEF_HELPER_1(mttc0_vpecontrol, void, tl)
|
DEF_HELPER_2(mttc0_vpecontrol, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_vpeconf0, void, tl)
|
DEF_HELPER_2(mtc0_vpeconf0, void, env, tl)
|
||||||
DEF_HELPER_1(mttc0_vpeconf0, void, tl)
|
DEF_HELPER_2(mttc0_vpeconf0, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_vpeconf1, void, tl)
|
DEF_HELPER_2(mtc0_vpeconf1, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_yqmask, void, tl)
|
DEF_HELPER_2(mtc0_yqmask, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_vpeopt, void, tl)
|
DEF_HELPER_2(mtc0_vpeopt, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_entrylo0, void, tl)
|
DEF_HELPER_2(mtc0_entrylo0, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_tcstatus, void, tl)
|
DEF_HELPER_2(mtc0_tcstatus, void, env, tl)
|
||||||
DEF_HELPER_1(mttc0_tcstatus, void, tl)
|
DEF_HELPER_2(mttc0_tcstatus, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_tcbind, void, tl)
|
DEF_HELPER_2(mtc0_tcbind, void, env, tl)
|
||||||
DEF_HELPER_1(mttc0_tcbind, void, tl)
|
DEF_HELPER_2(mttc0_tcbind, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_tcrestart, void, tl)
|
DEF_HELPER_2(mtc0_tcrestart, void, env, tl)
|
||||||
DEF_HELPER_1(mttc0_tcrestart, void, tl)
|
DEF_HELPER_2(mttc0_tcrestart, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_tchalt, void, tl)
|
DEF_HELPER_2(mtc0_tchalt, void, env, tl)
|
||||||
DEF_HELPER_1(mttc0_tchalt, void, tl)
|
DEF_HELPER_2(mttc0_tchalt, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_tccontext, void, tl)
|
DEF_HELPER_2(mtc0_tccontext, void, env, tl)
|
||||||
DEF_HELPER_1(mttc0_tccontext, void, tl)
|
DEF_HELPER_2(mttc0_tccontext, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_tcschedule, void, tl)
|
DEF_HELPER_2(mtc0_tcschedule, void, env, tl)
|
||||||
DEF_HELPER_1(mttc0_tcschedule, void, tl)
|
DEF_HELPER_2(mttc0_tcschedule, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_tcschefback, void, tl)
|
DEF_HELPER_2(mtc0_tcschefback, void, env, tl)
|
||||||
DEF_HELPER_1(mttc0_tcschefback, void, tl)
|
DEF_HELPER_2(mttc0_tcschefback, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_entrylo1, void, tl)
|
DEF_HELPER_2(mtc0_entrylo1, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_context, void, tl)
|
DEF_HELPER_2(mtc0_context, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_pagemask, void, tl)
|
DEF_HELPER_2(mtc0_pagemask, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_pagegrain, void, tl)
|
DEF_HELPER_2(mtc0_pagegrain, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_wired, void, tl)
|
DEF_HELPER_2(mtc0_wired, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_srsconf0, void, tl)
|
DEF_HELPER_2(mtc0_srsconf0, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_srsconf1, void, tl)
|
DEF_HELPER_2(mtc0_srsconf1, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_srsconf2, void, tl)
|
DEF_HELPER_2(mtc0_srsconf2, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_srsconf3, void, tl)
|
DEF_HELPER_2(mtc0_srsconf3, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_srsconf4, void, tl)
|
DEF_HELPER_2(mtc0_srsconf4, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_hwrena, void, tl)
|
DEF_HELPER_2(mtc0_hwrena, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_count, void, tl)
|
DEF_HELPER_2(mtc0_count, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_entryhi, void, tl)
|
DEF_HELPER_2(mtc0_entryhi, void, env, tl)
|
||||||
DEF_HELPER_1(mttc0_entryhi, void, tl)
|
DEF_HELPER_2(mttc0_entryhi, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_compare, void, tl)
|
DEF_HELPER_2(mtc0_compare, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_status, void, tl)
|
DEF_HELPER_2(mtc0_status, void, env, tl)
|
||||||
DEF_HELPER_1(mttc0_status, void, tl)
|
DEF_HELPER_2(mttc0_status, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_intctl, void, tl)
|
DEF_HELPER_2(mtc0_intctl, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_srsctl, void, tl)
|
DEF_HELPER_2(mtc0_srsctl, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_cause, void, tl)
|
DEF_HELPER_2(mtc0_cause, void, env, tl)
|
||||||
DEF_HELPER_1(mttc0_cause, void, tl)
|
DEF_HELPER_2(mttc0_cause, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_ebase, void, tl)
|
DEF_HELPER_2(mtc0_ebase, void, env, tl)
|
||||||
DEF_HELPER_1(mttc0_ebase, void, tl)
|
DEF_HELPER_2(mttc0_ebase, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_config0, void, tl)
|
DEF_HELPER_2(mtc0_config0, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_config2, void, tl)
|
DEF_HELPER_2(mtc0_config2, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_lladdr, void, tl)
|
DEF_HELPER_2(mtc0_lladdr, void, env, tl)
|
||||||
DEF_HELPER_2(mtc0_watchlo, void, tl, i32)
|
DEF_HELPER_3(mtc0_watchlo, void, env, tl, i32)
|
||||||
DEF_HELPER_2(mtc0_watchhi, void, tl, i32)
|
DEF_HELPER_3(mtc0_watchhi, void, env, tl, i32)
|
||||||
DEF_HELPER_1(mtc0_xcontext, void, tl)
|
DEF_HELPER_2(mtc0_xcontext, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_framemask, void, tl)
|
DEF_HELPER_2(mtc0_framemask, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_debug, void, tl)
|
DEF_HELPER_2(mtc0_debug, void, env, tl)
|
||||||
DEF_HELPER_1(mttc0_debug, void, tl)
|
DEF_HELPER_2(mttc0_debug, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_performance0, void, tl)
|
DEF_HELPER_2(mtc0_performance0, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_taglo, void, tl)
|
DEF_HELPER_2(mtc0_taglo, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_datalo, void, tl)
|
DEF_HELPER_2(mtc0_datalo, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_taghi, void, tl)
|
DEF_HELPER_2(mtc0_taghi, void, env, tl)
|
||||||
DEF_HELPER_1(mtc0_datahi, void, tl)
|
DEF_HELPER_2(mtc0_datahi, void, env, tl)
|
||||||
|
|
||||||
/* MIPS MT functions */
|
/* MIPS MT functions */
|
||||||
DEF_HELPER_1(mftgpr, tl, i32);
|
DEF_HELPER_2(mftgpr, tl, env, i32);
|
||||||
DEF_HELPER_1(mftlo, tl, i32)
|
DEF_HELPER_2(mftlo, tl, env, i32)
|
||||||
DEF_HELPER_1(mfthi, tl, i32)
|
DEF_HELPER_2(mfthi, tl, env, i32)
|
||||||
DEF_HELPER_1(mftacx, tl, i32)
|
DEF_HELPER_2(mftacx, tl, env, i32)
|
||||||
DEF_HELPER_0(mftdsp, tl)
|
DEF_HELPER_1(mftdsp, tl, env)
|
||||||
DEF_HELPER_2(mttgpr, void, tl, i32)
|
DEF_HELPER_3(mttgpr, void, env, tl, i32)
|
||||||
DEF_HELPER_2(mttlo, void, tl, i32)
|
DEF_HELPER_3(mttlo, void, env, tl, i32)
|
||||||
DEF_HELPER_2(mtthi, void, tl, i32)
|
DEF_HELPER_3(mtthi, void, env, tl, i32)
|
||||||
DEF_HELPER_2(mttacx, void, tl, i32)
|
DEF_HELPER_3(mttacx, void, env, tl, i32)
|
||||||
DEF_HELPER_1(mttdsp, void, tl)
|
DEF_HELPER_2(mttdsp, void, env, tl)
|
||||||
DEF_HELPER_0(dmt, tl)
|
DEF_HELPER_0(dmt, tl)
|
||||||
DEF_HELPER_0(emt, tl)
|
DEF_HELPER_0(emt, tl)
|
||||||
DEF_HELPER_0(dvpe, tl)
|
DEF_HELPER_1(dvpe, tl, env)
|
||||||
DEF_HELPER_0(evpe, tl)
|
DEF_HELPER_1(evpe, tl, env)
|
||||||
#endif /* !CONFIG_USER_ONLY */
|
#endif /* !CONFIG_USER_ONLY */
|
||||||
|
|
||||||
/* microMIPS functions */
|
/* microMIPS functions */
|
||||||
DEF_HELPER_3(lwm, void, tl, tl, i32);
|
DEF_HELPER_4(lwm, void, env, tl, tl, i32);
|
||||||
DEF_HELPER_3(swm, void, tl, tl, i32);
|
DEF_HELPER_4(swm, void, env, tl, tl, i32);
|
||||||
#ifdef TARGET_MIPS64
|
#ifdef TARGET_MIPS64
|
||||||
DEF_HELPER_3(ldm, void, tl, tl, i32);
|
DEF_HELPER_4(ldm, void, env, tl, tl, i32);
|
||||||
DEF_HELPER_3(sdm, void, tl, tl, i32);
|
DEF_HELPER_4(sdm, void, env, tl, tl, i32);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DEF_HELPER_2(fork, void, tl, tl)
|
DEF_HELPER_2(fork, void, tl, tl)
|
||||||
DEF_HELPER_1(yield, tl, tl)
|
DEF_HELPER_2(yield, tl, env, tl)
|
||||||
|
|
||||||
/* CP1 functions */
|
/* CP1 functions */
|
||||||
DEF_HELPER_1(cfc1, tl, i32)
|
DEF_HELPER_2(cfc1, tl, env, i32)
|
||||||
DEF_HELPER_2(ctc1, void, tl, i32)
|
DEF_HELPER_3(ctc1, void, env, tl, i32)
|
||||||
|
|
||||||
DEF_HELPER_1(float_cvtd_s, i64, i32)
|
DEF_HELPER_2(float_cvtd_s, i64, env, i32)
|
||||||
DEF_HELPER_1(float_cvtd_w, i64, i32)
|
DEF_HELPER_2(float_cvtd_w, i64, env, i32)
|
||||||
DEF_HELPER_1(float_cvtd_l, i64, i64)
|
DEF_HELPER_2(float_cvtd_l, i64, env, i64)
|
||||||
DEF_HELPER_1(float_cvtl_d, i64, i64)
|
DEF_HELPER_2(float_cvtl_d, i64, env, i64)
|
||||||
DEF_HELPER_1(float_cvtl_s, i64, i32)
|
DEF_HELPER_2(float_cvtl_s, i64, env, i32)
|
||||||
DEF_HELPER_1(float_cvtps_pw, i64, i64)
|
DEF_HELPER_2(float_cvtps_pw, i64, env, i64)
|
||||||
DEF_HELPER_1(float_cvtpw_ps, i64, i64)
|
DEF_HELPER_2(float_cvtpw_ps, i64, env, i64)
|
||||||
DEF_HELPER_1(float_cvts_d, i32, i64)
|
DEF_HELPER_2(float_cvts_d, i32, env, i64)
|
||||||
DEF_HELPER_1(float_cvts_w, i32, i32)
|
DEF_HELPER_2(float_cvts_w, i32, env, i32)
|
||||||
DEF_HELPER_1(float_cvts_l, i32, i64)
|
DEF_HELPER_2(float_cvts_l, i32, env, i64)
|
||||||
DEF_HELPER_1(float_cvts_pl, i32, i32)
|
DEF_HELPER_2(float_cvts_pl, i32, env, i32)
|
||||||
DEF_HELPER_1(float_cvts_pu, i32, i32)
|
DEF_HELPER_2(float_cvts_pu, i32, env, i32)
|
||||||
DEF_HELPER_1(float_cvtw_s, i32, i32)
|
DEF_HELPER_2(float_cvtw_s, i32, env, i32)
|
||||||
DEF_HELPER_1(float_cvtw_d, i32, i64)
|
DEF_HELPER_2(float_cvtw_d, i32, env, i64)
|
||||||
|
|
||||||
DEF_HELPER_2(float_addr_ps, i64, i64, i64)
|
DEF_HELPER_3(float_addr_ps, i64, env, i64, i64)
|
||||||
DEF_HELPER_2(float_mulr_ps, i64, i64, i64)
|
DEF_HELPER_3(float_mulr_ps, i64, env, i64, i64)
|
||||||
|
|
||||||
#define FOP_PROTO(op) \
|
#define FOP_PROTO(op) \
|
||||||
DEF_HELPER_1(float_ ## op ## l_s, i64, i32) \
|
DEF_HELPER_2(float_ ## op ## l_s, i64, env, i32) \
|
||||||
DEF_HELPER_1(float_ ## op ## l_d, i64, i64) \
|
DEF_HELPER_2(float_ ## op ## l_d, i64, env, i64) \
|
||||||
DEF_HELPER_1(float_ ## op ## w_s, i32, i32) \
|
DEF_HELPER_2(float_ ## op ## w_s, i32, env, i32) \
|
||||||
DEF_HELPER_1(float_ ## op ## w_d, i32, i64)
|
DEF_HELPER_2(float_ ## op ## w_d, i32, env, i64)
|
||||||
FOP_PROTO(round)
|
FOP_PROTO(round)
|
||||||
FOP_PROTO(trunc)
|
FOP_PROTO(trunc)
|
||||||
FOP_PROTO(ceil)
|
FOP_PROTO(ceil)
|
||||||
|
@ -215,8 +215,8 @@ FOP_PROTO(floor)
|
||||||
#undef FOP_PROTO
|
#undef FOP_PROTO
|
||||||
|
|
||||||
#define FOP_PROTO(op) \
|
#define FOP_PROTO(op) \
|
||||||
DEF_HELPER_1(float_ ## op ## _s, i32, i32) \
|
DEF_HELPER_2(float_ ## op ## _s, i32, env, i32) \
|
||||||
DEF_HELPER_1(float_ ## op ## _d, i64, i64)
|
DEF_HELPER_2(float_ ## op ## _d, i64, env, i64)
|
||||||
FOP_PROTO(sqrt)
|
FOP_PROTO(sqrt)
|
||||||
FOP_PROTO(rsqrt)
|
FOP_PROTO(rsqrt)
|
||||||
FOP_PROTO(recip)
|
FOP_PROTO(recip)
|
||||||
|
@ -228,14 +228,20 @@ DEF_HELPER_1(float_ ## op ## _d, i64, i64) \
|
||||||
DEF_HELPER_1(float_ ## op ## _ps, i64, i64)
|
DEF_HELPER_1(float_ ## op ## _ps, i64, i64)
|
||||||
FOP_PROTO(abs)
|
FOP_PROTO(abs)
|
||||||
FOP_PROTO(chs)
|
FOP_PROTO(chs)
|
||||||
|
#undef FOP_PROTO
|
||||||
|
|
||||||
|
#define FOP_PROTO(op) \
|
||||||
|
DEF_HELPER_2(float_ ## op ## _s, i32, env, i32) \
|
||||||
|
DEF_HELPER_2(float_ ## op ## _d, i64, env, i64) \
|
||||||
|
DEF_HELPER_2(float_ ## op ## _ps, i64, env, i64)
|
||||||
FOP_PROTO(recip1)
|
FOP_PROTO(recip1)
|
||||||
FOP_PROTO(rsqrt1)
|
FOP_PROTO(rsqrt1)
|
||||||
#undef FOP_PROTO
|
#undef FOP_PROTO
|
||||||
|
|
||||||
#define FOP_PROTO(op) \
|
#define FOP_PROTO(op) \
|
||||||
DEF_HELPER_2(float_ ## op ## _s, i32, i32, i32) \
|
DEF_HELPER_3(float_ ## op ## _s, i32, env, i32, i32) \
|
||||||
DEF_HELPER_2(float_ ## op ## _d, i64, i64, i64) \
|
DEF_HELPER_3(float_ ## op ## _d, i64, env, i64, i64) \
|
||||||
DEF_HELPER_2(float_ ## op ## _ps, i64, i64, i64)
|
DEF_HELPER_3(float_ ## op ## _ps, i64, env, i64, i64)
|
||||||
FOP_PROTO(add)
|
FOP_PROTO(add)
|
||||||
FOP_PROTO(sub)
|
FOP_PROTO(sub)
|
||||||
FOP_PROTO(mul)
|
FOP_PROTO(mul)
|
||||||
|
@ -245,9 +251,9 @@ FOP_PROTO(rsqrt2)
|
||||||
#undef FOP_PROTO
|
#undef FOP_PROTO
|
||||||
|
|
||||||
#define FOP_PROTO(op) \
|
#define FOP_PROTO(op) \
|
||||||
DEF_HELPER_3(float_ ## op ## _s, i32, i32, i32, i32) \
|
DEF_HELPER_4(float_ ## op ## _s, i32, env, i32, i32, i32) \
|
||||||
DEF_HELPER_3(float_ ## op ## _d, i64, i64, i64, i64) \
|
DEF_HELPER_4(float_ ## op ## _d, i64, env, i64, i64, i64) \
|
||||||
DEF_HELPER_3(float_ ## op ## _ps, i64, i64, i64, i64)
|
DEF_HELPER_4(float_ ## op ## _ps, i64, env, i64, i64, i64)
|
||||||
FOP_PROTO(muladd)
|
FOP_PROTO(muladd)
|
||||||
FOP_PROTO(mulsub)
|
FOP_PROTO(mulsub)
|
||||||
FOP_PROTO(nmuladd)
|
FOP_PROTO(nmuladd)
|
||||||
|
@ -255,12 +261,12 @@ FOP_PROTO(nmulsub)
|
||||||
#undef FOP_PROTO
|
#undef FOP_PROTO
|
||||||
|
|
||||||
#define FOP_PROTO(op) \
|
#define FOP_PROTO(op) \
|
||||||
DEF_HELPER_3(cmp_d_ ## op, void, i64, i64, int) \
|
DEF_HELPER_4(cmp_d_ ## op, void, env, i64, i64, int) \
|
||||||
DEF_HELPER_3(cmpabs_d_ ## op, void, i64, i64, int) \
|
DEF_HELPER_4(cmpabs_d_ ## op, void, env, i64, i64, int) \
|
||||||
DEF_HELPER_3(cmp_s_ ## op, void, i32, i32, int) \
|
DEF_HELPER_4(cmp_s_ ## op, void, env, i32, i32, int) \
|
||||||
DEF_HELPER_3(cmpabs_s_ ## op, void, i32, i32, int) \
|
DEF_HELPER_4(cmpabs_s_ ## op, void, env, i32, i32, int) \
|
||||||
DEF_HELPER_3(cmp_ps_ ## op, void, i64, i64, int) \
|
DEF_HELPER_4(cmp_ps_ ## op, void, env, i64, i64, int) \
|
||||||
DEF_HELPER_3(cmpabs_ps_ ## op, void, i64, i64, int)
|
DEF_HELPER_4(cmpabs_ps_ ## op, void, env, i64, i64, int)
|
||||||
FOP_PROTO(f)
|
FOP_PROTO(f)
|
||||||
FOP_PROTO(un)
|
FOP_PROTO(un)
|
||||||
FOP_PROTO(eq)
|
FOP_PROTO(eq)
|
||||||
|
@ -281,20 +287,20 @@ FOP_PROTO(ngt)
|
||||||
|
|
||||||
/* Special functions */
|
/* Special functions */
|
||||||
#ifndef CONFIG_USER_ONLY
|
#ifndef CONFIG_USER_ONLY
|
||||||
DEF_HELPER_0(tlbwi, void)
|
DEF_HELPER_1(tlbwi, void, env)
|
||||||
DEF_HELPER_0(tlbwr, void)
|
DEF_HELPER_1(tlbwr, void, env)
|
||||||
DEF_HELPER_0(tlbp, void)
|
DEF_HELPER_1(tlbp, void, env)
|
||||||
DEF_HELPER_0(tlbr, void)
|
DEF_HELPER_1(tlbr, void, env)
|
||||||
DEF_HELPER_0(di, tl)
|
DEF_HELPER_1(di, tl, env)
|
||||||
DEF_HELPER_0(ei, tl)
|
DEF_HELPER_1(ei, tl, env)
|
||||||
DEF_HELPER_0(eret, void)
|
DEF_HELPER_1(eret, void, env)
|
||||||
DEF_HELPER_0(deret, void)
|
DEF_HELPER_1(deret, void, env)
|
||||||
#endif /* !CONFIG_USER_ONLY */
|
#endif /* !CONFIG_USER_ONLY */
|
||||||
DEF_HELPER_0(rdhwr_cpunum, tl)
|
DEF_HELPER_1(rdhwr_cpunum, tl, env)
|
||||||
DEF_HELPER_0(rdhwr_synci_step, tl)
|
DEF_HELPER_1(rdhwr_synci_step, tl, env)
|
||||||
DEF_HELPER_0(rdhwr_cc, tl)
|
DEF_HELPER_1(rdhwr_cc, tl, env)
|
||||||
DEF_HELPER_0(rdhwr_ccres, tl)
|
DEF_HELPER_1(rdhwr_ccres, tl, env)
|
||||||
DEF_HELPER_1(pmon, void, int)
|
DEF_HELPER_2(pmon, void, env, int)
|
||||||
DEF_HELPER_0(wait, void)
|
DEF_HELPER_1(wait, void, env)
|
||||||
|
|
||||||
#include "def-helper.h"
|
#include "def-helper.h"
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue