pcsx2/pcsx2/x86
Jake.Stine 2dcee32079 Linux: Fix some GCC compilation errors. And update the msvc project (somehow didn't get committed last night, but only change header files so prolly didn't break anything).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1037 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-04-21 13:54:41 +00:00
..
ix86 Linux: Fix some GCC compilation errors. And update the msvc project (somehow didn't get committed last night, but only change header files so prolly didn't break anything). 2009-04-21 13:54:41 +00:00
ix86-32 Emitter: Changed a lot of 'i's into 'x's, because... 2009-04-20 03:10:05 +00:00
BaseblockEx.cpp Implemented another block lookup method. 2009-04-05 14:19:13 +00:00
BaseblockEx.h Reverted the emitter back to a c/cpp form from inl files (probably wasn't necessary, but I don't like having code in header/inl files when I can help it). Also: 2009-04-07 21:54:50 +00:00
Makefile.am Linux: Some work on the plugin code. 2009-03-06 07:20:16 +00:00
README Should be the last of the trunk, gotta finish the branches/tags, but thats the main bulk transferred. 2009-02-06 20:04:37 +00:00
aMicroVU.S Remove lots of evil %'s. 2009-03-05 21:35:26 +00:00
aR3000A.S Rewrite immediate jumps from the block manager instead of having dispatchers to do this at execution time. 2009-03-14 16:30:35 +00:00
aVUzerorec.S Remove lots of evil %'s. 2009-03-05 21:35:26 +00:00
aVif.S Optimized and split up the unpack call a bit so less checks are being run, should bring an overall speed increase. Also got rid of some duplicate pointer rubbish which was all over the place. 2009-04-11 17:45:14 +00:00
aVif.asm Should be the last of the trunk, gotta finish the branches/tags, but thats the main bulk transferred. 2009-02-06 20:04:37 +00:00
fast_routines.S Linux: Fix Final Fantasy XII. (memcmp_mmx appeared to be freezing MMX and not thawing it, and it didn't freeze it in Windows.) Comment out some unused code. Remove some code I commented earlier. And consolidate some of the calls to FreezeXMMRegs/FreezeMMXRegs. 2009-03-13 01:05:43 +00:00
fast_routines.cpp Fixed a bug in memcpy_fast that caused memory corruption on blocks not aligned to 32-bits in length (this might fix the linux memcpy fast problem too). 2009-03-09 21:52:33 +00:00
iCOP0.cpp Looks like the new PCR/TIMR code wasn't called correctly in recMFC0. 2009-03-15 12:24:24 +00:00
iCOP0.h Updated the Copyright to reflect the passing of another year. :) 2009-02-15 23:23:46 +00:00
iCOP2.cpp Added the second part of emitter macro functionality, by making the emitter instance configurable. We can't actually use it yet tho, since everything shares iCore, and thus everything needs to share the same emitter instance (for now!). 2009-03-01 20:44:48 +00:00
iCore.cpp Added CMOV to the emitter, renamed x86Struct stuff to iStruct, renamed XMMREGS / X86REGS / MMXREGS defines to iRegCnt_XMM / iRegCnt_GPR / iRegCnt_MMX, and undid a couple u32 optimizations which could have caused unexpected behavior in the future, if we ever decided to employ some particularly obscure case of self-modifying code. 2009-04-15 21:00:32 +00:00
iCore.h Added CMOV to the emitter, renamed x86Struct stuff to iStruct, renamed XMMREGS / X86REGS / MMXREGS defines to iRegCnt_XMM / iRegCnt_GPR / iRegCnt_MMX, and undid a couple u32 optimizations which could have caused unexpected behavior in the future, if we ever decided to employ some particularly obscure case of self-modifying code. 2009-04-15 21:00:32 +00:00
iFPU.cpp pcsx2: 2009-04-04 06:20:48 +00:00
iFPU.h pcsx2: 2009-04-04 06:20:48 +00:00
iFPUd.cpp Cleaned a few things up, and moved a few things around. 2009-04-15 01:25:11 +00:00
iMMI.cpp Emitter: Fixed a small bug in the ModSib emitter logic which caused some forms of ESP to encode incorrectly. Implemented CALL/BSF/BSR [x86], MOVQ, MOVD, and MOVSS [mmx/xmm]. Renamed ix86_mmx.cpp and i86_sse.cpp to ix86_legacy_mmx.cpp and i8x_legacy_sse.cpp. 2009-04-19 02:14:50 +00:00
iMMI.h Updated the Copyright to reflect the passing of another year. :) 2009-02-15 23:23:46 +00:00
iPsxMem.cpp Some header work, get rid of some dead code, and rename PsxCommon.h. 2009-03-13 04:49:23 +00:00
iR3000A.cpp Cleaned a few things up, and moved a few things around. 2009-04-15 01:25:11 +00:00
iR3000A.h Reverted the emitter back to a c/cpp form from inl files (probably wasn't necessary, but I don't like having code in header/inl files when I can help it). Also: 2009-04-07 21:54:50 +00:00
iR3000Atables.cpp Switched the emitter over to using Thread-Local storage (TLS), which removes all the templates and brings us back to a more traditional-looking, macro-free, and intellisense-friendly implementation. Plus it's a lot less prone to errors and will make debugging easier down the road. (next commit will rename the files back to .cpp and get them out of the header includes) 2009-04-07 16:54:02 +00:00
iR5900.h Emitter: Fixed a small bug in the ModSib emitter logic which caused some forms of ESP to encode incorrectly. Implemented CALL/BSF/BSR [x86], MOVQ, MOVD, and MOVSS [mmx/xmm]. Renamed ix86_mmx.cpp and i86_sse.cpp to ix86_legacy_mmx.cpp and i8x_legacy_sse.cpp. 2009-04-19 02:14:50 +00:00
iR5900Arit.h Updated the Copyright to reflect the passing of another year. :) 2009-02-15 23:23:46 +00:00
iR5900AritImm.h Updated the Copyright to reflect the passing of another year. :) 2009-02-15 23:23:46 +00:00
iR5900Branch.h Updated the Copyright to reflect the passing of another year. :) 2009-02-15 23:23:46 +00:00
iR5900Jump.h Updated the Copyright to reflect the passing of another year. :) 2009-02-15 23:23:46 +00:00
iR5900LoadStore.h Updated the Copyright to reflect the passing of another year. :) 2009-02-15 23:23:46 +00:00
iR5900Misc.cpp - Various fixes to MMI and more changes to opcodes to mimic ps2 behavior, thanks to Nneeve. 2009-03-22 19:40:43 +00:00
iR5900Move.h Updated the Copyright to reflect the passing of another year. :) 2009-02-15 23:23:46 +00:00
iR5900MultDiv.h Updated the Copyright to reflect the passing of another year. :) 2009-02-15 23:23:46 +00:00
iR5900Shift.h Updated the Copyright to reflect the passing of another year. :) 2009-02-15 23:23:46 +00:00
iVU0micro.cpp microVU: 2009-04-19 21:22:47 +00:00
iVU1micro.cpp microVU: 2009-04-19 21:22:47 +00:00
iVUmicro.cpp Disabled a VU recompiler option that caused some SPS in Ratchet and Clank and didn't actually affect speed. 2009-04-08 18:19:48 +00:00
iVUmicro.h Fixed a bug in the savestate system that caused memcards to eject when they shouldn't have (had uint instead of u64 >_<). 2009-02-27 01:43:43 +00:00
iVUmicroLower.cpp Emitter: Changed a lot of 'i's into 'x's, because... 2009-04-20 03:10:05 +00:00
iVUmicroUpper.cpp Added CMOV to the emitter, renamed x86Struct stuff to iStruct, renamed XMMREGS / X86REGS / MMXREGS defines to iRegCnt_XMM / iRegCnt_GPR / iRegCnt_MMX, and undid a couple u32 optimizations which could have caused unexpected behavior in the future, if we ever decided to employ some particularly obscure case of self-modifying code. 2009-04-15 21:00:32 +00:00
iVUops.h Updated the Copyright to reflect the passing of another year. :) 2009-02-15 23:23:46 +00:00
iVUzerorec.cpp Put a different fix for bad J/JALR jumps (Charlie and the Chocolate Factory) 2009-04-19 22:00:11 +00:00
iVUzerorec.h Updated the Copyright to reflect the passing of another year. :) 2009-02-15 23:23:46 +00:00
iVif.cpp Linux: Fix Final Fantasy XII. (memcmp_mmx appeared to be freezing MMX and not thawing it, and it didn't freeze it in Windows.) Comment out some unused code. Remove some code I commented earlier. And consolidate some of the calls to FreezeXMMRegs/FreezeMMXRegs. 2009-03-13 01:05:43 +00:00
ir5900tables.cpp Added the second part of emitter macro functionality, by making the emitter instance configurable. We can't actually use it yet tho, since everything shares iCore, and thus everything needs to share the same emitter instance (for now!). 2009-03-01 20:44:48 +00:00
microVU.cpp microVU: added support for logging complete micro programs saved to the files microVU0.txt/microVU1.txt (in the logs folder) 2009-04-20 19:37:41 +00:00
microVU.h microVU: added support for logging complete micro programs saved to the files microVU0.txt/microVU1.txt (in the logs folder) 2009-04-20 19:37:41 +00:00
microVU_Alloc.h more microVU "stuff" 2009-04-18 23:56:32 +00:00
microVU_Alloc.inl microVU: 2009-04-19 21:22:47 +00:00
microVU_Analyze.inl microVU: added support for logging complete micro programs saved to the files microVU0.txt/microVU1.txt (in the logs folder) 2009-04-20 19:37:41 +00:00
microVU_Compile.inl microVU: added support for logging complete micro programs saved to the files microVU0.txt/microVU1.txt (in the logs folder) 2009-04-20 19:37:41 +00:00
microVU_Execute.inl microVU: added support for logging complete micro programs saved to the files microVU0.txt/microVU1.txt (in the logs folder) 2009-04-20 19:37:41 +00:00
microVU_Log.inl microVU: added support for logging complete micro programs saved to the files microVU0.txt/microVU1.txt (in the logs folder) 2009-04-20 19:37:41 +00:00
microVU_Lower.inl microVU: added support for logging complete micro programs saved to the files microVU0.txt/microVU1.txt (in the logs folder) 2009-04-20 19:37:41 +00:00
microVU_Misc.h microVU: added support for logging complete micro programs saved to the files microVU0.txt/microVU1.txt (in the logs folder) 2009-04-20 19:37:41 +00:00
microVU_Misc.inl microVU: 2009-04-19 21:22:47 +00:00
microVU_Tables.inl microVU: added support for logging complete micro programs saved to the files microVU0.txt/microVU1.txt (in the logs folder) 2009-04-20 19:37:41 +00:00
microVU_Upper.inl microVU: added support for logging complete micro programs saved to the files microVU0.txt/microVU1.txt (in the logs folder) 2009-04-20 19:37:41 +00:00

README

PCSX2 x86 Recompilers - zerofrog(@gmail.com)
    
There are two types of x86 recompilers: x86-32 and x86-64. The code that both of them share is in the x86/ directory. Code for x86-32 is in the ix86-32/ and same goes for x86-64. The ix86/ dirctory contains the low level translation of x86 instructions to actual code, it is written to be used for both architectures. There are a lot of places where it was hard to separate 32bit from 64bit recompilers, so a lot of functions are surrounded by "#if(n)def __x86_64__" statements.

It would be simple if the story ended here, but hte x86 recompilers use a lot of low level assembly routines, meaning that assembly has to be compiled for both windows x32/x64 versions and linux x32/x64 versions.

For windows, the masm assembler is used (*.asm files)
For linux, gcc is used (*.S files)

Both assemblers use very different syntax, also some routines in x86-64 differ a lot from their 32bit counterparts. Therefore, you might see the same function implemented up to 4 times in assembly.

(no, it's not fun maintaining 4 versions of the same thing... and it might be easier to use nasm, but that probably has its own unforseeable problems)