Commit Graph

37 Commits

Author SHA1 Message Date
Tellow Krinkle cd813edb1b x86emitter: Remove deprecated codegen functions
Successfully moved off of all of them
2020-08-24 16:20:09 -05:00
Tellow Krinkle dc57270fb8 EE/IOP/VU: x86-64 recompiler support 2020-08-24 16:20:09 -05:00
tellowkrinkle 4f56db9f18
Fix codegen on x86-64 (#3512)
Fix codegen on x86-64

Part 1 of the changes being worked on in #3451

Makes x86emitter emit the x86-64 machine code you would expect it to

Also adds some unit tests to verify that things are working
2020-08-19 09:19:28 +01:00
Shanoah Alkire de1717c1a1 Switch a bunch of 64 bit #ifdef's to use the cross-platform 64-bit define I added into Pcsx2Defs.h. 2019-06-18 22:08:43 -07:00
Clang Format 1fba5cb580 reformat main common directory
Disable some reformat around emitter registers declaration and a massive cases.
2016-11-12 16:52:49 +01:00
Gregory Hainaut cc68776069 pcsx2: manually cast function pointer to void*
Templace is nicer but give a hard time to compiler.

New version compile in both gcc&clang without hack

v2: add an uptr cast too for VS2013 sigh...
v3: use an ugly function pointer cast to please VS2013
2016-08-17 09:53:30 +02:00
Gregory Hainaut 5140a2e107 x86emitter: remove MMX support 2016-02-08 09:13:24 +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 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 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 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 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
Jake.Stine 8375b0a989 Refactoring:
* Added __fi and __ri, which are abbreviations for __forceinline and __releaseinline.
 * Added some static qualifiers to functions in mVU, MMI ops, and others where appropriate.
 * Removed some unnecessary __fastcall qualifiers (since GCC gets funny sometimes when you combine __fastcall and inlining).
 * Made _1mb, _16mb, _1gb values common to all emulation code (moved from newVif/mvu to Common.h) -- they're useful! :)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3624 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-08-09 04:10:38 +00:00
Jake.Stine 688674bed9 Emitter: Major refactoring / renaming job. Improved type checking and usefulness of xAddress* (Void, 32, 64, etc) types.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3397 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-07-05 19:15:19 +00:00
Jake.Stine 70d47bf240 Copyright 2010 : PCSX2 and plugins! (notable exception: didn't update copyright info in any Gabest plugins)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2937 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-03 14:08:02 +00:00
sudonim1 4457fe40fc Removed all trailing whitespace in *.c *.cpp *.h because it irritates me.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2897 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-04-25 00:31:27 +00:00
Jake.Stine ae64b98e6a Emitter code cleanups, and re-added GCC 4.4.x code I accidentally removed in a prev rev.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2148 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-11-07 15:46:09 +00:00
Jake.Stine 2b5964199c Emitter rewrite, part 4 of 5: De-templificated all x86 base integer operations.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2142 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-11-06 21:45:30 +00:00
Jake.Stine fcdb429bb9 Emitter Rewrite, Part 3 of 5: Finished all SIMD instructions, except those embedded into base instruction groups (CMPSS/SD, DIVSS/SD, etc).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2135 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-11-05 23:39:45 +00:00
Jake.Stine d868edc17c Recompiler Bugfix: for crashes in Ace Combat 4, and likely other games that use COP2 extensively.
Explanation: EBP was being used by mVU macro-mode (COP2), which violated the new EErec aligned stack setup.  ie, register/stack corruption resulted.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2123 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-11-03 20:35:40 +00:00
Jake.Stine 24d6221141 * More MXCSR fixes (roundmode / DaZ / FtZ).
* Fixed a bug in the Full-mode FPU recompiler.
 * Added some better error handling to the BIOS Rom loader.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2117 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-11-02 19:56:38 +00:00
Jake.Stine ada3d9ed8a Emitter rewrite, Part 2 of 5: Converted SSE comparisons and SSE conversions to constructor-less structs.
(also includes some header file prepwork for my next wxWidgets windows.h commit fix)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2069 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-24 21:43:28 +00:00
Jake.Stine 6fdaea2c79 Emitter rewrite, part 1 of 5 (or so...): Re-tooled SSE arithmetic instructions to be class/template free.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2067 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-24 19:06:11 +00:00
Jake.Stine 51999656ab aligned_stack: Implement full compliment of stack alignment options for the IOP (untested in gcc/linux yet); and fix a compiler error in MSVC.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/aligned_stack@2048 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-21 07:10:30 +00:00
Jake.Stine 54f8f33257 aligned_stack: Linux has never worked so well!
* made a workaround for some obscure GCC templating bug
 * Fixes the assert from PersistentThread when starting the emu

git-svn-id: http://pcsx2.googlecode.com/svn/branches/aligned_stack@2047 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-21 02:23:42 +00:00
Jake.Stine 2cb8e571cd Second half of __unused removal -- comment out (remove) names on unused parameters as per the guidelines of some C guideline that all compilers adhere to (this suppresses the same warnings __unused used to suppress).
Minor cleanups to Counters/Gif.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2038 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-19 11:53:18 +00:00
arcum42 29e8fe94e9 Change a few project options and get rid of _unused.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2036 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-19 10:42:36 +00:00
Jake.Stine e1c89dacdb Bind the cdvd's newDiskCB properly when changing CDVD sources; and more jASSUME->pxAssert change-overs.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1953 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-04 15:34:40 +00:00
Jake.Stine d2fbb22076 Upgraded PCSX2 core and utilities to GPLv3.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1783 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-09-08 12:08:10 +00:00
Jake.Stine e25db2a0ba wxgui: sync with trunk (boooring)
git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxgui@1660 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-08-20 16:19:33 +00:00
Jake.Stine da691894c3 wxgui branch: Maintenance merge against trunk, plus many cleanups and project-level changes.
* Moved the x86 emitter to /common, so that plugins can link against it if they wish.
 * Created a new "utility" class in /common which houses string utils, fast memcpy, common exception classes, and other handy dandies.
 * Removed old-style linux automake files from the pcsx2 dir since they were hopelessly out of date (and their multi-file-per-line format makes svn merging impossible >_<)

git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxgui@1454 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-07-03 00:49:40 +00:00