mirror of https://github.com/PCSX2/pcsx2.git
Get the Linux side of things ready for when cotton's done with microVU. I'm sure I'll have to make significant changes at that point, but it's good to have the framework in place...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@645 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
2fd0e1d538
commit
abbaa90a7d
10
build.sh
10
build.sh
|
@ -11,13 +11,15 @@
|
||||||
#Optimized, but a devbuild
|
#Optimized, but a devbuild
|
||||||
export PCSX2OPTIONS="--enable-sse3 --enable-sse4 --enable-devbuild --prefix `pwd`"
|
export PCSX2OPTIONS="--enable-sse3 --enable-sse4 --enable-devbuild --prefix `pwd`"
|
||||||
|
|
||||||
|
|
||||||
#Optimized, but a devbuild - with memcpy_fast_ enabled.
|
|
||||||
#export PCSX2OPTIONS="--enable-sse3 --enable-sse4 --enable-devbuild --enable-memcpyfast --prefix `pwd`"
|
|
||||||
|
|
||||||
#Debug / Devbuild version
|
#Debug / Devbuild version
|
||||||
#export PCSX2OPTIONS="--enable-debug --enable-devbuild --enable-sse3 --prefix `pwd`"
|
#export PCSX2OPTIONS="--enable-debug --enable-devbuild --enable-sse3 --prefix `pwd`"
|
||||||
|
|
||||||
|
#Optimized, but a devbuild - with memcpy_fast_ enabled. - BROKEN!
|
||||||
|
#export PCSX2OPTIONS="--enable-sse3 --enable-sse4 --enable-devbuild --enable-memcpyfast --prefix `pwd`"
|
||||||
|
|
||||||
|
#Optimized, but a devbuild - with microVU enabled. - NOT FULLY IMPLEMENTED!!
|
||||||
|
#export PCSX2OPTIONS="--enable-sse3 --enable-sse4 --enable-devbuild --enable-microVU --prefix `pwd`"
|
||||||
|
|
||||||
#ZeroGS Normal mode
|
#ZeroGS Normal mode
|
||||||
export ZEROGSOPTIONS="--enable-sse2"
|
export ZEROGSOPTIONS="--enable-sse2"
|
||||||
|
|
||||||
|
|
|
@ -72,6 +72,15 @@ then
|
||||||
fi
|
fi
|
||||||
AC_MSG_RESULT($memcpyfast)
|
AC_MSG_RESULT($memcpyfast)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(turn on microVU)
|
||||||
|
AC_ARG_ENABLE(microVU, AC_HELP_STRING([--enable-microVU], [Turns on the currently incomplete microVU files - Not a good idea]),
|
||||||
|
microVU=$enableval,microVU=no)
|
||||||
|
if test "x$microVU" == xyes
|
||||||
|
then
|
||||||
|
AC_DEFINE(PCSX2_MICROVU,1,[PCSX2_MICROVU])
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT($microVU)
|
||||||
|
|
||||||
dnl Check for dev build
|
dnl Check for dev build
|
||||||
AC_MSG_CHECKING(for development build)
|
AC_MSG_CHECKING(for development build)
|
||||||
AC_ARG_ENABLE(devbuild, AC_HELP_STRING([--enable-devbuild], [Special Build for developers that simplifies testing and adds extra checks]),
|
AC_ARG_ENABLE(devbuild, AC_HELP_STRING([--enable-devbuild], [Special Build for developers that simplifies testing and adds extra checks]),
|
||||||
|
@ -148,3 +157,4 @@ echo " nls support? $nls"
|
||||||
echo " local plugin inis? $localinis"
|
echo " local plugin inis? $localinis"
|
||||||
echo " custom cflags? $customcflags"
|
echo " custom cflags? $customcflags"
|
||||||
echo " memcpy_fast? $memcpyfast"
|
echo " memcpy_fast? $memcpyfast"
|
||||||
|
echo " microVU? $microVU"
|
||||||
|
|
|
@ -18,6 +18,12 @@ libx86recomp_a_SOURCES += \
|
||||||
BaseblockEx.h iCOP0.h iCore.h iFPU.h iMMI.h iR3000A.h iR5900.h iR5900Arit.h iR5900AritImm.h iR5900Branch.h iR5900Jump.h \
|
BaseblockEx.h iCOP0.h iCore.h iFPU.h iMMI.h iR3000A.h iR5900.h iR5900Arit.h iR5900AritImm.h iR5900Branch.h iR5900Jump.h \
|
||||||
iR5900LoadStore.h iR5900Move.h iR5900MultDiv.h iR5900Shift.h iVUmicro.h iVUops.h iVUzerorec.h
|
iR5900LoadStore.h iR5900Move.h iR5900MultDiv.h iR5900Shift.h iVUmicro.h iVUops.h iVUzerorec.h
|
||||||
|
|
||||||
|
#ifdef PCSX2_MICROVU
|
||||||
|
libx86recomp_a_SOURCES += \
|
||||||
|
microVU.cpp microVU_Alloc.cpp microVU_Compile.cpp microVU_Lower.cpp microVU_Misc.cpp microVU_Upper.cpp aMicroVU.S \
|
||||||
|
microVU.h microVU_Alloc.h microVU_Misc.h microVU_Tables.h
|
||||||
|
#endif
|
||||||
|
|
||||||
libx86recomp_a_DEPENDENCIES = ix86/libix86.a
|
libx86recomp_a_DEPENDENCIES = ix86/libix86.a
|
||||||
|
|
||||||
SUBDIRS = ix86
|
SUBDIRS = ix86
|
|
@ -0,0 +1,62 @@
|
||||||
|
// microVU.cpp assembly routines
|
||||||
|
// arcum42(@gmail.com)
|
||||||
|
.intel_syntax
|
||||||
|
|
||||||
|
.extern mVUexecuteVU0
|
||||||
|
.extern mVUexecuteVU1
|
||||||
|
.extern g_sseVUMXCSR
|
||||||
|
.extern g_sseMXCSR
|
||||||
|
|
||||||
|
//------------------------------------------------------------------
|
||||||
|
// Dispatcher Functions
|
||||||
|
//------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Runs VU0 for number of cycles
|
||||||
|
// __fastcall = The first two DWORD or smaller arguments are passed in ECX and EDX registers; all other arguments are passed right to left.
|
||||||
|
//void __fastcall startVU0(u32 startPC, u32 cycles)
|
||||||
|
.globl startVU0
|
||||||
|
startVU0:
|
||||||
|
call mVUexecuteVU0
|
||||||
|
|
||||||
|
// backup cpu state
|
||||||
|
push %ebx
|
||||||
|
push %ebp
|
||||||
|
push %esi
|
||||||
|
push %edi
|
||||||
|
|
||||||
|
ldmxcsr g_sseVUMXCSR
|
||||||
|
// Should set xmmZ?
|
||||||
|
jmp %eax
|
||||||
|
|
||||||
|
// Runs VU1 for number of cycles
|
||||||
|
// void __fastcall startVU1(u32 startPC, u32 cycles)
|
||||||
|
.globl startVU1
|
||||||
|
startVU01:
|
||||||
|
call mVUexecuteVU1
|
||||||
|
|
||||||
|
// backup cpu state
|
||||||
|
push %ebx
|
||||||
|
push %ebp
|
||||||
|
push %esi
|
||||||
|
push %edi
|
||||||
|
|
||||||
|
ldmxcsr g_sseVUMXCSR
|
||||||
|
|
||||||
|
jmp %eax
|
||||||
|
|
||||||
|
// Exit point
|
||||||
|
// void __fastcall endVU0(u32 startPC, u32 cycles)
|
||||||
|
.globl endVU0
|
||||||
|
endVU0:
|
||||||
|
//call mVUcleanUpVU0
|
||||||
|
|
||||||
|
/*restore cpu state*/
|
||||||
|
pop %edi;
|
||||||
|
pop %esi;
|
||||||
|
pop %ebp;
|
||||||
|
pop %ebx;
|
||||||
|
|
||||||
|
ldmxcsr g_sseMXCSR
|
||||||
|
|
||||||
|
ret
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// iR3000A.c assembly routines
|
// iVUzerorec.cpp assembly routines
|
||||||
// zerofrog(@gmail.com)
|
// zerofrog(@gmail.com)
|
||||||
.intel_syntax
|
.intel_syntax
|
||||||
|
|
||||||
|
|
|
@ -208,6 +208,7 @@ __forceinline void mVUinvalidateBlock(microVU* mVU, u32 addr, u32 size) {
|
||||||
// Dispatcher Functions
|
// Dispatcher Functions
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
// Runs VU0 for number of cycles
|
// Runs VU0 for number of cycles
|
||||||
__declspec(naked) void __fastcall startVU0(u32 startPC, u32 cycles) {
|
__declspec(naked) void __fastcall startVU0(u32 startPC, u32 cycles) {
|
||||||
__asm {
|
__asm {
|
||||||
|
@ -261,6 +262,14 @@ __declspec(naked) void __fastcall endVU0(u32 startPC, u32 cycles) {
|
||||||
ret
|
ret
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
extern void __fastcall startVU0(u32 startPC, u32 cycles);
|
||||||
|
extern void __fastcall startVU1(u32 startPC, u32 cycles);
|
||||||
|
extern void __fastcall endVU0(u32 startPC, u32 cycles);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// Wrapper Functions - Called by other parts of the Emu
|
// Wrapper Functions - Called by other parts of the Emu
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
|
|
|
@ -131,3 +131,8 @@ __forceinline void mVUclearProg(microVU* mVU, int progIndex);
|
||||||
__forceinline int mVUfindLeastUsedProg(microVU* mVU);
|
__forceinline int mVUfindLeastUsedProg(microVU* mVU);
|
||||||
__forceinline int mVUsearchProg(microVU* mVU);
|
__forceinline int mVUsearchProg(microVU* mVU);
|
||||||
__forceinline void mVUcacheProg(microVU* mVU, int progIndex);
|
__forceinline void mVUcacheProg(microVU* mVU, int progIndex);
|
||||||
|
|
||||||
|
#ifdef __LINUX__
|
||||||
|
microVUt(void) mVUreset();
|
||||||
|
microVUt(void) mVUclose();
|
||||||
|
#endif
|
|
@ -44,9 +44,9 @@ microVUt(void) mVUallocFMAC1a(u32 code, int& Fd, int& Fs, int& Ft, const int mak
|
||||||
microVU* mVU = mVUx;
|
microVU* mVU = mVUx;
|
||||||
if (_Fs_ == 0) { Fs = xmmZ; } else { Fs = xmmFs; }
|
if (_Fs_ == 0) { Fs = xmmZ; } else { Fs = xmmFs; }
|
||||||
if (_Ft_ == 0) { Ft = xmmZ; } else { Ft = xmmFt; }
|
if (_Ft_ == 0) { Ft = xmmZ; } else { Ft = xmmFt; }
|
||||||
if (makeFdFd) {Fd = xmmFd}
|
if (makeFdFd) {Fd = xmmFd;}
|
||||||
else if (makeFdFs) {Fd = Fs}
|
else if (makeFdFs) {Fd = Fs;}
|
||||||
else if (makeFdFt) {Fd = Ft}
|
else if (makeFdFt) {Fd = Ft;}
|
||||||
|
|
||||||
if (_Fs_) SSE_MOVAPS_M128_to_XMM(Fs, (uptr)&mVU->regs->VF[_Fs_].UL[0]);
|
if (_Fs_) SSE_MOVAPS_M128_to_XMM(Fs, (uptr)&mVU->regs->VF[_Fs_].UL[0]);
|
||||||
if (_Ft_ == _Ft_) SSE_MOVAPS_M128_to_XMM(Ft, (uptr)&mVU->regs->VF[_Ft_].UL[0]);
|
if (_Ft_ == _Ft_) SSE_MOVAPS_M128_to_XMM(Ft, (uptr)&mVU->regs->VF[_Ft_].UL[0]);
|
||||||
|
|
|
@ -18,6 +18,10 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef __LINUX__
|
||||||
|
#include "ix86/ix86.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// Helper Macros
|
// Helper Macros
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue