Commit Graph

122 Commits

Author SHA1 Message Date
Gregory Hainaut 5611333c29 PCSX2: remove reporting of mmx/3dnow 2016-02-08 09:16:52 +01:00
Gregory Hainaut 5140a2e107 x86emitter: remove MMX support 2016-02-08 09:13:24 +01:00
Gregory Hainaut d59e4ca4d1 intrinsic: add rotate support for clang.... 2016-02-01 18:46:10 +01:00
Gregory Hainaut 9e773ff980 Merge pull request #1123 from PCSX2/emitter-Trex
Emitter trex
2016-01-21 22:32:37 +01:00
Gregory Hainaut a2a23579bd Merge pull request #1122 from PCSX2/emitter-64b
Emitter 64b
2016-01-21 22:31:01 +01:00
Gregory Hainaut 1a700145ec x86emitter: remove unused FPU opcode
Future code would rely on SSE anyway
2016-01-20 10:23:23 +01:00
Gregory Hainaut 41a80fce20 x86emitter: finally support 64 bits instructions
Note: a couple of instructions don't support REX prefix. Some
exception ought to be implemented later
2016-01-17 17:02:38 +01:00
Gregory Hainaut a9864a5619 x86emitter: create xOpAccWrite handy template for special accumulator opcode 2016-01-17 12:34:28 +01:00
Gregory Hainaut d2436fa86d x86emitter: remove unused function 2016-01-17 12:07:41 +01:00
Gregory Hainaut f2ecfc99ad x86emitter: align EmitRex interface on EmitSibMagic 2016-01-17 12:06:08 +01:00
Gregory Hainaut e50e9a5e65 x86emitter: sed/32orLess/64orLess/ 2016-01-17 00:29:19 +01:00
Gregory Hainaut 395d43fd9c x86emitter: jump: use base type directly
which fix 16 bits call (no prefix)
2016-01-17 00:21:05 +01:00
Gregory Hainaut 968af6148e x86emitter: extend SSE instruction type 2016-01-17 00:21:05 +01:00
Gregory Hainaut 4bc9cbc24f x86emitter: extend lea/bswap 2016-01-17 00:21:05 +01:00
Gregory Hainaut eb4db2152c x86emitter: add x64 to push/pop 2016-01-17 00:21:05 +01:00
Gregory Hainaut ef21a8dbd0 x86emitter: extend group8 type 2016-01-17 00:21:05 +01:00
Gregory Hainaut 39a6bda52d x86emitter: extend test & bitscan type
Factorize the code to support any types
2016-01-17 00:21:05 +01:00
Gregory Hainaut e285036455 x86emitter: shift: extend it to 64 bits type 2016-01-17 00:21:05 +01:00
Gregory Hainaut fdaf0e9979 x86emitter:group: uses base type
Add 64 bits support for free ;)

Note: 64b still requires the REX prefix
2016-01-17 00:21:05 +01:00
Gregory Hainaut e2602b3967 x86emitter:move: factorize type and extend it to 64 bits
It's still missing the REX prefix support
2016-01-17 00:21:05 +01:00
Gregory Hainaut 41f509873d x86emitter: extend xIndirect32orLess to support 64 bits
It would be renamed later to avoid conflict with pending updates
2016-01-17 00:12:31 +01:00
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
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 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 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 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
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 d5efd6eacb x86emitter: remove the never called SIMD_ExceptionTest function 2015-11-28 22:02:08 +01:00
Gregory Hainaut 92dae56ff8 common: fix gcc warning
Macro is already declared in intrin header file
2015-08-16 14:04:30 +02:00
Sacha b2738fdd5b Remove 3dnow (unused, obsolete).
Greg: merge the removal of EMMS stuff
2015-02-27 21:12:34 +01:00
Sacha 378556c0c2 Remove two unused files in emitter, inlines.inl and macros.h 2014-08-27 22:40:26 +10:00
Ryan Houdek b4771030d3 Fix a couple issues in the x86emitter on x86_64.
This won't fix the billions of errors that will happen at runtime of using the x86 emitter, but chooses to make some better coding practice choices
that enables it to compile on x86_64.

in the xIndirectVoid class, instead of using s32 for the offset, use sptr which will be 32bit or 64bit depending on architecture.
This also fixes a few alignment issues in xAddressVoid's constructors.

In EmitSibMagic we are casting a void* to s32, which won't work on x86_64, so first do a cast from sptr to s32.
Won't work on x86_64, but gets us compiling.
2014-07-31 09:01:56 -05:00
Ryan Houdek 8c746302a2 Fix NOT32M function declaration.
Use uptr as the argument since it is either u32 or u64 depending on architecture.
2014-07-15 15:05:46 -05:00
ramapcsx2 ecb42cad9b Thanks Bluefire101 for reporting this (eventually) undefined behavior (depending on who you ask).
Even if there was no problem, code should always be clear on what it does.
2014-07-01 15:43:26 +02:00