Commit Graph

64 Commits

Author SHA1 Message Date
Lioncash 38c7d38800 Fix two wrong opcodes in the x64Emitter. PEXTRW and PINSRW were actually writing PCMPGTB opcodes. Thanks for the help Sintendo. 2013-09-16 15:59:31 -04:00
Pierre 9a8dd7963e Merge branch 'dspjit'
Conflicts:
	Source/Core/Core/Src/DSP/Jit/DSPJitExtOps.cpp
	Source/Core/Core/Src/DSP/Jit/DSPJitMisc.cpp
	Source/Core/Core/Src/DSP/Jit/DSPJitRegCache.cpp
	Source/Core/Core/Src/DSP/Jit/DSPJitUtil.cpp
2013-04-21 12:29:18 +02:00
lioncash d244bca1f5 Fix a bunch of random typos in comments and logging.
Also update the comment headers for two functions in GCMemcard.cpp.
2013-04-19 09:21:45 -04:00
Lioncash bab9963b00 New license header introduced for DiscIO, AudioCommon, InputCommon, VideoCommon, and Common projects. 2013-04-17 23:09:55 -04:00
lioncash ef85b9af45 Update the license file text (change SVN to Git) in all projects except Core since I was told a merge was happening soon. So for the sake of the merge going smoothly, I'll fix that when I remove the tab/space mismatches from the Core project.
Also, some tab/space mismatches removed from VideoOGL, and some places I missed in VideoDX[number] projects.

Now, the Core is literally the only project with tab/space mismatches (on a large scale).
2013-04-15 16:28:55 -04:00
Pierre 6b5b8ab5be Implement and use MOVZX(64, 32,...)
Probably better to keep that same-register-MOV assert useful. Also,
explicit type extension documents whats happening.

Internally, this boils down to the original MOV, but without the assert.
2013-04-14 13:34:29 +02:00
Pierre 701b5916ab Revert "In memory of calc84."
This reverts commit 539bf405f2.
2013-04-14 13:34:29 +02:00
lioncash edd9d0e0ef Clean up more space/tab mismatches in AudioCommon, Common, and VideoCommon.
Not planning to touch Core since it's the most actively changed part of the project.
2013-03-19 21:51:12 -04:00
Ryan Houdek 717b976875 ARM Support without GLSL 2013-02-26 13:49:00 -06:00
Matthew Parlane 539bf405f2 In memory of calc84.
http://dolphin-emu.org
2012-12-30 16:31:38 +13:00
Glenn Rice e85438cba0 Clean up gcc/g++ compiler warnings that have accumulated. 2012-12-10 00:40:28 -06:00
skidau b0d271db3c Changed MOVDDUP to use MOVSD on non-SSE3 CPU's.
Added DMA wait time under DSP HLE mode.

Fixes Knockout Kings 2003.
2012-06-02 10:06:47 +10:00
calc84maniac 79ca43226c Added SHRD/SHLD x86 emitters, further optimized srawx 2012-01-09 00:10:13 -05:00
calc84maniac 5a15d58964 Added emitters for BT/BTR/BTS/BTC x86 instructions, optimized extended arithmetic PowerPC instructions 2012-01-05 22:36:27 -05:00
pierre 6cdb40a194 JIT: Add support for memory accesses with scaled index register but without base register
This is mostly useful for removing SHLs by constant 1, 2, 3, which this
commit implements in one place.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7652 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-06-29 22:40:01 +00:00
pierre 35026f9de1 Core/Common: Allow LEA(32,...) with M() OpArgs exceeding the 2G range.
Fixes JitIL in debug builds.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7478 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-04-22 15:51:40 +00:00
pierre e57406dbcc Core/Common: Add support for low 8 bit parts of SI,DI,BP on 64 bit in x64Emitter
In addition protect against their use on 32 bit and the use of [ABCD]H
together with a REX prefix on 64 bit.

This assumes that the customOp parameter of WriteREX and operandReg of
OpArg always are registers, and thus needs to give something valid to
WriteREX when that is not the case (WriteShift).

In addition to the patch i sent to the ML, there are a few changes to the
error reporting(mostly whitespace).



git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7202 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-02-19 14:20:52 +00:00
pierre a82a61c53a Core/DSPCore: Fix more memory accesses for linux x64
Core/Common: Add more asserts for too large displacements


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6595 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-16 22:38:31 +00:00
Soren Jorvang f169def36f First pass at dealing with different size_t/off_t sizes in C90 environments.
Most of the code dealing with the LogTypes namespace was C which lead to a
lot of nonsensical casting, so I have dumbed LOG_TYPE and LOG_LEVEL down to
plain C even though the move of wiiuse into Source means we don't currently
call GenericLog from C.

Set logging threshold to MAX_LOGLEVEL at startup so debug builds will also
p  rint debugging messages before the GUI is running.

For some reason the way we use SetDefaultStyle doesn't play nice with wx 2.9
so we just get the default black text on a black background. Using a gray
background works around that problem, but I found it to also be much easier
on the eyes so I have switched the background color on all versions.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6528 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-05 15:59:11 +00:00
pierre bc1e0c24e8 Add an PanicAlert in case we try to do an >32 bit displacement
If you see this alert, dolphin will probably crash in a few moments.

Found in the course of fiddling with DSPLLEs JIT, which puts its data
structures and static code somewhere above 0x7fff00000000 on my machine, making
it unreachable via 32bit displacements from the created code at ~ 0x40000000.

Fixed all the offending places in DSPLLEs JIT to emit register indirect accesses,
only to find out that the generated code is slower than the interpreter and does
work just as good(or bad). Oh well, back to DSPHLE it is then.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6229 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-26 19:37:30 +00:00
nodchip 58ac6e541f Added PSRLD/PSRLQ/PSLLD/PSLLQ support to x64Emitter
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6180 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-06 03:03:33 +00:00
j4ck.fr0st 89c4068663 Fix a bug in DSP Jit where branches had a blockSize of zero.
Add some useful checking to J_CC/SetJumpTarget.
Refactor increment/decrement and reuse code with increase/decrease.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5816 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-30 16:17:20 +00:00
j4ck.fr0st 800595980e Fixed a small bug in J_CC when emitting jumps that exceed 0x80 in range (only used by DSP NR yet).
Add back a CMP nakee missed in his last commit

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5328 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-11 12:27:27 +00:00
j4ck.fr0st 57a3c87815 DSPJit: disabled NR again until we fix DSPEmitter::increase_addr_reg.
And to help test things like that: DSPJitTester (use with caution on x64, most likely fails there; r5250 might be why)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5306 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-09 19:18:50 +00:00
hrydgard 53408a695f Fix EFB reads in fastmem mode by removing the EFB mapping (forces it to go through the right handlers). Enable fastmem mode in x64. 1-2% speed boost overall maybe :p
Disable the Redundant MOV warning in release mode, it's only enabled in debug builds now.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4870 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-17 21:28:39 +00:00
hrydgard b84a1823b2 Hopefully fix all remaining quantizer issues in Mario Kart Wii:
* must use a truncating float-to-int conversion, for example.
  * introduce optimized variants of the single value psq_st operation (JIT only).
  * fix bug in SafeWriteRegToReg when swap = false

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4861 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-16 22:44:49 +00:00
hrydgard 901316e61b (assorted cleanup and reindent that didn't belong in the quantizer change)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4855 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-16 19:01:00 +00:00
XTra.KrazzY c86d2e5129 Now ALL copyright dates are fixed to the legally correct year: The year in which the project began. Now we don't have to change it every year :)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3898 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-28 21:32:10 +00:00
magumagu9 c52e4d281e Remove instructions which don't actually exist.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3670 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-04 00:09:12 +00:00
magumagu9 7f27cfc9d2 Misc warning fixes.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3583 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-06-28 20:53:26 +00:00
hrydgard 10442c8faa PowerPC: Fixed moronic bug in mcrfs - together with correctly computing FPRF (which is a new option, slows down slightly) in a few ops this fixes most remaining math errors in Super Monkey Ball and eliminates the need for the HLE hacks. Make sure to have up-to-date gameconfigs. Unfortunately, F-Zero still doesn't work. Misc other small changes. Indent some code.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3426 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-06-13 14:10:10 +00:00
omegadox eb0cab140f Some code cleanup
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2768 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-03-28 08:57:34 +00:00
hrydgard 41ce35deb3 fix crazy codegen bug and unban R12 from register allocators
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2295 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-02-17 22:18:21 +00:00
magumagu9 412626c327 Add CVTPS2DQ implementation.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1759 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-01-04 08:29:47 +00:00
magumagu9 dbd9d5fb2d Fix assembly of 16-bit immediates.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1732 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-01-02 04:34:23 +00:00
magumagu9 2e58a5bef0 Slightly shorter version of 16-bit BSWAP.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1726 8ced0084-cf51-0410-be5f-012b33b47a6e
2008-12-31 20:46:55 +00:00
hrydgard fa9f5c44fb More code movin' .. split Vertex/Pixelshadermngr into xxCache and xxManager.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1677 8ced0084-cf51-0410-be5f-012b33b47a6e
2008-12-26 10:43:18 +00:00
hrydgard 104acd5bc1 Turn the X86 emitter into a class, so the code pointer is no longer a global, yay! Created XCodeBlock that derives from XEmitter, and the Jit now derives from XCodeBlock so it can call all ADD SUB JNZ etc without having to prefix them with "emit.". I think someone's gonna like this.
There's some cleanup still to be done, but hey, it works. There shouldn't be a noticable speed difference.

I hope GCC doesn't have a problem with the "member function pointers" I used.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1594 8ced0084-cf51-0410-be5f-012b33b47a6e
2008-12-19 21:24:52 +00:00
magumagu9 97e01e31d0 Some small emitter enhancements; I was originally planning on actually
using these, but I changed my mind.  They could potentially be 
useful in the future, though.



git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1574 8ced0084-cf51-0410-be5f-012b33b47a6e
2008-12-18 06:46:32 +00:00
bushing 49cfded60b set svn:eol-style=native for **.cpp
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1442 8ced0084-cf51-0410-be5f-012b33b47a6e
2008-12-08 05:30:24 +00:00
hrydgard 5c58227702 Optimize vertex loader with a mini JIT (only first step, more optimizations may follow). Some various error message and warning fixes.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1276 8ced0084-cf51-0410-be5f-012b33b47a6e
2008-11-23 17:46:14 +00:00
magumagu9 05058b9684 Another Linux build fix.
Also, some trivial changes I'm too lazy to separate out.



git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1249 8ced0084-cf51-0410-be5f-012b33b47a6e
2008-11-22 20:20:14 +00:00
XTra.KrazzY 159e3f5b49 Fixed saving/loading states in OGL plugin.
Turns out the BPReload function is written plain wrong. Also, most chances are that the state will load correctly when not reloading the BP (not now though).

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1247 8ced0084-cf51-0410-be5f-012b33b47a6e
2008-11-22 20:06:20 +00:00
XTra.KrazzY 145f80fc00 Committing magumagu9's work on IMUL JIT
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1241 8ced0084-cf51-0410-be5f-012b33b47a6e
2008-11-22 12:10:35 +00:00
masken 09ba0a3a11 Fixed a couple of unused variable warnings.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@486 8ced0084-cf51-0410-be5f-012b33b47a6e
2008-09-08 20:14:07 +00:00
nakeee 43634d53df fixed warnings
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@458 8ced0084-cf51-0410-be5f-012b33b47a6e
2008-09-07 13:58:56 +00:00
Maarten ter Huurne 722ea233a1 Align stack to 16-byte boundary when compiling in 32-bit mode with GCC. This is required to run anything on OS X and to support SSE instructions on Linux.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@439 8ced0084-cf51-0410-be5f-012b33b47a6e
2008-09-05 00:02:53 +00:00
Maarten ter Huurne 541a86de26 Removed unused function x86SetJ8().
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@365 8ced0084-cf51-0410-be5f-012b33b47a6e
2008-08-27 13:42:32 +00:00
Maarten ter Huurne ad748bfc05 Fixed CALL range check.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@364 8ced0084-cf51-0410-be5f-012b33b47a6e
2008-08-27 13:29:35 +00:00
Maarten ter Huurne 0f3e8ddced On platforms where the OpenGL library uses the CDECL calling convention, the stack should be increased after making a call.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@334 8ced0084-cf51-0410-be5f-012b33b47a6e
2008-08-27 01:04:54 +00:00