804 Commits

Author SHA1 Message Date
Gregory Hainaut
39dc8368fa x86emitter: add GetPrefix16 helper 2016-01-17 00:12:21 +01:00
Gregory Hainaut
be0b8cf2f5 x86emitter: implement some function to emit the REX prefix
Same fashion as EmitSibMagic
2016-01-17 00:10:21 +01:00
Gregory Hainaut
53b5ecf34a x86emitter: add the new x86_64 registers set 2016-01-17 00:10:21 +01:00
Gregory Hainaut
366f793cf0 core: use xRegisterLong instead of xRegister32
Code needs to work with xAddressReg however the x32 inheritance doesn't
exits anymore on 64 bits.

Note: it might be possible to uses some kind of autoconversion with
xRegister32or64. Could be a future improvement.
2016-01-17 00:10:21 +01:00
Gregory Hainaut
1328865279 x86emitter: xAddressReg size will depend on the arch
Note: displacement are never 8B. The max is 4B which is sign extended to 8B.
So we can't store a pointer into it anymore.

Add xRegisterLong that will be x64 on 64 bits and x32 on 32 bits
2016-01-17 00:10:21 +01:00
Gregory Hainaut
a865ba8cf5 x86emitter: add various type for 64 bits 2016-01-17 00:10:21 +01:00
Gregory Hainaut
2fea78a6c4 x86emitter: remove not virtual inherited function
IsSIMD isn't virtual
2016-01-17 00:10:21 +01:00
Gregory Hainaut
6ec7d2c340 x86emitter: ease template stuff 2016-01-16 14:34:00 +01:00
ramapcsx2
aafa333355 added the profiler to the visual studio solution. also added preliminary cop1 (fpu) tables, ready for implementation 2016-01-15 00:26:52 +01:00
Gregory Hainaut
a7a8c542f5 Merge pull request #1100 from PCSX2/recompiler-abi-wrapper
Recompiler abi wrapper
2016-01-14 19:21:27 +01:00
Gregory Hainaut
3c528f0fdd common define _32kb and _4kb 2016-01-11 18:00:25 +01:00
Gregory Hainaut
6e66bea152 x86emitter: improve the various abi wrapper
V2:
* Add various option to handle the different frame
* Basic x86-64 port (untested so likely completely broken)

v3:
Create an templated xImpl_FastCall object

v4:
clang compilation fix
2016-01-11 09:21:32 +01:00
Gregory Hainaut
a6eb871b42 pcsx2: use a common general intrin include
Avoid issue with various compiler conversion
Fix build with GCC4.8
2016-01-11 09:13:52 +01:00
Gregory Hainaut
afdf5cdfe2 x86emitter: remove old unused macro
Add some notes for a GCC "bug"
2016-01-10 16:49:50 +01:00
Gregory Hainaut
92d7639267 profiler: add functions to plug linux Perf Event on JIT
Basically it creates a /tmp/perf-`pid`.map file which will contains
a mapping of the x86 code with the EE/IOP/VU code

* You need to enable the profiler with a define
* You can split the profiling by block (inside a recomp buffer)

v2: add new file to VS xml files
v3: remove useless include
2016-01-10 13:42:59 +01:00
Gregory Hainaut
50c7cb1717 x86emitter: implement some BMI instructions
Only a couple of one to do some memory profiling
2016-01-09 23:29:01 +01:00
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 9bb990e9ed9948a2a6f6fba8922cd6e715b7760d.

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 0eb771c2a672d0880246aaf6f2ca7c499eb345b4.

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