Commit Graph

788 Commits

Author SHA1 Message Date
Gregory Hainaut
9e13a7bdaa x86emitter: add support for the VEX opcode 2016-01-09 22:59:31 +01:00
Gregory Hainaut
29b0b17f50 x86emitter: add BMI1 & BMI2 instruction detection 2016-01-09 22:59:31 +01:00
Gregory Hainaut
fd56195b2d x86emitter: drop old register define 2016-01-09 21:28:10 +01:00
Gregory Hainaut
834cc3f2c5 core|x86emitter: port basic jump instruction 2016-01-09 21:26:25 +01:00
Gregory Hainaut
743e615224 core: overload _freeX86reg with xRegister32 2016-01-09 21:15:25 +01:00
Gregory Hainaut
60a9463e7a x86emitter: remove unused legacy function
And mark the remaining one as deprecated

Clang only as it relies on C++14
2016-01-09 21:13:29 +01:00
Gregory Hainaut
de2b97c640 linux compilation fix 2016-01-08 22:35:55 +01:00
Gregory Hainaut
74db92bee4 Merge pull request #978 from juhalaukkanen/apple_osx_master_merge
OSX 32bit build
2016-01-08 20:09:37 +01:00
Gregory Hainaut
4f28403c03 Merge pull request #972 from PCSX2/clean-gcc-opt-cmake
cmake: reenable a couple of missing gcc optimization
2016-01-08 19:32:18 +01:00
Gregory Hainaut
fb1a19f157 x86emitter: clean unused legacy type
Note: no need to check -1 on register allocation failure (a exception will be fired)
2015-12-02 19:09:43 +01:00
Gregory Hainaut
21445fe0d0 x86emitter: Add several architecture dependant wrapper
* A nice object to create the stack frame
* Various xStdCall/xFastCall to emulate standard & fast call
2015-12-02 19:06:52 +01:00
Juha Laukkanen
7edf747e84 Darwin/OSX Mutex & MAP_ANON vs. MAP_ANONYMOUS.
OSX compilation fix: mutex: Windows
2015-12-02 05:00:23 +02:00
Juha Laukkanen
fc3ff48777 Darwin/OSX SysMessage stub & __POSIX__ define. 2015-11-30 12:18:44 +02:00
Jonathan Li
52be531b8e utilities:windows: Use standard memset for memset_8
aka commit 2194685 for Windows
2015-11-29 11:46:59 +00:00
Jonathan Li
57ad97d212 x86emitter: Remove bool_to_char
It was unused.
2015-11-29 10:58:32 +00:00
Jonathan Li
4d97089990 x86emitter: Fix Windows AVX2 detection
Technically it did work, but it was undefined behaviour. Use __cpuidex,
which allows setting ecx as well.

Also fix the _xgetbv intrinsic - I have no idea how PCSX2 even
compiled on Windows.
2015-11-29 10:57:51 +00:00
Gregory Hainaut
9aec4229d5 x86emitter: support AVX2 (linux only?)
Nah kidding, it is only the cpu detection for the log

x86 Features Detected:
	SSE2.. SSE3.. SSSE3.. SSE4.1.. SSE4.2.. AVX.. AVX2.. FMA
2015-11-28 23:40:15 +01:00
Gregory Hainaut
02186d5a54 x86emitter: always use fxsave intrinsic/asm 2015-11-28 22:19:42 +01:00
Gregory Hainaut
d5efd6eacb x86emitter: remove the never called SIMD_ExceptionTest function 2015-11-28 22:02:08 +01:00
Jonathan Li
a59a90c734 common:windows: Add unicode compatible functions
It's not great, but it will work.
2015-11-25 20:03:44 +00:00
Juha Laukkanen
f813b9e25b Darwin/OSX semaphore & thread & os backend. 2015-11-17 19:30:20 +02:00
Gregory Hainaut
21857ec12d Merge pull request #967 from PCSX2/remove-lazy-allocation
Reduce lazy allocation
2015-11-15 00:12:07 +01:00
Gregory Hainaut
d5830ef708 cmake: reenable a couple of missing gcc optimization 2015-11-14 09:54:09 +01:00
Gregory Hainaut
abb4cb4810 plugin API: use const char* insead of char*
I hope it doesn't change the ABI

v2: fix GSnull/zzogl/zerogs
v3: duplicated code on windows...
2015-11-12 12:11:42 +01:00
Gregory Hainaut
4bfb60865c common: ifdef x64 specific code
gcc warning:  set but unused
2015-11-12 12:10:49 +01:00
Gregory Hainaut
26774a2fe0 recompilers: always allocate the first block
Avoid several annoying SIGSEGV at startup
2015-11-12 10:35:10 +01:00
Gregory Hainaut
7565bcc789 ee: drop SpatialArrayReserve allocator
Let's the kernel manage the memory either with builtin lazy allocation or
swapped memory.

Avoid to handle SIGSEGV manually (nicer for debug) and removes 250 lines of code.
2015-11-12 10:35:10 +01:00
Jonathan Li
44d89308c9 Revert "Revert "gsdx|spu2-x: Use atlcomcli.h for CComPtr definition""
This reverts commit 9bb990e9ed.

Fight! Ahem...
2015-11-09 20:55:07 +00:00
Jonathan Li
9bb990e9ed Revert "gsdx|spu2-x: Use atlcomcli.h for CComPtr definition"
This reverts commit 0eb771c2a6.

The buildbot apparently cannot find atlcomcli.h. Oh joy.
2015-11-08 20:46:41 +00:00
Jonathan Li
49ff324882 Merge pull request #955 from turtleli/replace-comptr-h
gsdx|spu2-x: Use atlcomcli.h for CComPtr definition
2015-11-08 13:27:28 +00:00
Gregory Hainaut
870e799baa memcpy: remove AMD copyright
memcmp comes from zerofrog (him or external) but likely not AMD

https://www.cs.virginia.edu/stream/FTP/Contrib/AMD/memcpy_amd.asm
2015-11-07 15:57:34 +01:00
Jonathan Li
0eb771c2a6 gsdx|spu2-x: Use atlcomcli.h for CComPtr definition
VS2013/VS2015 community includes it, so everything will still compile
for everyone.

Also delete common/include/comptr.h.
2015-11-06 18:52:33 +00:00
Jonathan Li
08dfa20da1 utilities:linux: Add function to change stdout stream
stdout is not necessarily at stdout - at least not after I'm done with it.
2015-10-31 13:50:02 +00:00
Jonathan Li
618ef8b549 pcsx2:linux: Use narrow characters for stdout
Things seem to break when you mix wide and narrow characters.

Plugins messages sent to stdout are now viewable.
2015-10-29 19:09:49 +00:00
Gregory Hainaut
2194685d76 memset-linux: use std memset for memset_8
This memset is only used in the init (to clear the page that will
contains the dynarec dispatcher
2015-10-28 14:25:12 +01:00
Akash
cfd02bff53 Utilities: Initialize all class members
CID 147010 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)4. uninit_member: Non-static class member Enabled is not initialized in this constructor nor in any functions that it calls.
2015-10-25 14:11:34 +05:30
Gregory Hainaut
4f86cca306 common: don't return a boolean for an assert
It might help to fix those 2 coverity reports.

CID 151744 (#1 of 1): Useless call (USELESS_CALL)
side_effect_free: Calling EnumAssert(id) is only useful for its return value, which is ignored

CID 151745 (#1 of 1): Useless call (USELESS_CALL)
side_effect_free: Calling EnumAssert(id) is only useful for its return value, which is ignored.
2015-10-17 11:49:04 +02:00
Avi Halachmi (:avih)
75b2406997 macros: fix pxReleaseCode (was inverted), add pxNonReleaseCode
pxReleaseCode was not used at the code so nothing is affected.
pxNonReleaseCode will be used at the next commit.
2015-10-07 04:08:09 +03:00
Gregory Hainaut
927dd827ce common: make DESTRUCTOR_CATCHALL macro really exception safe
Console.Error() can trigger some exceptions (like out of memory)

v2:
Add a default fallback catch(...) in case someone badly add a new
exception in the codebase
2015-09-25 18:41:19 +02:00
Gregory Hainaut
2eb73644e9 pcsx2|common: use DESTRUCTOR_CATCHALL to catch exception in various destructor
Allow to print a nice error message instead of a brutal abort in case of
massive failure
2015-09-23 09:47:27 +02:00
Gregory Hainaut
8083b2c754 common: init values in the constructors of SpatialArrayReserve and pxStaticText 2015-09-23 09:47:27 +02:00
Gregory Hainaut
2c914b9b8f common:FastFormatString: remove unimplemented m_Length 2015-09-23 09:47:27 +02:00
Gregory Hainaut
a6c29a5061 common: always set a default color in trace log 2015-09-23 09:47:27 +02:00
Gregory Hainaut
3064d0c300 common: init m_handled in the SrcType_PageFault constructor
Coverity:
CID 147021 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)i
2. uninit_member: Non-static class member m_handled is not initialized in this constructor nor in any functions that it calls.
2015-09-23 09:47:27 +02:00
Gregory Hainaut
b60dd9d1fe Merge pull request #814 from PCSX2/coverity-qa-high
Fix a bunches of coverity warning/errors.
2015-09-20 22:18:03 +02:00
Avi Halachmi (:avih)
d10bbb73f7 FixedInt - round instead of truncate on construction
This could have caused issues where e.g. Fixed100(59.94) differed from
Fixed100::fromString("59.94") due to precision compilation flags
(the former could, and did on Devel builds, end up with Raw == 5993, which
differs from the value constructed from the string at the ini file,
and then it would be incorrectly identified as a custom rate).

Rounding seems the more likely intention when effectively decreasing the
precision of a value.

Unlikely that we have code which depends on truncating behavior, though not
impossible.
2015-09-17 00:30:08 +03:00
Jonathan Li
67dc65ea91 linux: Fix _aligned_realloc implementation
Out-of-bounds memory is no longer accessed if the realloc size is larger.
If reallocation fails, the old memory will not be freed and a memcpy
will not take place.

This should match the Windows _aligned_realloc behaviour, except that an
extra parameter is used.
2015-09-13 21:05:33 +01:00
Pistachioman
3df5c2835e Remove useless postBuild stuff 2015-09-13 04:31:41 -04:00
Miguel A. Colón Vélez
f1cb2cfa35 Fix segmentation fault with the new libstdc++ ABI.
Local variable goes out of scope and everything goes boom.
2015-09-12 17:35:45 -04:00
micove
53680d538d Merge pull request #817 from micove/GIT_TZ
Fix git version detection.
2015-09-12 06:33:00 -04:00