void mips3_x64::fallback(uint32_t opcode, void (mips3::*f)(uint32_t)){ ... mov(rax, (size_t) ((void*&)f)); call(rax);}
#define F_ADR(f) ((size_t)((void*&)&f))
Please try this on MSVC:Code: [Select]void mips3_x64::fallback(uint32_t opcode, void (mips3::*f)(uint32_t)){ ... mov(rax, (size_t) ((void*&)f)); call(rax);}And change F_ADR to:Code: [Select]#define F_ADR(f) ((size_t)((void*&)&f))
Compiling src/cpu/mips3/x64/mips3_x64.cpp...mips3_x64.cppd:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(59) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(59) : error C2661: 'Xbyak::CodeGenerator::mov' : no overloaded function takes 1 argumentsd:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(62) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(69) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(69) : error C2661: 'Xbyak::CodeGenerator::mov' : no overloaded function takes 1 argumentsd:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(72) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(79) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(79) : error C2661: 'Xbyak::CodeGenerator::mov' : no overloaded function takes 1 argumentsd:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(82) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(89) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(89) : error C2661: 'Xbyak::CodeGenerator::mov' : no overloaded function takes 1 argumentsd:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(92) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(113) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(113) : error C2661: 'Xbyak::CodeGenerator::mov' : no overloaded function takes 1 argumentsd:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(130) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(153) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(153) : error C2661: 'Xbyak::CodeGenerator::mov' : no overloaded function takes 1 argumentsd:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(170) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(194) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(194) : error C2661: 'Xbyak::CodeGenerator::mov' : no overloaded function takes 1 argumentsd:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(211) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(247) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(247) : error C2661: 'Xbyak::CodeGenerator::mov' : no overloaded function takes 1 argumentsd:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(264) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(285) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(285) : error C2661: 'Xbyak::CodeGenerator::mov' : no overloaded function takes 1 argumentsd:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(287) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(298) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(298) : error C2661: 'Xbyak::CodeGenerator::mov' : no overloaded function takes 1 argumentsd:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(300) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(310) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(310) : error C2661: 'Xbyak::CodeGenerator::mov' : no overloaded function takes 1 argumentsd:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(312) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(339) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(339) : error C2661: 'Xbyak::CodeGenerator::mov' : no overloaded function takes 1 argumentsd:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(341) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(353) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(353) : error C2661: 'Xbyak::CodeGenerator::mov' : no overloaded function takes 1 argumentsd:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(355) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(366) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(366) : error C2661: 'Xbyak::CodeGenerator::mov' : no overloaded function takes 1 argumentsd:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(368) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(380) : error C2102: '&' requires l-valued:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(380) : error C2661: 'Xbyak::CodeGenerator::mov' : no overloaded function takes 1 argumentsd:\fbasrc\src\cpu\mips3\x64\mips3_x64_rw.h(382) : error C2102: '&' requires l-valuemingw32-make[1]: *** [mips3_x64.o] Error 2mingw32-make: *** [vc] Error 2
template<class C, class R, typename...Args>inline size_t get_method_addr(R (C::*f)(Args...)) { return reinterpret_cast<size_t>((void* &)f);}#define F_ADR(x) get_method_addr(&x)
Okay, try this:Code: [Select]template<class C, class R, typename...Args>inline size_t get_method_addr(R (C::*f)(Args...)) { return reinterpret_cast<size_t>((void* &)f);}#define F_ADR(x) get_method_addr(&x)----EDIT:I compiled drc with msvc, but MinGW binary is a lot faster than MSVC one I need to do some profiling.
Without doubt the TMS34010 core implementation will be a great addition to FBA! I hope it will be used to emulate all related Midway/Williams hardwares (as well as "Wolf unit" also "T unit", "Y unit" and "Z unit")...