Commit Graph

2198 Commits

Author SHA1 Message Date
comex ad95454d04 Merge pull request #2223 from phire/imm
Cleanup OpArg, make immediates more explicit.
2015-04-23 01:53:18 -04:00
Lioncash b0613bb1c8 General: Apply the const specifier where applicable 2015-04-15 02:04:03 -04:00
comex 5fff97f3f4 Fix printf width in TraversalServer. 2015-04-13 02:26:52 -04:00
degasus ef6bdf674f Common: Remove TLS usage in GetLastErrorMsg
Just return std::string as this code isn't performance critical.
2015-04-07 22:42:21 +02:00
Jordan Cristiano 4051da75e4 Made cycle count atomic to avoid using a mutex 2015-03-31 04:09:33 -04:00
Lioncash eacf741051 DolphinWX/Common: Change some find_first_of usages to find
It's unnecessary to use find_first_of when all you're searching for is a single character.
2015-03-24 08:32:44 -04:00
Sintendo c19482c9a3 Add function to emit CMP, or TEST when possible
Also, a spelling mistake.
2015-03-22 17:22:27 +01:00
magumagu 52aeab3d0e Merge pull request #2240 from lioncash/emitter
x64Emitter: Remove emitter pointer parameter from WriteNormalOp.
2015-03-20 22:09:11 -07:00
Lioncash fab7add718 x64Emitter: Remove emitter pointer parameter from WriteNormalOp.
It only ever passed the equivalent of the class' this pointer. May as well get rid of it.
2015-03-20 23:28:36 -04:00
skidau 39c41f5c70 Merge pull request #2192 from Tilka/sse2
VertexLoaderX64: support SSE2 as a fallback
2015-03-21 12:58:24 +11:00
magumagu 31add72dee Merge pull request #2237 from lioncash/round
x64FPURoundMode: Make a look-up table static
2015-03-19 10:59:22 -07:00
Lioncash e57201eb71 x64FPURoundMode: Make a look-up table static
Since it's only a look-up table, this doesn't need to be recreated every time the function is called.
2015-03-19 09:07:36 -04:00
Tillmann Karras 9793fed742 XEmitter: add PUNPCKLQDQ 2015-03-18 12:09:06 +01:00
mathieui 8201a52cec Traversal: Use a decent PRNG instead of rand()
we don’t need cryptosecure random, but having a uniform distribution is
always better.
2015-03-18 10:16:11 +01:00
mathieui e0ef8fc03f NetPlay: Make the enet interrupts work
Otherwise, it would work but any async sending would be delayed by 4ms or
wait until the next packet was received.

Also increase the client timeout to 250ms, since enet_host_service is now
really interrupted.
2015-03-18 10:16:11 +01:00
mathieui 44d7207a1c NetPlay: add a Common/ENetUtil namespace
Move WakeupThread in it
2015-03-18 09:23:44 +01:00
Ryan Houdek 297012ddd7 Fix Wii configuration path being incorrect.
On loading the NANDRoot from the config, if it isn't set it will still attempt to be set.
So on the invalid empty path, just don't set it.
2015-03-17 21:27:40 -05:00
Scott Mansell 858ff69c01 Make OpArg.offset and operandReg private.
Also cleaned up WriteRest function.
2015-03-17 18:49:30 +13:00
Scott Mansell 6262a9bcbe Make immediates more explicit
Instead of just casting OpArg::offset when needed, add some
accessor functions.

Also add some safety asserts to catch any mistakes.
2015-03-17 18:49:26 +13:00
Lioncash c73cac3ee9 Merge pull request #2220 from shuffle2/win-con-listener
[windows] Replace ConsoleListener, which was not actually used.
2015-03-16 02:03:27 -04:00
Shawn Hoffman 78be0ab9ad [windows] Just kill ExtendedTrace.
The code is not really worth saving, and afaik it has never actually been helpful.
2015-03-15 22:30:38 -07:00
Shawn Hoffman 0a79b6d5a7 [windows] Remove ConsoleListener, which was not actually used.
Replace it with the DebuggerLogListener.
2015-03-15 22:11:18 -07:00
Ryan Houdek 5e0b9179db Merge pull request #2186 from Sonicadvance1/aarch64_optimize_paired_slowmem
[AArch64] Optimize slowmem paired stores.
2015-03-15 14:37:21 -05:00
Ryan Houdek bcc434095d Merge pull request #2212 from Sonicadvance1/fix_user_paths
Fix user directories at times doing stupid things.
2015-03-15 09:45:02 -05:00
Ryan Houdek aaf04aeaca Fix user directories at times doing stupid things.
With my previous changes Dolphin would fail to create the user directory if it didn't exist, and would dump all the configuration options in to the cwdir.
This was a bit more complicated to fix in a clean fashion, so I took to moving around code concerning user directories.
Instead of having GetUserPath serve a dual purpose of both getting and setting our user directories, break out to a new SetUserPath function.

GetUserPath will know only get the configured user path.
SetUserPath will set our user paths and setup the internal user path state.

This ending up being a lot cleaner overall, which is nice. Also less mind bending when attempting to read the code.

So now we won't dump all of our configuration in to the cwdir if ~/.dolphin-emu isn't found.

Fixes issue 8371.
2015-03-15 09:19:48 -05:00
Ryan Houdek 5e6d49d96b Merge pull request #2209 from magumagu/remove-hle-opcode
Remove remnants of old fake opcodes.
2015-03-15 07:13:07 -05:00
Rohit Nirmal 48ec42d4a0 Core: Change NULLs to nullptrs. 2015-03-14 20:20:41 -05:00
magumagu 87dcda5785 Remove remnants of old fake opcodes.
These are illegal opcodes, and should be treated as such.
2015-03-14 16:59:12 -07:00
Markus Wick ec8a074690 Merge pull request #2153 from degasus/enet
enet: Search for shared library
2015-03-14 17:23:27 +01:00
skidau 5dc23a93b6 Merge pull request #2169 from magumagu/rect-clamp
Fix clamping for rectangles.
2015-03-12 13:31:51 +11:00
Ryan Houdek f6511c3ba5 [AArch64] Add an assert to SMOV in the emitter.
SMOV doesn't have an encoding for moving a 32bit element to a 32bit GPR.
One should use UMOV if they want that.
2015-03-08 12:29:45 -05:00
Ryan Houdek a9622c247b Merge pull request #2146 from Sonicadvance1/aarch64_optimize_fpr_push_pop
[AArch64] Optimize FPR pushing and popping.
2015-03-08 08:51:45 -05:00
magumagu 863a4c9ce0 Fix clamping for rectangles.
Clamping a rectangle correctly requires fully clamping all four
coordinates in the general case.

This should fix issue 6923, sort of; at least, it fixes the part where a
rectangle ends up with a nonsensical height after being clamped.
2015-03-04 17:15:29 -08:00
Ryan Houdek fbdee7b15f [AArch64] Handle FPR island registers in a less dumb way. 2015-03-03 00:30:05 -06:00
Tillmann Karras a5ea6c6e93 enet: fix Visual Studio files 2015-03-02 22:20:37 +01:00
degasus 691b690afe enet: Search for shared library 2015-03-02 22:18:57 +01:00
Ryan Houdek f1a9db9bdc [AArch64] Stop violating the AAPCS64 so much. 2015-03-02 11:21:15 -06:00
Ryan Houdek fad46729b0 [AArch64] Implemented paired pushing/popping for the VFP.
A bit more efficient if we are only pushing two VFP registers.
We can probably be a bit more efficient in the future by mixing paired loadstores in to the other paths as well.
2015-03-02 06:27:47 -06:00
Ryan Houdek 39e357d62d [AArch64] Implement VFP loadstore paired in the emitter. 2015-03-02 06:27:17 -06:00
Ryan Houdek 8b8310d28c [AArch64] Optimize FPR pushing and popping.
Previously on FPR pushing and popping we would do a single STR/LDR per quad FPR we wanted to push/pop.
In most of our cases when we are pushing and popping VFP registers they will be consecutive registers that will save more efficiently using the NEON
loadstores that can do up to four quad registers.
So this can potentially cutting instructions down to ~1/4th the amount of instructions if the registers are all consecutive.

On the Cortex-A57 this is basically just an icache improvement, but on the Nvidia Denver this may be optimized to be more efficient. Either way it's a
win.
2015-03-02 06:27:13 -06:00
Tillmann Karras 88264f5712 Fix -Wswitch warning 2015-03-01 16:17:32 +01:00
skidau 1dcd0ad879 Merge pull request #2129 from Sonicadvance1/shuffle_user_dir
Move user directory detection location to UICommon.
2015-02-27 14:07:06 +11:00
Ziek 779f275486 Added TraversalServer.cpp to Core/Common 2015-02-25 18:28:27 -08:00
Ziek 619a3a5171 Added all of enet lib, changed Cmake files accordingly 2015-02-25 18:28:27 -08:00
Ziek a629555e6b Added Gui elements in Netplay Setup Diag so a person can choose a traversal server
Fixed bug with UPnP so that it will grab the proper address and protocal
Fixed bug that caused dolphin to freeze when host codes were to large
2015-02-25 18:28:26 -08:00
Ziek 1dea3780a7 Fixed issue where players were not disconnecting correctly 2015-02-25 18:28:26 -08:00
Ziek 074d688884 Change netplay initial gctime to be determined by the hosts initial time 2015-02-25 18:28:26 -08:00
Ziek 4cdc307b87 Moved Traversal Client code over from old netplay
Moved over gui code for copying host code
added gui to netplay diag setup to switch between direct and traversal connection
2015-02-25 18:28:25 -08:00
Lioncash 7408de7e79 Merge pull request #2058 from Stevoisiak/Codemaid-Cleanup-Take2
Basic Formatting/Whitespace Cleanup
2015-02-25 18:07:56 -05:00
magumagu b1fbf205ec Merge pull request #2122 from Tilka/intrinsics
Intrinsics: drop custom _mm_shuffle_epi8()
2015-02-25 10:48:34 -08:00
Stevoisiak 93b16a4a2d Formatting/Whitespace Cleanup
Various fixes to formatting and whitespace
2015-02-25 10:48:21 -05:00
Markus Wick d6ccbb1f9c Merge pull request #2004 from randomstuff/stringutil-c-locale
Use the C locale for non-Windows CharArrayFromFormatV() and StringFromFormat()
2015-02-25 13:17:04 +01:00
Ryan Houdek ca6e154f0b Fix a bug on user path re-assignment.
The Load directory wasn't being properly reassigned when the user path changed, which causes a bunch of issues with things loading from the wrong
place when using the -U option in Dolphin.
2015-02-25 05:45:25 -06:00
Ryan Houdek db06f058e4 Move user directory detection location to UICommon.
The UI should decide on where it wants the user directory, not our core system.
This is in anticipation of some upcoming work on Android which will need proper user directory setting.
2015-02-25 03:31:59 -06:00
Tillmann Karras dd818a3831 Intrinsics: drop custom _mm_shuffle_epi8()
We don't actually use it, because of reasons.
2015-02-24 19:37:16 +01:00
Tillmann Karras 7056f6308a Fix a -Wunused-result warning 2015-02-24 10:29:59 +01:00
Tillmann Karras daf4aa0947 Common: move _M_SSE macro to Intrinsics.h 2015-02-24 01:06:25 +01:00
Tillmann Karras 9aa463c590 Common: move _mm_shuffle_epi8 to Intrinsics.h 2015-02-24 01:06:24 +01:00
Tillmann Karras f298f00e1b Clean up the intrinsics #ifdef mess 2015-02-24 01:02:36 +01:00
Tillmann Karras 56795efd42 Common: add single header for all intrinsics 2015-02-24 01:01:10 +01:00
Tillmann Karras 387777ed72 Fix VTune static library dependencies
Since libcommon.a is also the last library to be linked, this has the
totally hacky but useful side-effect that it doesn't require people to
modify CMake files for temporarily adding VTune code to other Dolphin
libraries.
2015-02-22 20:49:30 +01:00
Fiora c54a8c54fb Merge pull request #1994 from Tilka/vtune
JitRegister: fix VTune integration
2015-02-22 07:58:12 -08:00
Markus Wick 86226cb2b9 Merge pull request #1979 from Mullin/head
Use clock_gettime instead of gettimeofday, it's more efficiency on low power system
2015-02-18 21:54:16 +01:00
Mullin 797fc14414 Use clock_gettime instead of gettimeofday, it's more effiency on low power system
Add def for mac(They don't support clock_gettime)

Fix my mistake

Fix my mistake 2
2015-02-18 21:44:58 +01:00
mimimi085181 f6c9b8243e GetCRC32: Fix the hash for the last byte(s)
This fixes issue 8227
https://code.google.com/p/dolphin-emu/issues/detail?id=8227
2015-02-18 14:26:28 +01:00
Ryan Houdek 120df4c688 [AArch64] Implement loadstore unscaled. 2015-02-16 22:00:43 -06:00
Ryan Houdek 814aaaf538 [AArch64] Implement a couple of emitter instructions.
These will be used with the vertex loader JIT recompiler.
2015-02-13 12:16:06 -06:00
Ryan Houdek 0252bbb33f [AArch64] Fix non-PCH build. 2015-02-13 12:16:05 -06:00
Ryan Houdek 8074d06270 [ARM] Fix poison memory functions.
We were poisoning 4x more data and overrunning our buffers. We don't want to do this.
2015-02-13 12:16:05 -06:00
Ryan Houdek 20dae1f210 [AArch64] Fix a bunch of emitter asserts.
Since I've added the msg handler. I found all these asserts that were backwards. So they were asserting on the correct arguments.
2015-02-13 12:16:05 -06:00
Tillmann Karras 0ec48e0ec9 JitRegister: fix VTune integration 2015-02-12 02:14:49 +01:00
magumagu ac54c6a4e2 Make address translation respect the CPU translation mode.
The PowerPC CPU has bits in MSR (DR and IR) which control whether
addresses are translated. We should respect these instead of mixing
physical addresses and translated addresses into the same address space.

This is mostly mass-renaming calls to memory accesses APIs from places
which expect address translation to use a different version from those
which do not expect address translation.

This does very little on its own, but it's the first step to a correct BAT
implementation.
2015-02-11 13:56:22 -08:00
Gabriel Corona 266d50c811 Use the C locale for non-Windows CharArrayFromFormatV() and StringFromFormat()
The Windows implementations of CharArrayFromFormatV() and
StringFromFormat() use the "C"/".1252" locale instead of the user
locale (using _vsnprintf_l). On non-Windows, the user locale was used.

This leads to bugs on non-Windows: the Overclock parameter was
serialised with the user locale ("0,279322" in some locale) and was
interpreted back as "0" (because the C locale is used for parsing the
string).

Make non-Windows CharArrayFromFormatV() and StringFromFormat()
consistent with their Windows counterpart.

The locale code is not enables for Android:: uselocale is only
available since API 21 and API 21 only supports C and C.UTF-8.
2015-02-04 17:49:22 +01:00
Lioncash e07679114b Use emplace_* functions where in-place construction is preferable 2015-02-04 11:39:08 -05:00
Ryan Houdek a277172b49 Merge pull request #1980 from Sonicadvance1/AArch64_more_optimizations
[AArch64] Minor optimizations
2015-01-30 08:33:19 -06:00
Ryan Houdek 1c388b6c37 Fix clang on x86_64.
If we are compiling in the CRC32 hash, clang has an issue with casting a s32 to a u64.
Change our lens argument to a unsigned integer to fix the issue.
2015-01-29 01:55:20 -06:00
Ryan Houdek 8c53b88cc3 [AArch64] Implement a way to call lambdas in the emitter 2015-01-29 01:50:11 -06:00
Gabriel Corona a4adfe194a JitRegister: overload Register with a [start,end) variant 2015-01-28 09:50:19 +01:00
Gabriel Corona a957f93532 Use printf-like format in JitRegister::Register
The API is cleaner (no more magic default parameter) and more
extensible like this.
2015-01-28 09:47:08 +01:00
Markus Wick 53a9df10f9 Merge pull request #1817 from Armada651/custom-anaglyph
PostProcessing: Add support for user-supplied anaglyph shaders.
2015-01-26 11:08:29 +01:00
Ryan Houdek c340a324bc Merge pull request #1947 from Sonicadvance1/AArch64_tu_tl_merge
[AArch64] Implement TU/TL merging.
2015-01-25 23:07:32 -06:00
Ryan Houdek f24c466e7e [AArch64] Fix AArch64 instruction encoding. 2015-01-25 17:26:18 -06:00
Jules Blok 262c3b19ec PostProcessing: Add support for user-supplied anaglyph shaders.
There are lots of different anaglyph glasses out there and there may be even more creative uses for stereoscopic post-processing shaders.
2015-01-25 22:07:03 +01:00
skidau 0aef1d27aa Merge pull request #1933 from magumagu/intellisense-error-fix
Fix Intellisense error spam on Visual Studio.
2015-01-25 15:44:30 +11:00
magumagu 3aa3002010 Fix Intellisense error spam on Visual Studio.
Intellisense doesn't like defines in PCH files, and it doesn't like the deleted
constructor for BitField.  (I think it's being overly strict about the
"must have no non-default constructors" rule for classes in unions.)
2015-01-23 19:15:25 -08:00
Scott Mansell 75815b9b0d Added a comment to document an issue with the codegen. 2015-01-24 16:08:26 +13:00
Ryan Houdek 6470227a39 [AArch64] Minor fix in the UMULH/SMULH.
These two instructions ignore the register encoded in to RA.
2015-01-22 18:08:49 -06:00
degasus a353ead3cb CustomTexture: Use always safe texture hash 2015-01-21 21:22:55 +01:00
Ryan Houdek 80e6367e46 Merge pull request #1869 from Stevoisiak/GeneralConsistency
Minor consistency changes
2015-01-21 13:46:53 -06:00
Ryan Houdek 217c2c9d6a [AArch64] Add some more scalar VFP ops to the emitter. 2015-01-20 16:34:32 -06:00
Ryan Houdek cb967a6ff2 Merge pull request #1911 from Sonicadvance1/AArch64_paired_loadstores
[AArch64] Implements paired loadstores
2015-01-20 16:33:08 -06:00
Rohit Nirmal e35766cbcd Fix building with PCH disabled. 2015-01-20 17:01:37 +00:00
Ryan Houdek 7376956c92 Merge pull request #1912 from Sonicadvance1/Android_remove_workaround
[Android] Remove posix_memalign workaround.
2015-01-19 15:36:17 -06:00
Ryan Houdek dc95ea2ce6 Minor fix with psq_st{u,}x disassembly. 2015-01-19 10:12:23 -06:00
Lioncash ed58b1fd5b Merge pull request #1913 from Sonicadvance1/fix_paired_store_disassembly
Fixes disassembly of paired store instructions.
2015-01-18 23:27:34 -05:00
Ryan Houdek 596d3fd5f2 Fixes disassembly of paired store instructions.
Someone thought it would be a good idea to have the location as the first argument on the instruction.
Changed it to how it is supposed to be disassembled.
2015-01-18 16:37:43 -06:00
Ryan Houdek 08e50ec6dd [Android] Remove posix_memalign workaround.
Google fixed the issue of posix_memalign not being available. It now works fine in r10d of the NDK.
2015-01-18 16:34:42 -06:00
Ryan Houdek 8d5947efac [AArch64] Emitter improvements.
Adds a bunch of new instructions to the emitter.
2015-01-18 16:25:40 -06:00
Tillmann Karras e80b657cf4 Move MOVBE wrappers directly into XEmitter class 2015-01-18 13:29:34 +01:00
Tillmann Karras eb13aa43fe XEmitter: overload MOVBE() 2015-01-18 12:59:33 +01:00
Stevoisiak cb86db7b68 Minor consistency changes
Mostly small changes, like capitalization and spelling
2015-01-12 15:18:18 -05:00
Tillmann Karras 52b1a54597 MemoryUtil: mention Valgrind in mmap error message 2015-01-12 02:22:05 +01:00
Tillmann Karras f98359ef5c MemoryUtil: add comment for Valgrind
Valgrind doesn't support the mmap() flag MAP_32BIT. Adding a simple
CMake option would force a recompile, so just add this comment.
2015-01-12 02:22:05 +01:00
Ryan Houdek ca3b3adb50 Merge pull request #1849 from Sonicadvance1/AArch64_Emitter_Improvements
[AArch64] Emitter Improvements and additions.
2015-01-11 07:08:02 -06:00
Fiora 5b825e9091 StringUtils: use C locale instead of .1252
Fixes regression on Linux.
2015-01-11 00:15:57 -08:00
Pierre Bourdon 394257f33b Merge pull request #1798 from FioraAeterna/overclock
Support overclocking and underclocking the Gamecube CPU
2015-01-11 06:12:27 +01:00
Fiora 8237004448 JIT: optimize for the common case of unquantized psq_l/st
Optimistically assume used GQRs are 0 in blocks that only use one GQR, and
bail at the start of the block and recompile if that assumption fails.

Many games use almost entirely unquantized stores (e.g. Rebel Strike, Sonic
Colors), so this will likely be a big performance improvement across the board
for games with heavy use of paired singles.
2015-01-10 14:14:43 -08:00
Fiora c2c950108d Support overclocking and underclocking the Gamecube CPU
Won't work with all games, but provides a nice way to spend extra CPU to make
a variable framerate game faster (e.g. Spyro or The Last Story), or to make
a game use less CPU at the cost of a lower framerate (e.g. Rogue Leader).
2015-01-10 10:46:38 -08:00
Ryan Houdek c511ee763a [AArch64] Add the float emitter. 2015-01-08 19:55:31 -06:00
Ryan Houdek 6bc274a968 Merge pull request #1844 from Tilka/sse_mov
x64Emitter: fix MOVLPD/MOVHPD
2015-01-08 19:04:14 -06:00
Markus Wick f0f8384639 Merge pull request #1785 from degasus/custom_texture
VideoCommon: Custom texture handling
2015-01-08 13:29:45 +01:00
Ryan Houdek 5a0133c478 [AArch64] Add a few more VFP register helpers.
Renames Is128Bit to IsQuad to line up more with the other helpers.
2015-01-07 13:05:55 -06:00
Ryan Houdek 2b4f1aed40 [AArch64] Minor shifted register adjustment.
If we have a shift amount that is the full length of the source register then we have an invalid instruction.
This can happen when dealing with a couple of PowerPC instructions.
This same adjustment is already in the ARMv7 emitter.
2015-01-07 13:03:51 -06:00
Ryan Houdek 0a23ca9461 [AArch64] Add MUL/MNEG instruction aliases to the emitter. 2015-01-07 13:03:01 -06:00
Ryan Houdek d2eaba5cb7 [AArch64] Minor MOVI2R improvement.
Use the ZR for both input arguments in the case the immediate is the maximum immediate value.
This allows it to be aliased to MVN when disassembling.
2015-01-07 13:00:39 -06:00
Ryan Houdek 8dba84dd7c [AArch64] Fix 8 & 16 bit loadstore indexes.
I wasn't bit shifting correctly for 8 and 16bit loadstores.
2015-01-07 12:58:37 -06:00
Ryan Houdek f4f59ea71e [AArch64] Fix ADDS/SUBS emitter functions.
These weren't emitting the flag bit. So they were regular ADD and SUB emitters.
2015-01-07 12:56:45 -06:00
Tillmann Karras 1efa9b8b72 x64Emitter: add MOVLPS/MOVHPS 2015-01-07 11:23:52 +01:00
Tillmann Karras 3daa6ab259 x64Emitter: fix MOVLPD/MOVHPD
These instructions were using the wrong prefix which turned
MOVLPD(reg, mem) into MOVDDUP(reg, mem) and made the rest of them
invalid.
2015-01-07 11:23:52 +01:00
Dolphin Bot 89b7f1057f Merge pull request #1804 from FioraAeterna/fastermmu2_master
MMU: various improvements, bugfixes, optimizations
2015-01-07 00:49:58 +01:00
Markus Wick d8d4c94e07 Merge pull request #1819 from Tilka/cmake
CMake: simplify some expressions
2015-01-06 09:27:59 +01:00
Fiora 53b44ccb3a x64ABI: enhance MOVTwo to take an offset
This lets us merge displacements into MOVTwo in trampolines.
2015-01-05 10:45:58 -08:00
Fiora 8a6ea918b6 GekkoDisassembler: fix display of CRs in branch operations 2015-01-03 19:53:55 -08:00
Tillmann Karras 6bcdb10eee CMake: simplify some expressions 2015-01-03 13:17:57 +01:00
Ryan Houdek 479d1e56c3 Merge pull request #1783 from degasus/disablelogs
OGL: disable driver warnings fetch
2015-01-01 14:12:02 -06:00
degasus c6dd5044d6 VideoCommon: make hash independet from hires textures 2014-12-29 10:24:27 +01:00
Markus Wick c5a0b6bf50 Merge pull request #1432 from randomstuff/linux-perf
Add Linux perf JIT support (/tmp/perf-$pid.map)
2014-12-28 23:12:52 +01:00
degasus 1ed41672f5 OGL: disable driver warnings fetch
This did give a decent slowdown on some drivers.
2014-12-28 22:31:24 +01:00
Ryan Houdek 47b67fe527 Merge pull request #1744 from Buddybenj/google-code
Update Outdated Google Code References
2014-12-21 20:55:56 -06:00
Benjamin Przybocki fba3c48ec4 Update Outdated Google Code References 2014-12-20 21:17:51 -06:00
Ryan Houdek d3c2e8fb0a [AArch64] Improvements to the AArch64 emitter.
Fixes issues with negative offsets in loadstore instructions.
Adds ADRP/ADR instructions.
Optimizes MOVI2R function to take advantage of ADRP on pointers, can change a 3 instruction operation down to one.
Adds GPR push/pop operations for ABI related things.
2014-12-20 19:35:52 -06:00
Pierre Bourdon dad7911214 Merge pull request #1486 from rohit-n/goto
Remove some gotos.
2014-12-20 16:47:55 +01:00
Rachel Bryk 6a2973ac1d Fix hires texture path. 2014-12-11 19:24:16 -05:00
Tillmann Karras 6e928d08a0 Jit64: clean up casts in memory operands 2014-12-07 20:23:27 +01:00
Ryan Houdek 4e98078daf Merge pull request #1658 from lioncash/locale
Common: Remove locale based functions from CommonFuncs.
2014-12-07 01:12:00 -06:00
Tillmann Karras 986d19b9d5 x64Emitter: fix bitwise AVX opcodes
The reason this didn't break is that bitwise instructions like VPAND,
VANDPS, and VANDPD do the exact same thing. The only difference is the
data type they are intended for.
2014-12-06 22:28:03 +01:00
Lioncash 9bcadc8029 Common: Remove locale based functions from CommonFuncs.
Since %f isn't used anymore in the shader generators, these can go.
2014-12-05 20:55:29 -05:00
Rohit Nirmal e7ddaf86f5 Fix building with PCH disabled. 2014-12-03 22:01:12 -06:00
skidau 7bc78827ed Merge pull request #1574 from degasus/profiler
Common: Add a built-in profiler
2014-12-04 13:22:31 +11:00
Ryan Houdek 2c39d4044d [AArch64] Add loadstore paired emitter instructions. 2014-12-02 21:08:34 -06:00
degasus 94d9d138d9 Common: Add a built-in profiler 2014-12-03 00:50:41 +01:00
Rohit Nirmal a53c5217bb Common: Remove goto in MemArena. 2014-12-01 11:47:37 -06:00
Rohit Nirmal e3abad234c Common: Remove gotos in FileUtil, and replace FILE*s with IOFile/ifstreams. 2014-12-01 11:47:36 -06:00
Ryan Houdek 414e36d8c9 Merge pull request #1258 from FioraAeterna/avoidfmulround
JIT: optimize single-precision ops based on knowledge of their inputs
2014-11-30 15:47:34 -06:00
Ryan Houdek c27ee21dd9 [AArch64] Workaround builtin byteswap bug.
The builtin byteswap routines cause critical failure on AArch64 when built with the Android toolchain.
I didn't experience this issue when building for Linux using a local qemu chroot.
Seems to be only an issue with the Android toolchain when building AArch64.
Use our generic version instead.
2014-11-30 01:23:03 -06:00
Fiora 72c96c20d3 JIT: more optimizing of float ops based on known input characteristics
If the inputs are both float singles, and the top half is known to be identical
to the bottom half, we can use packed arithmetic instead of scalar to skip
the movddup.

This is slower on a few rather old CPUs, plus the Atom+Silvermont, so detect
Atom and disable it in that case.

Also avoid PPC_FP on stores if we know that the output came from a float op.
2014-11-29 11:33:11 -08:00
Ryan Houdek ce059769f6 Merge pull request #1439 from Armada651/ogl-stereo-3d
OGL: Stereoscopic 3D Support
2014-11-28 11:45:38 -06:00
Lioncash e9b09a4c9f Arm(64)Emitter: Make some variables static 2014-11-25 23:27:48 -05:00
comex 245ff601b7 Merge pull request #1552 from waddlesplash/dolphin-qt
DolphinQt: GameList!
2014-11-25 00:24:32 -05:00
Gabriel Corona 5b9aeaa686 Use CLI argument for Linux perf JIT support 2014-11-24 23:30:29 +01:00
Gabriel Corona 9722ae2a5d Move the JIT registration logic in its own file
Move the JITed function/basic-block registration logic out of the CPU
subsystem in order to add JIT registration to JITed DSP and
Video/VertexLoader code.

This necessary in order to add /tmp/perf-$pid.map support to other
JITed code as they need to write to the same file.
2014-11-24 23:18:18 +01:00
Rohit Nirmal 4d931c16ad Silence a few "zero as null pointer" warnings. 2014-11-24 12:36:46 -06:00
Jules Blok f6ea293027 VertexShaderManager: Compute stereoscopy projection matrices. 2014-11-23 14:23:41 +01:00
Augustin Cavalier 1e17bbce0f DolphinQt: GameList! 2014-11-21 18:36:49 -05:00
Ryan Houdek b24197f913 Adds MCR/MRC to the ARMv7 emitter. 2014-11-16 09:29:27 +00:00
Stevoisiak b25e1a2eb4 Various formatting and consistency fixes 2014-11-13 22:42:18 -05:00
Fiora 6603f98d04 JIT: add 64-bit write support to FIFO functions
Also fix 64-bit values passed to CallAC and otherwise correct immediate
handling in FIFO writes.
Fixes 007 Nightfire.
2014-11-09 21:24:30 -08:00
Lioncash f6b4b4dbba Merge pull request #1497 from lioncash/host
Host: Kill off Host_SysMessage
2014-11-06 20:41:53 -05:00
Lioncash d79c794e8c Merge pull request #1490 from rohit-n/initialize
Common: Fix -Wmaybe-uninitialized warning.
2014-11-06 20:37:32 -05:00
Lioncash 884ec2ed13 Host: Kill off Host_SysMessage
Equivalent facilities already exist.
2014-11-05 02:30:48 -05:00
Rohit Nirmal f361ef1eb3 Common: Fix -Wmaybe-uninitialized warning. 2014-11-03 21:38:42 -06:00
comex 9cba787871 Merge pull request #1408 from randomstuff/perf
Profiling: measure time on non-Windows/POSIX using clock_gettime
2014-11-03 22:36:32 -05:00
Jasper St. Pierre e290a3d39c MemArena: Fix the launching of non-Wii games
When we cleaned up the code to calculate the shm_position and total_mem
in one step, we sometimes skipped over certain views because they were
Wii-only. When looking at the total memory, we'd look at the last field,
whether or not it was skipped. Since Wii-only fields are the last view,
this meant that the shm_position was 0, since it was skipped, causing us
to map a 0-sized field. Fix this by explicitly returning the total size
from MemoryMap_InitializeViews.

Additionally, the shm_position was being calculated incorrectly because
it was adding up the shm_position *before* the mirror, rather than after
it. Fix this by adopting a scheme similar to what we had before.
2014-11-03 11:08:59 -08:00
Jasper St. Pierre f660789254 MemArena: Merge the initialization code with the size calculation code
To make mistakes like in the previous commit less prevalent in the future.
2014-11-02 19:59:14 -08:00
Jasper St. Pierre 5e5ed07b41 MemArena: Fix the calculation of position in SHM
The code to calculate the offsets into the SHM file wasn't properly
respecting the skip flags, causing it to calculate offsets beyond
the end of the SHM file.
2014-11-02 19:25:42 -08:00
Jasper St. Pierre 64540bc60d MemArena: Fix a memory leak caused by pointer confusion
This code was ported from out_ptr, which was a double-pointer, and
wanted to double-check that the proper arena was actually allocated.

When I ported it to store the pointer directly in the view regardless
of whether out_ptr was non-NULL, I got confused here and instead
caused the code to only free the arena if the first byte was non-zero.
2014-11-02 19:25:42 -08:00
Jasper St. Pierre 1e93b0db19 MemArena: Rename GrabLowMemSpace to GrabSHMSegment
This code originally tried to map the "low space" for the Gamecube's
memory layout, but since has expanded to mapping all of the easily
mappable memory on the system. Change the name to "GrabSHMSegment" to
indicate that we're looking for a shared memory segment we can map into
our process space.
2014-11-02 16:51:27 -08:00
Jasper St. Pierre 079b881d20 MemArena: Clean up the code that does the mirroring 2014-11-02 16:51:26 -08:00
Jasper St. Pierre 6813473367 MemArena: Remove the low mappings for our pointers
These are effectively unused, since the memmap already maps them in one
place. For 32-bit, they might have some slight advantage, but we already
special-case the regular "high-mem" pointer for 32-bit, so just use the
one we already have...
2014-11-02 16:50:36 -08:00
Jasper St. Pierre 4a59750b30 MemArena: Bail on Arch64 if the out_ptr allocation fails 2014-11-02 16:34:17 -08:00
Jasper St. Pierre 48aff73b6a MemArena: Remove duplicated code
I can't find any obvious difference between these two paths.
2014-11-02 16:34:17 -08:00
Gabriel Corona 641e820257 Profiling: measure time on POSIX systems using clock_gettime 2014-11-03 00:07:12 +01:00
Tillmann Karras 033f2a7e93 x64ABI: get rid of some duplicate code 2014-11-02 02:00:47 +01:00
Rohit Nirmal a09afe8821 Fix build failing with PCH disabled. 2014-10-29 13:00:48 -04:00
comex 089e32ba7d Merge pull request #1307 from comex/bitset
Higher level bitset wrapper
2014-10-28 23:39:35 -04:00
Jasper St. Pierre d9a1fc1564 BreakPoints: Fix compile warning 2014-10-28 12:22:30 -07:00
skidau 1630b0c684 Merge pull request #1291 from skidau/debugger-step-out
Dolphin debugger enhancements
2014-10-28 12:53:22 +11:00
Ryan Houdek 043bd710a0 Merge pull request #1394 from Sonicadvance1/fix-arm-cpudetect
Fixes ARM CPU detection routine for the hardware.
2014-10-27 05:07:24 -06:00
skidau 4570dd7eeb Fixed a crash that would occur if a new watch were added by entering a watch name.
Code style updates.
2014-10-26 23:23:45 +11:00
skidau 73dca1ca33 Added a new option to add memchecks from the Watch window.
Fixed watch labels from being truncated at the first whitespace.
2014-10-26 16:14:17 +11:00
skidau b73130af77 Added Load/Save function for the Watch window.
Made the floating windows toolbars dockable.
Scaled down the breakpoint toolbar icons to 16x16.
2014-10-26 14:56:03 +11:00
skidau b34e220086 Added a "Delete watch" context menu to the Watch window.
Added a "View memory" command to the context menu.
2014-10-26 14:56:03 +11:00
skidau 613cae613a Added a RAM Watch window to the debugger
Conflicts:
	Source/Core/Core/HW/Memmap.cpp
	Source/Core/Core/HW/Memmap.h
	Source/Core/DolphinWX/Debugger/CodeWindow.h
2014-10-26 14:56:02 +11:00
skidau df37649b9f Changed the step over routine to a single stepping version that steps until a blr is encountered.
Cleared out all temporary breakpoints on each step to prevent phantom breakpoints from stopping the debugger.
2014-10-26 14:56:02 +11:00
comex 5f21683343 Merge pull request #1388 from waddlesplash/dolphin-qt
DolphinQt: About dialog fixes, SystemInfo dialog
2014-10-25 21:20:02 -04:00
comex f51c233a08 Add workaround for OS X symbol clash and AllOnes helper method. 2014-10-25 16:57:25 -04:00
comex eb7f4dac50 Convert registersInUse to BitSet. 2014-10-25 16:57:25 -04:00
comex b6a7438053 Add BitSet and, as a test, convert some JitRegCache stuff to it.
This is a higher level, more concise wrapper for bitsets which supports
efficiently counting and iterating over set bits.  It's similar to
std::bitset, but the latter does not support efficient iteration (and at
least in libc++, the count algorithm is subpar, not that it really
matters).  The converted uses include both bitsets and, notably,
considerably less efficient regular arrays (for in/out registers in
PPCAnalyst).

Unfortunately, this may slightly pessimize unoptimized builds.
2014-10-25 16:56:51 -04:00
comex 4b0c6d8e0f Merge pull request #1385 from lioncash/bitfield
BitField: Fix a typo in the sample usage.
2014-10-25 16:48:31 -04:00
Ryan Houdek 3ac2d8e1f1 Revert "Removes ARMv7 specific byteswap routines from CommonFuncs.h" 2014-10-25 15:28:04 -05:00
Ryan Houdek b66a7f83c2 Fixes ARM CPU detection routine for the hardware.
We weren't dropping a newline character from the string, we were cutting off the last character of the hardware name.
This fixes my TK1 being called 'lagun' when it's name is 'laguna'
2014-10-25 09:14:14 -05:00
skidau 8598d6bc2b Merge pull request #1364 from RachelBryk/titles
Read game title from ini file, or titles.txt if it exists.
2014-10-25 13:33:26 +11:00
Ryan Houdek 6483f8d45c Removes ARMv7 specific byteswap routines from CommonFuncs.h
GCC has optimized this using the exact same code since 4.7 or 4.8.
Android building falls back to the __linux__ route.
No need to keep these around anymore since we aren't building on an old GCC version.
2014-10-24 16:21:54 -05:00
Augustin Cavalier 51700a2b68 Fix the brand/cpu_string reversal.
Before this commit, the two were reversed ("cpu_string" had the brand, e.g. "AuthenticAMD"; and "brand_string" had the CPU type, e.g. "AMD Phenom II X4 925").
2014-10-24 16:09:21 -04:00
Lioncash c0c835d0b6 BitField: Fix a typo in the sample usage. 2014-10-24 13:33:02 -04:00
skidau 716fe06289 Merge pull request #1349 from comex/good-job-dereferencing-null-on-purpose
Fix some warnings from Clang trunk in an overly aggressive manner
2014-10-24 13:03:09 +11:00
comex 00c6ec97a6 Merge pull request #1347 from comex/header-hygiene
Add missing includes where headers depend on other headers having been included first.
2014-10-22 23:23:58 -04:00
Rachel Bryk b1e14a65a2 Read game title from ini file, or titles.txt if it exists. 2014-10-22 22:19:40 -04:00
comex 6e774f1b64 Add missing includes where headers depend on other headers having been included first.
This is good hygiene, and also happens to be required to build Dolphin
using Clang modules.

(Under this setup, each header file becomes a module, and each #include
is automatically translated to a module import.  Recursive includes
still leak through (by default), but modules are compiled independently,
and can't depend on defines or types having previously been set up.  The
main reason to retrofit it onto Dolphin is compilation performance - no
more textual includes whatsoever, rather than putting a few blessed
common headers into a PCH.  Unfortunately, I found multiple Clang bugs
while trying to build Dolphin this way, so it's not ready yet, but I can
start with this prerequisite.)
2014-10-21 21:22:16 -04:00
comex 06433652be Improve some libcdio CoreFoundation code.
I found it via clang complaining about a useless null check on an array,
but I decided to get rid of the array in favor of dynamic allocation, as
there was no reason to assume a maximum length of 0x32 bytes.  Plus, add
a CFString type check just in case, and switch to UTF-8 in the
off-chance it matters.

The result has not actually been tested, as I have no CD drive.
2014-10-21 21:20:11 -04:00
Ryan Houdek 2e94814441 Changes from ARMv6 NOP to ARMv7 NOP.
Dolphin doesn't support ARMv6. Get this out of here.
2014-10-21 14:17:07 +00:00
skidau e8da34ef25 Merge pull request #1320 from FioraAeterna/hash64bitcrc
Use CRC to output 64 bits instead of 32
2014-10-20 14:50:21 +11:00
Lioncash 3782be15a3 Merge pull request #1309 from Stevoisiak/spellingFix
Minor spelling fix
2014-10-18 22:40:41 -04:00
Fiora d2e004fa9e Use CRC to output 64 bits instead of 32
A bit hacky, but should dramatically reduce the odds of hash collision.
2014-10-18 00:24:35 -07:00
Fiora 15a4bccb73 Hash: unroll CRC loop, since CRC32 typically has nontrivial latency
Seems to be about 20-30% faster texture cache hashing on my machine.
2014-10-17 15:39:08 -07:00
Stevoisiak ed5e698511 Minor spelling fix 2014-10-17 15:51:19 -04:00
skidau 9ddbdeb39f Merge pull request #995 from FioraAeterna/fma
Add FMA support to emitter and use it in the JIT
2014-10-12 13:56:18 +11:00
Henrik Rydgård 877081c7df Be consistent with braces. 2014-10-10 22:34:03 +02:00
Henrik Rydgård 9bca1a00d7 x64 emitter: Add some more missing ops (MOVDQA, MOVDQU, PSHUFHW)
Also constify some pointers.
2014-10-10 18:30:05 +02:00
Henrik Rydgård a2c46665c5 x64 emitter: Add a few missing instructions 2014-10-10 18:30:04 +02:00
Fiora 019657cd93 X64Emitter: add FMA3 support 2014-10-07 18:21:07 -07:00
skidau b3b34d16e6 Merge pull request #1218 from hthh/trampolinecaching
JIT: reuse trampolines when possible
2014-10-07 13:26:23 +11:00
skidau 8fdf43109f Merge pull request #1216 from FioraAeterna/movoptimizations
Add more AVX support, refactor emitter, reduce redundant XMM moves
2014-10-07 13:25:28 +11:00
hthh c7208318fb JIT: Reuse trampolines when possible 2014-10-05 15:03:11 +11:00
Fiora 7a2dd3a3c6 x64Emitter: refactor, add some new AVX instructions 2014-10-03 10:05:10 -07:00
Fiora 85547d94be JIT: properly remove FIFO write addresses when code is invalidated
Fixes a bug caused by interaction with carry optimizations; might fix other
issues too.
2014-09-30 01:00:23 -07:00
comex a9b4016cd3 Merge pull request #1166 from FioraAeterna/flaglocking
JIT+Emitter: support locking flags
2014-09-30 02:57:53 -04:00
comex 2eebdff01b Remove useless STACKALIGN macro.
It only ever did anything on 32-bit OS X.

Anyway, it wasn't even on the right functions, and these days
ABI_PushRegistersAndAdjustStack should handle maintaining the ABI
correctly.
2014-09-30 01:42:47 -04:00
Fiora c102fed36a GekkoDisassembler: show W and I in psq_l/psq_st disassembly 2014-09-28 17:01:35 -07:00
Fiora ac1fc9ad03 JIT+Emitter: support locking flags
This helps us avoid accidentally clobbering flags between two instructions
when the flags are expected to be maintained. Dolphin will of course crash
immediately, but at least it will crash loudly and alert us of the mistake,
instead of forcing hours of bisecting to find the subtle way in which the JIT
has managed to sneak a flag-modifying instruction where there shouldn't be one.
2014-09-26 20:47:06 -07:00
comex fb3d9c9d58 Fix warning in x64CPUDetect.cpp in generic build by not building it. 2014-09-25 18:48:00 -04:00
Rohit Nirmal 3168361e32 Android: Silence some more warnings. 2014-09-22 17:45:42 -04:00
Ryan Houdek 9206dd016e Merge pull request #1135 from FioraAeterna/twidisasmfix
Disassembler: fix disassembly of some twi instructions
2014-09-21 14:19:05 -05:00
Fiora 9c4407fb80 Disassembler: fix disassembly of some twi instructions 2014-09-21 08:17:41 -07:00
Tony Wasserka 6d4fd54683 ChunkFile: Add a DoArray overload which takes an std::array.
This is inconsistent with how other containers are used (i.e. with Do()), but making std::array be used with Do() seems rather confusing when there's also a DoArray available.
2014-09-21 10:38:22 +02:00
Ryan Houdek eb23882398 Merge pull request #1120 from rohit-n/muh-precompiled-headers
Fix build failing when disabling precompiled headers.
2014-09-19 17:43:42 -05:00
Rohit Nirmal 46057db37d Fix build failing when disabling precompiled headers. 2014-09-19 18:17:51 -04:00
Ryan Houdek 522d7eb275 Merge pull request #1109 from FioraAeterna/ps_cmp
JIT: add ps_cmp0/ps_cmp1/ps_res/ps_rsqrte
2014-09-19 14:41:05 -05:00
Fiora 3c49200b22 X64Emitter: add MOVHLPS/MOVLHPS 2014-09-18 17:57:27 -07:00
Ryan Houdek 7608e3f11e Add AArch64 emitter aliases for MOV and MVN. 2014-09-18 16:30:40 -05:00
comex 7ad9027593 Be pedantic about stack overflow on Linux and OS X.
Add some magic to the fault handler to handle stack overflow due to BLR
optimization, and disable the optimization if fastmem is not enabled.
2014-09-17 20:08:09 -04:00
Fiora d3dee1d7ed GekkoDisassembler: fix some float opcodes 2014-09-16 02:06:40 -07:00
skidau 8361d2b1da Merge pull request #805 from FioraAeterna/storerefactor
JIT: support immediate stores
2014-09-16 13:31:39 +10:00
Dolphin Bot bef2016909 Merge pull request #1091 from FioraAeterna/fixdisasm
GekkoDisassembler: fix/improve disassembly for a few instructions
2014-09-16 03:53:18 +02:00
Fiora 7368c2ee9e GekkoDisassembler: fix/improve disassembly for a few instructions 2014-09-15 18:48:54 -07:00
Fiora d02b7c7755 JIT: support immediate stores 2014-09-15 07:25:32 -07:00
Fiora 02dce5dbbf x64Emitter: fix silent failure if WriteNormalOp is passed two memory operands
Should now fail loudly and clearly instead.
2014-09-15 07:08:08 -07:00
Ryan Houdek 4e7f284a81 Merge pull request #1064 from Sonicadvance1/AArch64-Fix-MOVI2R
Fix AArch64 MOVI2R helper function.
2014-09-14 09:26:02 -05:00
Fiora 997c5c2d0e x64Emitter: add LZCNT/TZCNT support and detection
Also add a unit test.
2014-09-14 05:31:22 -07:00
Pierre Bourdon 439068acae Merge pull request #1055 from FioraAeterna/smallermov
X64Emitter: support shorter mov reg, imm opcodes
2014-09-14 01:57:36 +02:00
Lioncash a92003c1ab ARM64: Make getters within ArithOption const. 2014-09-12 20:55:26 -04:00
Ryan Houdek 17d31ecd6c Fix AArch64 MOVI2R helper function.
In the case of a zero immediate, it wouldn't generate code at all.
Also in the case of max u32/u64, use ORN to optimize it.
2014-09-12 05:45:10 -05:00
Ryan Houdek 5061a33c29 Merge pull request #1051 from Sonicadvance1/ARM-Common
Include a missing include in the ARM emitter's common code.
2014-09-11 21:12:21 -05:00
Fiora 18d83a310e X64Emitter: support shorter mov reg, imm opcodes
Also refactor WriteNormalOp a little bit and add comments.
2014-09-11 11:40:30 -07:00
Lioncash b06ec302d1 Remove some unnecessary semicolons 2014-09-11 13:05:31 -04:00
Fiora 5726e0cdfb JIT: use XCHG in MOVTwo
Roughly the same speed or slightly faster depending on CPU; mostly just cleaner
since we don't have to pass in a temp.
2014-09-10 22:17:38 -07:00
Ryan Houdek 44baab30cf Include a missing include in the ARM emitter's common code. 2014-09-10 20:39:19 -05:00
Ryan Houdek 24f6c98a55 Add sign extending aliases to the ARM64Emitter. 2014-09-10 17:52:54 -05:00
Ryan Houdek 71cb09f1ca Merge pull request #1027 from rohit-n/change-include
Include CommonTypes.h instead of Common.h.
2014-09-10 00:35:16 -05:00
Ryan Houdek 09c1ad1631 Merge pull request #753 from FioraAeterna/integeropts
JIT64: various integer optimizations
2014-09-09 04:10:30 -05:00
Ryan Houdek f09cb723c5 Merge pull request #1044 from lioncash/pedantry
Common: Fix code styling in Arm64Emitter
2014-09-08 23:29:19 -05:00
Ryan Houdek af732dea39 Merge pull request #1043 from lioncash/unused
Common: Remove unused variable in MemoryMap_Setup
2014-09-08 22:46:04 -05:00
Lioncash bc331ee809 Common: Fix code styling in Arm64Emitter 2014-09-08 23:39:20 -04:00
Ryan Houdek ed476c997c Fix Generic build from AArch64 merge.
I had missed this file and hadn't tested the branch on my new build system.
2014-09-08 22:24:23 -05:00
Fiora 94c20db369 Rename Log2 and add IsPow2 to MathUtils for future use
Also remove unused pow2/pow2f functions.
2014-09-08 20:15:45 -07:00
skidau 0926f1d344 Merge pull request #897 from Sonicadvance1/AArch64-jit
Initial AArch64 JIT
2014-09-09 12:34:58 +10:00
Lioncash 22800dc711 Common: Remove unused variable in MemoryMap_Setup 2014-09-08 21:44:03 -04:00
Rohit Nirmal fbc64984ca Include CommonTypes.h instead of Common.h. 2014-09-08 15:39:58 -04:00
comex 7fb6628789 Merge pull request #1024 from comex/abi-cleanup
ABI cleanup
2014-09-08 01:03:36 -04:00
comex 4dc090643d Remove ABI_AlignStack/ABI_RestoreStack and the noProlog option to ABI_CallFunctionRR.
The latter being true was the only case where the former would do
anything, and it was never true.  They became obsolete with x86's
removal.
2014-09-08 01:00:10 -04:00
comex c5c0b36046 Remove the inaccurately named ABI_PushAllCalleeSavedRegsAndAdjustStack (it didn't preserve FPRs!) and replace with ABI_PushRegistersAndAdjustStack.
To avoid FPRs being pushed unnecessarily, I checked the uses: DSPEmitter
doesn't use FPRs, and VertexLoader doesn't use anything but RAX, so I
specified the register list accordingly.  The regular JIT, however, does
use FPRs, and as far as I can tell, it was incorrect not to save them in
the outer routine.  Since the dispatcher loop is only exited when
pausing or stopping, this should have no noticeable performance impact.
2014-09-08 01:00:10 -04:00
comex 2dafbfb3ef Improve code and clarify parameters to ABI_Push/PopRegistersAndAdjustStack.
- Factor common work into a helper function.
- Replace confusingly named "noProlog" with "rsp_alignment".  Now that
x86 is not supported, we can just specify it explicitly as 8 for
clarity.
- Add the option to include more frame size, which I'll need later.
- Revert a change by magumagu in March which replaced MOVAPD with MOVUPD
on account of 32-bit Windows, since it's no longer supported.  True,
apparently recent processors don't execute the former any faster if the
pointer is, in fact, aligned, but there's no point using MOVUPD for
something that's guaranteed to be aligned...

(I discovered that GenFrsqrte and GenFres were incorrectly passing false
to noProlog - they were, in fact, functions without prologs, the
original meaning of the parameter - which caused the previous change to
break.  This is now fixed.)
2014-09-08 00:58:56 -04:00
Lioncash a38093729e Common: Inline declare some loop variables in ArmEmitter 2014-09-07 00:26:26 -04:00
Ryan Houdek 2b06257e16 Beginning of the AArch64 JIT branch.
This is the bare minimum required to run a few games on AArch64.
Was able to run starfield and Animal Crossing to the Nintendo logo.
QEmu emulation is literally the slowest thing in the world, it maxes out at around 12mhz on my Core i7-4930MX.
2014-09-06 20:14:52 -05:00
Ryan Houdek f107b5e176 [AArch64-emitter] Initial work on a emitter for 64bit ARM.
I've tested a few instruction encodings and am expecting most to work as long as one stays away from VFP/SIMD.
This implements mostly instructions to bring up an initial JIT with integer support.
This can be improved to allow ease of use functions in the future, dealing with the raw imms/immr encodings is probably the worst thing ever.
2014-09-06 20:13:44 -05:00
shuffle2 9302218a19 Merge pull request #851 from lioncash/logg
Common: Kill off duplicate log warning definitions
2014-09-06 12:35:19 -07:00
Ryan Houdek 01b90c1007 Fix ArmEmitter's asserts from failing to compile.
Changed them all from debug asserts to regular asserts, since they shouldn't only be run at debug time.
2014-09-06 15:11:39 -04:00
Lioncash 690ed8580c Common: Kill off duplicate log warning definitions
Also embed the log checks rather than using macros
2014-09-06 15:11:29 -04:00
shuffle2 85fd8c2bec Merge pull request #983 from lioncash/lol-str
Common: Fix a potential infinite loop in ReplaceAll
2014-09-06 12:00:23 -07:00
shuffle2 1b23432d34 Merge pull request #990 from rohit-n/fix-formatting
Fix formatting
2014-09-06 11:54:17 -07:00
comex 6c382f6627 Merge pull request #926 from comex/ppcstate-reg
PowerPCState register (and rationalize register usage, and add some registers to replace it)
2014-09-06 13:24:38 -04:00
comex 6fd0333c14 Symbolicize explicit uses of x86 registers where possible (GPRs only for now).
Uses are split into three categories:

- Arbitrary (except for size savings) - constants like RSCRATCH are
used.

- ABI (i.e. RAX as return value) - ABI_RETURN is used.

- Fixed by architecture (RCX shifts, RDX/RAX for some instructions) -
explicit register is kept.

In theory this allows the assignments to be modified easily.  I verified
that I was able to run Melee with all the registers changed, although
there may be issues if RSCRATCH[2] and ABI_PARAM{1,2} conflict.
2014-09-06 13:18:31 -04:00
comex 67cdb6e07a Factor code from ABI_CallFunctionRR and GetWriteTrampoline into a helper, and fix a special case.
The special case is where the registers are actually to be swapped (i.e.
func(ABI_PARAM2, ABI_PARAM1); this was previously impossible but would
be ugly not to handle anyway.
2014-09-06 13:16:20 -04:00
Lioncash 1d66b1d3f4 Common: Remove HAVE_CXX11_SYNTAX define from Common.h
All the compilers we support have C++11 support now, so this isn't needed.
2014-09-06 11:32:19 -04:00
Rohit Nirmal 629ceaf2b1 Split some parts of UpdateBoundingBox into multiple lines. Also,
fix issues causing failure on Lint.
2014-09-06 09:49:27 -05:00
Rohit Nirmal 1ecb318bcc Fix some formatting (new lines on collapsed single-line conditionals,
new lines for opening braces).
2014-09-06 01:23:05 -05:00
lioncash 3e0c04a83e Common: Fix a potential infinite loop in ReplaceAll
Prior to this change, it was possible to cause an infinite loop by making the string to be replaced and the replacing string the same thing.

e.g.

std::string some_str = "test";
ReplaceAll(some_str, "test", "test");

This also changes the replacing in a way that doesn't require starting from the beginning of the string on each replacement iteration.
2014-09-05 15:12:17 -04:00
Fiora 07e0c917c6 Revert "JIT64: optimize CA calculations" 2014-09-05 10:26:30 -07:00
comex 97420c6ec6 Merge pull request #852 from FioraAeterna/optimizeca
JIT64: optimize CA calculations
2014-09-05 11:52:02 -04:00
comex aa1df21bb6 Merge pull request #947 from FioraAeterna/rsqrte
JIT: implement frsqte
2014-09-05 11:48:00 -04:00
Lioncash 6369173981 DolphinWX: Simplify wiki link construction 2014-09-04 21:30:33 -04:00
lioncash bd91e8b0c8 Common: Remove unused header from Thread.cpp
This define isn't even used in the Windows builds.
2014-09-04 09:15:18 -04:00
Rachel Bryk 345b608d64 Change IniFile::Section::Set() with default value to use a template. 2014-09-04 03:29:49 -04:00
shuffle2 4fcb633df5 Merge pull request #961 from RachelBryk/logs
Read the config file before enabling logs.
2014-09-03 17:20:11 -07:00
Rachel Bryk 22d2c7d053 Read the config file before enabling logs. 2014-09-03 19:50:02 -04:00
shuffle2 05cd06539b Merge pull request #960 from lioncash/preproc-stuff
Common: Make TITLEID_SYSMENU a static const variable in NandPaths.h
2014-09-03 15:22:32 -07:00
lioncash a687cc556b Common: Make TITLEID_SYSMENU a static const variable in NandPaths.h 2014-09-03 18:03:23 -04:00
Fiora 1b50f9df14 JIT: implement fres
Mostly a straightforward translation of the interpreter code, with a few
tricksy optimizations and fallbacks for rare paths.
2014-09-03 12:15:30 -07:00
Fiora c72a133206 JIT: implement frsqrte
Mostly a straightforward translation of the interpreter code, with a few
tricksy optimizations and fallbacks for rare paths.
2014-09-03 11:21:04 -07:00
Dolphin Bot e1248599eb Merge pull request #868 from FioraAeterna/bmi
x64Emitter: add BMI1/BMI2 support
2014-09-03 19:24:27 +02:00
lioncash f69e6ef16f Common: Remove unnecessary define check in Log2 2014-09-03 13:04:48 -04:00
Fiora 5088a2b4e2 x64Emitter: add BMI1/BMI2 support
TZCNT and LZCNT use a completely different encoding scheme, so they should
probably go in a separate patch.

Also add some tests.
2014-09-03 10:04:01 -07:00
shuffle2 db84a22109 Merge pull request #770 from lioncash/panic
Core: Fix case where a panic alert wouldn't be shown in MemoryUtil.cpp
2014-09-03 00:10:12 -07:00
comex 64575d565a Merge pull request #923 from FioraAeterna/fixcallersave
JIT: Fix caller-save registers on WIN64
2014-09-03 02:27:44 -04:00
shuffle2 532b7bb7da Merge pull request #893 from rohitnirmal/scan-build-fixes
Scan build fixes
2014-09-02 23:15:18 -07:00
Fiora 9e4419e786 x64Emitter: add support for shorter EAX forms of instructions
Should save a few bytes of code size here and there.
2014-09-02 21:52:41 -07:00
Fiora 6655c7775e JIT: Fix callee-save registers on WIN64 2014-09-02 10:56:14 -07:00
Pierre Bourdon e72146d19c x64Emitter: Do not assert-fail on redundant MOVs, instead show an error log 2014-09-02 10:17:32 +02:00
Pierre Bourdon a79ced2fc2 x64Emitter: Make it clear for both SSE to int conv that X64 regs are expected 2014-09-02 09:55:47 +02:00
Pierre Bourdon c428c5999f x64Emitter: UNPCKLPS/HPS are now tested 2014-09-02 09:53:00 +02:00