Commit Graph

1671 Commits

Author SHA1 Message Date
Tillmann Karras a363f4fa3e x64Emitter: make 'packed' parameter a bool 2014-08-20 02:54:30 +02:00
Shawn Hoffman 87c324c55a Add Common::Event::WaitFor(), which has the same semantics as std::condition_variable::wait_for() (with millisecond units). 2014-08-17 21:52:40 -07:00
Shawn Hoffman 375be67158 Add Common/Event.h to the VS project files. 2014-08-17 21:52:40 -07:00
Fiora 802b28daf9 x64Emitter: refactor to support longer opcodes
Also add some new SSE4 opcodes.
2014-08-17 04:48:17 -07:00
Lioncash 4759510f70 Get rid of instances of "using namespace std;" in the project 2014-08-17 02:05:33 -04:00
Lioncash 6ee2267b2d Merge pull request #771 from lioncash/32bit-cruft
Core: Remove leftover Windows 32-bit functions in MemArena.cpp
2014-08-17 01:40:23 -04:00
Lioncash 1b92c68f05 Common: Add Flag.h to the Visual Studio project. 2014-08-16 23:33:28 -04:00
Lioncash d18d3e1f3e Common: Get rid of StdConditionVariable, StdMutex, and StdThread.
All of the compilers we support have support for these now.
2014-08-16 23:33:19 -04:00
shuffle2 2270c3e90a Merge pull request #797 from shuffle2/msvc-pch
Windows: Use a shared precompiled header for dolphin code under Source/
2014-08-16 14:58:28 -07:00
Lioncash cf46ac7dc9 Core: Kill off Host_ShowJitResults
Another host function that can be killed off by simple wx event handling
2014-08-15 15:18:28 -04:00
Shawn Hoffman f1b82a34b2 Windows: Use a shared precompiled header for dolphin code under Source/ 2014-08-14 23:51:13 -07:00
Shawn Hoffman 66fdbdd18d Windows: Give SCMRevGen a configuration for x64 instead of Win32. 2014-08-13 03:57:10 -07:00
Ryan Houdek 6bdc32c54a Add the VideoCommon PostProcessing class.
This class loads all the common PP shader configuration options and passes those options through to a inherited class that OpenGL or D3D will have.
Makes it so all the common code for PP shaders is in VideoCommon instead of duplicating the code across each backend.
2014-08-13 01:05:10 -05:00
Ryan Houdek 3a657fe33c Add TryParseVector to StringUtil.
Adds a nice way to have options be in a vector for results
2014-08-12 23:45:14 -05:00
shuffle2 43010818fa Merge pull request #785 from lioncash/string
Common: Fix AsciiToHex returning true on overflow values
2014-08-12 14:43:02 -07:00
shuffle2 9f4008c5bc Merge pull request #760 from lioncash/swap
Common: Use the OSX equivalent byte-swap functions
2014-08-12 14:31:32 -07:00
shuffle2 b8d126c101 Merge pull request #754 from FioraAeterna/immediateopt
x64Emitter: optimize immediate sizes
2014-08-12 14:19:31 -07:00
Lioncash 5afb9cc5c4 Common: Fix AsciiToHex returning true on overflow values
We should be checking errno against ERANGE.
2014-08-12 02:49:04 -04:00
shuffle2 36af1b518d Merge pull request #777 from shuffle2/vs2013-update3
Use official flag for detailed symbols. Require VS2013 with update 3 or later to build.
2014-08-11 20:12:52 -07:00
Shawn Hoffman d0c3e46c80 Windows: Improve XSaveWorkaround to behave correctly when XSAVE processor feature is enabled, but AVX support isn't available for whatever reason. 2014-08-10 14:50:29 -07:00
Shawn Hoffman 5eccc08c7e Use official flag for detailed symbols. Require VS2013 with update 3 or later to build. 2014-08-10 14:47:29 -07:00
Lioncash eb10899b53 Core: Remove leftover Windows 32-bit functions in MemArena.cpp 2014-08-10 05:35:14 -04:00
Lioncash 9a61cfc650 Core: Actually show MemoryUtil.cpp allocation error messages on Linux 2014-08-10 05:28:00 -04:00
Lioncash be3428cf8e Core: Fix case where a panic alert wouldn't be shown in MemoryUtil.cpp 2014-08-10 04:50:58 -04:00
Lioncash 7bf82f1989 Core: Kill off Host_UpdateLogDisplay()
This was actually never used as far as I can tell. There was no wx event handling done whatsoever for the global ID, So this is basically a dead function.
2014-08-08 19:21:40 -04:00
lioncash 85ace9751e Common: Use the OSX equivalent byte-swap functions 2014-08-08 13:26:26 -04:00
Fiora 75b3e425fd x64Emitter: optimize immediate sizes
A nice alternative than trying to do it throughout the JIT.
2014-08-07 13:07:27 -04:00
Lioncash 0718937237 Common: Introduce the new Gekko disassembler to Common.
This moves the Gekko disassembler to Common where it should be. Having it in the Bochs disassembly Externals is incorrect.

Unlike the PowerPC disassembler prior however, this one is updated to have an API that is more fitting for C++. e.g. Not needing to specify a string buffer and size. It does all of this under the hood.

This modifies all the DebuggingInterfaces as necessary to handle this.
2014-08-04 00:45:07 -04:00
Pierre Bourdon 4c42b38de1 Merge pull request #428 from Sonicadvance1/x86_32-removal
Remove x86_32 support from Dolphin.
2014-08-03 21:17:28 -07:00
Ryan Houdek 0c24e1dcf2 Remove the rest of x86_32 support from Common. 2014-08-03 13:49:46 -05:00
Pierre Bourdon 8b26d7bf1e UnitTests: make it possible to build tests for code that has global dependencies 2014-08-02 09:34:39 -07:00
Lioncash 77c2b6829a Merge pull request #702 from lioncash/netplay-version
Common: State OS instead of 32/64 bit in the netplay lobby
2014-08-01 22:51:30 -04:00
Lioncash 4b32dcbc33 Merge pull request #707 from lioncash/strip
Common: Simplify StripTailDirSlashes
2014-08-01 16:01:37 -04:00
Lioncash 1dc5294629 Common: Simplify StripTailDirSlashes 2014-07-31 22:18:45 -04:00
Lioncash c5188c76b3 Merge pull request #705 from Sonicadvance1/fix-memoryutil-check
Fixes a check for what mmap returns.
2014-07-31 03:06:00 -04:00
Ryan Houdek 33450c80c3 Fixes a check for what mmap returns.
On error mmap returns MAP_FAILED(-1) not null.
FreeBSD was checking the return correctly, Linux was not.
This was noticed by triad attempting to run Dolphin under valgrind and not getting a memory space under the 2GB limit(Because -1 wraps around on
unsigned obviously)
2014-07-31 00:53:00 -05:00
Pierre Bourdon 9b9817f927 x64Emitter: Fix REX encoding for SETcc
Previously using the new "lower 8 bits" registers (SIL, SPL, ...) caused SETcc
to write to other registers (for example, SETcc SIL would generate SETcc DH).
2014-07-30 06:41:29 -07:00
Lioncash 22e9d6977b Common: State OS instead of 32/64 bit in the netplay lobby 2014-07-30 02:04:17 -04:00
Lioncash b03c12764d Really get rid of the MSVC 2005 workaround completely 2014-07-29 21:20:43 -04:00
Lioncash 4fa71dd59e Remove fakepoll.h.
It was only used for Windows XP and lower.

This also bumps the _WIN32_WINNT define in the stdafx precompiled headers to set the minimum version as Windows Vista.
2014-07-26 22:53:40 -04:00
Shawn Hoffman cfc7bb35c2 Windows: Also look for git.exe in the registry (for Git Extensions installs). 2014-07-20 12:33:56 -07:00
Tillmann Karras 6df48ed432 x64Emitter: add CVTTPD2DQ 2014-07-15 23:53:56 +02:00
Lioncash 79eb0f8d0c Merge pull request #623 from phire/sw-xfb-clamping
Fix incorrect clamping in SWRenderer.
2014-07-15 12:04:06 -04:00
Scott Mansell b8695a57da Fix incorrect clamping in SWRenderer.
A previous PR changed a whole lot of min/maxes to std::min/std::max
but made a mistake here and used a templated min which cast it's
arguments to unsigned instead of casting return value.

This resulted in glitchy artifacts in bright areas (See issue 7439)

I rewrote the code to use a proper clamping function so it's cleaner
to read.
2014-07-15 21:15:49 +12:00
Lioncash 8087a89afd Remove some unnecessary defines in Log.h 2014-07-14 15:51:28 -04:00
Tillmann Karras d398e9ef61 Common: add macros for assisting branch prediction 2014-07-14 01:52:14 +02:00
Tillmann Karras 0ccee6c87b Fix warnings unearthed by #579 2014-07-13 02:16:51 +02:00
degasus 7e79806efc remove unused globals
Also change globals into statics which are only used in one file
2014-07-11 16:10:20 +02:00
degasus 81ed17be53 avoid the extern keyword in .cpp files 2014-07-11 16:10:20 +02:00
degasus 22e1aa5bb4 mark all local functions as static 2014-07-11 16:07:23 +02:00
Lioncash 09eb1acc5e Common: Using size_t in PointerWrap's DoContainer apparently causes crashes. Fixes this. 2014-07-06 03:05:27 -04:00
Lioncash b97d2853a7 Common: Make DoContainer within PointerWrap private.
This shouldn't really be exposed as a public function and should only be called through other Do class functions that take a container type as a parameter.
2014-07-05 23:03:43 -04:00
Lioncash bd377b9580 Merge pull request #443 from magumagu/loadstore-cleanup
Loadstore cleanup
2014-06-26 21:32:59 -04:00
Lioncash ca5340ebde Centralize the logging code into its own folder in Common. 2014-06-25 22:11:42 -04:00
Lioncash 177658aed6 Merge pull request #513 from lioncash/vs-x64
Remove the 32-bit config platform from the VS solution file
2014-06-25 21:23:45 -04:00
Lioncash 8b13afbb8e Remove the 32-bit config platform from the VS solution and projects 2014-06-24 22:07:26 -04:00
Lioncash eb3de73ab9 Merge pull request #531 from LPFaint99/memcard
GCI Folder: correctly identify region of sysmenu
2014-06-24 21:18:27 -04:00
Jordan Woyak 516369594f Store ini sections in a std::list (rather than vector) to prevent unexpected pointer invalidation with use of GetOrCreateSection. 2014-06-24 12:37:38 -05:00
LPFaint99 c65a6f5fb0 GCI Folder: correctly identify region of sysmenu 2014-06-23 19:58:27 -07:00
Pierre Bourdon ce74752e91 Common: Add a PCAP writer module 2014-06-22 20:04:46 +02:00
Pierre Bourdon 5dff577339 Merge pull request #500 from lioncash/ini
Use only section-based ini reading.
2014-06-22 17:21:45 +02:00
magumagu 06864e9fee JIT: Clean up float loads and stores.
Less code is good, and this should make future changes to memory handling
easier.
2014-06-20 12:52:39 -07:00
Lioncash f05d3f6e5d Use only section-based ini reading. 2014-06-16 01:31:23 -04:00
magumagu ee0c5bdc20 Try to fix android build. 2014-06-15 15:56:42 -07:00
magumagu d905cbfd5d Don't set DAZ on x86 in non-IEEE mode.
I have no idea why we were using it in the first place; it doesn't match
the behavior of PPC NI flag.
2014-06-15 03:51:51 -07:00
Tony Wasserka 3d6f9ef897 BitField: Add an explicit getter function for retrieving the BitField value.
Sometimes (in particular when using non-typesafe functions) it can be convenient to have a getter method rather than performing a potentially lengthy explicit cast.
2014-06-11 20:58:40 +02:00
Tony Wasserka b3c7f003da BitField: Delete copy assignment to prevent obscure bugs. 2014-06-11 20:58:40 +02:00
Ryan Houdek 6e1d312091 Make it so ARMv7 isn't a generic target.
Rearranges a bit of code so that ARM isn't a generic build anymore. Because it obviously isn't
2014-06-07 20:26:31 -05:00
Ryan Houdek b6db0d0ab8 Merge pull request #457 from Tilka/jcc
x64Emitter: J_CC: use 32 bit offset automatically
2014-06-06 20:53:50 -05:00
Lioncash 3843848ed4 Use std::string in LogContainer's constructor.
This allows for removal of the strcpy calls, also it's technically way more safe, though I doubt we'll ever have a log name larger than 128 characters or a short description larger than 32 characters.

Also moved these assignments into the constructor's initializer list.
2014-06-05 18:50:14 -04:00
Tillmann Karras f8280401f6 x64Emitter: J_CC: use 32 bit offset automatically 2014-06-03 23:08:58 +02:00
Ryan Houdek 3a06907653 Merge pull request #455 from lioncash/arm-cpudetect-fix
Stringify ArmCPUDetect.cpp.
2014-06-02 20:10:39 -05:00
Lioncash 7d7b3d6156 Stringify ArmCPUDetect.cpp. 2014-06-02 21:08:26 -04:00
Ryan Houdek 5d3382fb56 Fix a crash in ARM's CPUDetect on a malformed /proc/cpuinfo.
If a CPU string was incapable of being found we would return a null pointer, which would crash with strncpy.
Also if we couldn't get a CPU implementer we would call free() to a null pointer.
In addition, detect 64bit ARM running.
2014-06-01 23:55:38 -05:00
Ryan Houdek 87e671404a Make MemoryUtil.cpp use the correct x86_64 define.
MemoryUtil.cpp was incorrectly using the old __x86_64__ define when it should be using _M_X86_64.
It was also using _ARCH_64 when it shouldn't have which was causing an errant PanicAlert to come up in my development.
2014-06-01 23:45:44 -05:00
Lioncash 49b0eef393 Remove the min/max functions in CommonFuncs.
The algorithm header has the same functions.
2014-05-29 21:44:41 -04:00
Lioncash eca70d1562 Get rid of the temporary buffer in IniFile's Load function.
std::getline is the string-based equivalent.
2014-05-28 20:26:15 -04:00
Rachel Bryk 80ab567a5b When reading an ini file, if there is an error, check if it is simply because the eof was reached. 2014-05-28 14:06:18 -04:00
Pierre Bourdon 10efd5b8c0 Merge pull request #430 from shuffle2/xsave-workaround-fix
msvc C initializers return int...fix EnableXSaveWorkaround when rax doesn't implicitly equal zero.
2014-05-28 12:25:25 +02:00
Pierre Bourdon ce139622f6 Merge pull request #392 from RachelBryk/error-check-ini-file
Check for errors when reading lines from ini files.
2014-05-28 11:57:00 +02:00
Shawn Hoffman 47a2eb47a0 msvc C initializers return int...fix EnableXSaveWorkaround when rax doesn't implicitly equal zero. 2014-05-28 00:16:33 -07:00
Shawn Hoffman 58bcc3d12a Redo commit 932945d480
This time, make sure the object for disabling XSave support in msvcr can't be dropped by the linker.
2014-05-27 13:41:19 -07:00
Rachel Bryk 0782d106db Check for errors when reading lines from ini files.
Fixes issue 7283.
2014-05-23 03:17:19 -04:00
Lioncash 5f796e919b Move bn.h and ec.h into the correct filter section 2014-05-17 16:47:41 -04:00
Lioncash d0bd4119d1 Use size_t in std::string operations in IniFile.cpp, not int 2014-05-14 20:38:08 -04:00
shuffle2 36720e6822 Merge pull request #351 from Tilka/make_unique
Add a std::make_unique implementation (Common/StdMakeUnique.h)
2014-05-11 01:46:09 -07:00
Tillmann Karras 4400e511c0 fixmeup rename 2014-05-11 10:40:18 +02:00
Shawn Hoffman 700c135386 Revert "x64FPURoundMode: always set x87 precision"
This reverts commit 9de77b7c23.
Setting x87 precision control is only supported on x86 platforms (not ARM or x64).
2014-05-10 20:21:07 -07:00
Tillmann Karras 81d4d7368a Add a std::make_unique implementation
Some compilers we care about (mostly g++) do not support std::make_unique yet,
but we still want to use it in our codebase to make unique_ptr code more
readable. This commit introduces an implementation derivated from the libc++
code in the Dolphin codebase so we can use it right now everywhere.

Adapted from delroth's pull request.
2014-05-06 12:32:03 +02:00
Tillmann Karras 9de77b7c23 x64FPURoundMode: always set x87 precision
Set the x87 precision, even on x64. Since we are using x87 instructions
in the JIT now, we can't guarantee that x87 precision will never
influence Dolphin on x64.
2014-05-01 01:10:00 +02:00
Tillmann Karras ed762a3eda x64FPURoundMode: use fesetround() instead of asm 2014-05-01 01:09:55 +02:00
Tillmann Karras e659f5ac58 JitBackpatch: fix NOP padding
The new NOP emitter breaks when called with a negative count. As it
turns out, it did happen when deoptimizing 8 bit MOVs because they are
only 4 bytes long and need no BSWAP.
2014-04-30 15:26:11 +02:00
Pierre Bourdon aef24d509b Merge pull request #304 from Tilka/nop
Optimize NOPs
2014-04-27 11:52:05 +02:00
Tillmann Karras 886c887e80 Fix Fastmem on CPUs without MOVBE
The problem was that when BSWAP was used, UnsafeWriteRegToReg() returned
the address of that instead of the MOV.
2014-04-25 01:11:52 +02:00
Tillmann Karras acfd9ee76c Add remaining possible uses of MOVBE
Also fixes a missing 'break' statement in DisassembleMov().
2014-04-24 16:36:03 +02:00
Tillmann Karras 957649b7af Optimize NOPs 2014-04-23 21:15:09 +02:00
Tillmann Karras b3c7395a23 Atomic: support clang 3.4+ 2014-04-17 10:39:02 +02:00
Pierre Bourdon cf315a487f Merge pull request #271 from delroth/threading-stuff
Threading improvements: add Common::Flag and improve Common::Event
2014-04-14 23:23:16 +02:00
Pierre Bourdon 7074feacbe Common::Event: Add a faster Windows specific implementation based on the concurrency runtime. 2014-04-14 23:13:15 +02:00
Pierre Bourdon 48bd904028 Common::Event: Implement in terms of Common::Flag to get rid of a volatile and optimize with early returns and atomic swaps 2014-04-14 23:13:15 +02:00