Commit Graph

663 Commits

Author SHA1 Message Date
Gregory Hainaut 5b3f031654 cmake: fix commit f3a50a01a7
* link common with c lib (required for gold linker)
* fix the macro to properly set the library variable
  => use the variable instead to hardcoded value
2014-09-24 09:02:56 +02:00
Gregory Hainaut fd7b692d00 Merge pull request #251 from xsacha/memzero_ptr
Remove redundant memzero_ptr. All compilers use SSE implementation
2014-09-21 17:15:54 +02:00
Gregory Hainaut 47cafaaa7c windows build: fix typo introduced in bf7c29e4cd 2014-09-20 09:59:23 +02:00
Sacha bf7c29e4cd Disable memcmp_mmx for non-msvc compilers and 64-bit. Remove MemcpyFast.S (Linux). 2014-09-16 17:53:54 +10:00
Gregory Hainaut 27992b16c2 common: fix std type define on windows 2014-09-12 20:41:28 +02:00
ramapcsx2 98d22f8b2e Merge pull request #215 from xsacha/memcpy
Remove some slow, redundant memcpy implementations: memcpy_const/memcpy_...
2014-09-12 19:57:57 +02:00
Gregory Hainaut b9e6024fe9 Merge pull request #282 from xsacha/emitter-cleanup
common: Remove two unused files in emitter, inlines.inl and macros.h
2014-09-12 19:30:34 +02:00
Gregory Hainaut 2d4b6273f0 Merge pull request #276 from xsacha/defs-cleanup
pcsx2: require C99 standard for stdint
2014-09-12 19:24:08 +02:00
uyjulian f3a50a01a7 cmake: Use previous macros in CMakeLists.txt files
Gregory: add a c lib for zzogl-pg-cg replayer
2014-09-05 20:16:23 +02:00
Gregory Hainaut 80df352711 Merge pull request #211 from xsacha/intrinsics
Remove pre-gcc4.1.0 code and a bunch of functions that were never used.
2014-08-28 20:23:55 +02:00
Sacha 378556c0c2 Remove two unused files in emitter, inlines.inl and macros.h 2014-08-27 22:40:26 +10:00
Sacha b47a4da81f Use 64-bit compatible rdtsc for Linux. Remove some more intrin_x86 functions. 2014-08-27 18:49:44 +10:00
Sacha ad3b76c4d8 Remove all custom memcpy usage from core pcsx2 and remove memcpy_fast from plugins. 2014-08-27 13:45:23 +10:00
ramapcsx2 9168c344b1 Use generic memcpy from now on. Tests show generics are good enough now.
It should be a speedup even on modern CPUs.
2014-08-26 01:02:23 +02:00
Sacha 90e59b2704 Clean up the type defines in pcsx2.
The non-stdint fallback was not even working which shows that it was never used. No supported platform would not have stdint anyway.
Remove unused code and do not restrict types to Linux and MSVC. Was there a reason for this?
2014-08-25 16:16:34 +10:00
Sacha 999eb83de8 Remove unused _InterlockeD* functions. 2014-08-25 04:57:03 +10:00
Sacha 7a260c9885 Remove redundant memzero_ptr. All compilers use SSE implementation anyway. 2014-08-17 23:23:55 +10:00
Sacha f542c7232e Use __builtin_unreachable where possible for non-msvc 2014-08-15 14:43:52 +10:00
Sacha a3bc6a73a3 Remove some horrible old code.
Remove an assert define and instead use the static_assert that all compilers provide.
As an added bonus, assert messages\!
2014-08-13 13:55:32 +10:00
Sacha f0af6460a1 Remove pre-gcc4.1.0 code and a bunch of functions that were never used. 2014-08-13 13:08:19 +10:00
Ryan Houdek 3d37a6ce27 Removes the usage of __LINUX__ define
This is defined and set it a ton of different places.
It's checked in a whole lot more
Instead just use __linux__ like a real project should
2014-08-03 13:20:36 -05:00
Gregory Hainaut 82c7bcd761 wx3.0: compilation fix for arch linux
* Manually cast WxGetTranslation
* Accept string as format parameter of pxWindowTextWriter
* Manually convert wxString to wide string

Note: Wx setup.h is not the same between Debian and Arch. Unfortunately it
generated various compilations errors on wx code.

Close issue #172
2014-08-03 14:54:44 +02:00
Gregory Hainaut e99540554a wx3.0: clang complains about support of reference in varargs 2014-08-03 14:43:08 +02:00
Pseudonym 3e65c1d0a3 Just killing a couple of latin-1 characters my editor was complaining about. 2014-07-31 16:17:37 +01:00
Pseudonym e25ad9759a Merge pull request #178 from Sonicadvance1:x86_64-cpudetect
Support grabbing the MXCSR mask on x86_64.
2014-07-31 16:14:49 +01:00
Ryan Houdek 06ccc0121f Support grabbing the MXCSR mask on x86_64.
Instead of using some dynamic code to grab the FXSave information, use an intrinsic if on at least MSVC 2012.
With GCC just use a bit of ASM, and if on MSVC 2010 or older, use the old crappy method.

This method can be removed once MSVC 2010 support is dropped and mandate at least MSVC 2012 minimum.
2014-07-31 10:11:25 -05:00
Pseudonym 03bfffea23 Merge pulled request #174 from Sonicadvance1/x86_64-emitter-fixes
Fix a couple issues in the x86emitter on x86_64.
2014-07-31 15:43:35 +01: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
Lioncash ac558afc8a Remove 'elif' define from Pcsx2Defs and microvu_misc.h 2014-07-30 23:44:04 -04:00
sudonim1 904f5de1ea Merge pull request #144 from Sonicadvance1/fix-BitScanFoward
Fix the BitScanForward implementations for x86_64.
2014-07-30 18:19:19 +01:00
Gregory Hainaut 6485bd89d9 common: drop remaining of HashMap
Ryan Houdek removes all use of this code.

Let's remove the left-overs too, beside it will removes the sparsehash depencency
2014-07-29 21:06:31 +02:00
Gregory Hainaut 76237955c7 wx3.0: fix various string printing on linux
wide-char must use %ls format on linux. Don't rely on non standard %s/%S
2014-07-29 20:45:44 +02:00
Gregory Hainaut d5d19acb3f wx3.0: lots of cast...
Various string as still wrong but at least it can be compiled now.

I think the remaining issue are w_char with %s format (at least on linux)
2014-07-29 20:45:44 +02:00
Gregory Hainaut fded22e1b3 wx3.0: extend logger to support wxString as input
Note: only enabled it on 2.8 for windows (because of UTF8 linux is fine)
2014-07-29 20:45:44 +02:00
Gregory Hainaut 91afc2079c wx3.0: force wide char as expected
Note: on linux it would be better to force everythings to use UTF8
2014-07-29 20:45:43 +02:00
Pseudonym 28227ea4c4 Merge pull request #123 from Sonicadvance1/fix_interlockedbittestandresetset
Fixes interlockedbittestandreset/set in intrin_x86.h
2014-07-29 14:20:13 +01:00
Forrest McDonald 81458912f9 pcsx2: remove template and pointer on overload function from wxGuiTools
Fixed clang build.

Note from Gregory:
C++ requests that at least 1 parameters is a class, an enumeration, or a
reference to those objects. Probably to avoid to screw basic type operation.
For example: *p += 4;

The realy buggy code was this one because T could be an int!
template T
f(*ptr, T)

To avoid any issue in the future the Team decide to drop all overload that use pointers.
2014-07-18 19:20:53 +02:00
Ryan Houdek 0c1087a2e5 Remove HashTools::IHashable/CommonComparisonClass
These are no longer used.
2014-07-15 22:08:11 -05:00
Ryan Houdek abd605a066 Remove HashTools::HashSet.
This is no longer used.
2014-07-15 22:07:03 -05:00
Ryan Houdek 5bd06d3a02 Remove HashTools::HashMap/SpecializedHashMap
These are no longer used. Wipe them out.
2014-07-15 22:05:36 -05:00
Ryan Houdek 264cce2003 Also remove UnicodeDictionary.
This class isn't used anywhere and we should promote usage of std::unordered_map instead of this class
2014-07-15 21:01:30 -05:00
Ryan Houdek 79dd0958d0 Remove the pxDictionary class since it is no longer needed.
This was only used by the game database, which has now been changed to an unordered_map
2014-07-15 20:58:25 -05:00
Ryan Houdek 2a6656050c Fix the BitScanForward implementations for x86_64. 2014-07-15 18:13:32 -05:00
sudonim1 6f0f7ce948 Merge pull request #110 from Sonicadvance1/hashmap_64bit
Support 64bit address hashing in the CommonHashClass.
2014-07-15 23:15:03 +01:00
sudonim1 7a1ebd22ed Merge pull request #135 from Sonicadvance1/jmp_emitter
Change the x86emitter jmp emitter from using s32 to sptr.
2014-07-15 22:16:04 +01:00
Ryan Houdek 5114b37bfa Change the x86emitter jmp emitter from using s32 to sptr.
This doesn't change anything on x86_32, but it is required on x86_64 so we don't lose precision.
Also adds an assert to see if the distance is greater than the maximum 32bit jump, which can't be hit on x86_32, but can be on x86_64.
2014-07-15 15:16:30 -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
Ryan Houdek 48d178886e Fixes interlockedbittestandreset/set in intrin_x86.h
This doesn't update the file to the latest version from mingw32 since this is already a custom header stripped from mingw32.

This also fixes the functions for x86_64(verified that it still works for both architectures) and also updates the version inside of GSdx.
Also removes a comment in the GSdx header saying that these functions are broken since they no longer are.
2014-07-14 21:20:31 -05:00
Forrest McDonald b24d4cce8d Clang doesn't support some flags that GCC does, so conditionally check the compiler and add them if we are doing a GCC build 2014-07-14 13:54:31 +02:00
Gregory Hainaut c60fefa1a6 gcc: support address sanitizer 2014-07-12 19:57:26 +02:00