Commit graph

1513 commits

Author SHA1 Message Date
Ryan Houdek
93c871522f Fix a bug in the ARMEmitter.
When creating a Fixupbranch we were swapping the BL and B targets.
I think this was found by PPSSPP a while ago, but they never send PRs to merge their changes upstream.
2014-04-06 10:28:41 -04:00
Pierre Bourdon
664c8d30a0 Remove all trailing whitespaces from our codebase. 2014-03-29 11:05:44 +01:00
comex
4d5df0d008 Fix IsTriviallyCopyable for volatile (fixes Mac build).
Between C++11 and C++14, volatile types stopped being trivially
copyable.  The serializer has no reason to care about this distinction,
so tack on remove_volatile.
2014-03-27 23:42:52 -04:00
magumagu
4eab240e25 Compute stack usage correctly in ABI_CallFunctionPC.
(The numbers need to be consistent with the actual usage, or else the stack gets corrupted.)
2014-03-25 20:48:25 -07:00
magumagu
e4081b29f9 Use unaligned stores to save XMM regs to stack.
On Win32, the stack isn't aligned, so aligned stores will cause crashes.
2014-03-25 20:46:36 -07:00
Pierre Bourdon
5fc6ce59c3 Merge pull request #210 from magumagu/writerex-fix
Fix OpArg::WriteRex with 8-bit memory operand.
2014-03-26 02:34:44 +01:00
Tony Wasserka
48a1790d81 Common: Add a generic class for accessing bitfields in a fast and endianness-independent way.
The underlying storage type of a bitfield can be any intrinsic integer type,
but also any enumeration.

Custom storage types are supported if the following things are defined on the storage type:
- casting 0 to the storage type
- bit shift operators (in both directions)
- bitwise & operator
- bitwise ~ operator
- std::make_unsigned specialization
2014-03-25 23:33:04 +01:00
magumagu
03292eabc2 Fix OpArg::WriteRex with 8-bit memory operand.
Previously he function was misbehaving because of a missing check for
whether an 8-bit operand was a register operand; it would therefore
emit unnecessary REX prefixes, incorrectly assert on 32-bit targets, and
could potentially emit wrong code in rare cases (like a memory to register
operation involving AH.)

Also, some cleanup while I was in the area to make the function easier to
read.
2014-03-25 14:09:15 -07:00
Tillmann Karras
af525266d4 MathUtil: add constructors to IntFloat/IntDouble 2014-03-24 16:14:22 +01:00
Ryan Houdek
3586ab1d4c Fix the Android build when using clang 3.4 2014-03-17 17:56:22 -05:00
Tillmann Karras
fa3cc05753 Turn some non-const refs into pointers 2014-03-17 02:55:57 +01:00
Lioncash
a82675b7d5 Kill off some usages of c_str.
Also changes some function params, but this is ok.
Some simplifications were also able to be made (ie. killing off strcmps with ==, etc).
2014-03-14 13:51:23 -04:00
Matthew Parlane
31cfc73a09 Fixes spacing for "for", "while", "switch" and "if"
Also moved && and || to ends of lines instead of start.
Fixed misc vertical alignments and some { needed newlining.
2014-03-11 00:35:07 +13:00
Tillmann Karras
d802d39281 clang-modernize -use-nullptr
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
2014-03-09 21:14:26 +01:00
Tillmann Karras
f28116b7da clang-modernize -add-override 2014-03-09 21:12:01 +01:00
Tillmann Karras
c89f04a7c5 clang-modernize -loop-convert
and some manual adjustments
2014-03-09 21:11:59 +01:00
Tillmann Karras
9ef64245fa MathUtil: fix IsQNAN()
The constants were one nibble too short and the lower 51 bits don't
actually have to be zero.
2014-03-09 19:34:58 +01:00
Tillmann Karras
d05e205a24 FPURoundMode: revert use of enums in bit-fields
The workaround of using fixed underlying types produces lots of warnings
in GCC because now the bit-fields are too small for the value range used
for conversion semantics.
2014-03-09 15:24:35 +01:00
Pierre Bourdon
edba8096bf x64Emitter: Add functions to call a C++ std::function from JITed code 2014-03-08 23:32:43 +01:00
Pierre Bourdon
9869c53859 x64ABI: Add two more CallFunction functions (for additional parameter types). 2014-03-08 23:32:43 +01:00
Pierre Bourdon
6d6abfa61f x64Emitter: Allow const pointers where it makes sense to do so. 2014-03-08 23:32:43 +01:00
Pierre Bourdon
248f5d7f22 Merge pull request #130 from lioncash/breakpoint-clear
Actually make PPCDebugInterface::ClearAllBreakpoints have functionality.
2014-03-07 20:42:52 +01:00
Matthew Parlane
57f2eda130 Fix MAC address reading on Windows. 2014-03-07 21:40:59 +13:00
Shawn Hoffman
932945d480 Implement workaround for Windows versions which do not support XSAVE.
Fixes CRT math routines using FMA instructions from causing illegal instructions.
2014-03-06 14:38:10 -08:00
Shawn Hoffman
8995d299f2 windows: move arch defines to base.props 2014-03-06 14:37:40 -08:00
Lioncash
610a6f9b23 Add ClearAllMemChecks to DebugInterface
Breakpoints have one, but memchecks don't, despite being cleared directly in the breakpoint window.

Now DolphinWX should call the interface functions and not the direct functions of the breakpoints or memchecks for clearing.
2014-03-05 21:50:23 -05:00
Shawn Hoffman
3647dfa711 Allow VS builds to be speedy again. 2014-03-05 11:17:14 -08:00
Shawn Hoffman
7733463e65 commit 1a428de189 introduced a bug by using a signed enum in a bitfield, the value of which is then used in a ldmxcsr instruction. The sign-extension corrupts the value, causing an exception by attempting to load mxcsr with an invalid value. 2014-03-05 10:19:29 -08:00
Ryan Houdek
4f02132f93 Make our architecture defines less stupid.
Our defines were never clear between what meant 64bit or x86_64
This makes a clear cut between bitness and architecture.
This commit also has the side effect of bringing up aarch64 compiling support.
2014-03-04 09:36:59 -06:00
Lioncash
279a8c0148 Change the DebugInterface, PPCDebugInterface, and DSPDebugInterface to use CamelCase names.
This is the standard coding convention in the codebase, so our interfaces should use it too.
2014-03-03 00:39:08 -05:00
Tillmann Karras
7a66a3ded1 ArmEmitter: make it more readable 2014-02-28 12:43:22 +01:00
Tillmann Karras
46e7c0657f Crypto: small cleanup 2014-02-28 12:43:22 +01:00
Tillmann Karras
315a8ba1c0 Various changes suggested by cppcheck
- remove unused variables
- reduce the scope where it makes sense
- correct limits (did you know that strcat()'s last parameter does not
  include the \0 that is always added?)
- set some free()'d pointers to NULL
2014-02-28 12:43:20 +01:00
Tillmann Karras
5f0a8008f4 Convert MemoryUtil.cpp to Unix-style line endings 2014-02-28 12:28:21 +01:00
Tillmann Karras
1a428de189 x64FPURoundMode: move things around a bit 2014-02-28 12:28:21 +01:00
degasus
94da4e1aa2 MathUtil: Change Log2 return value to int
Log2(u64) can't be bigger than 63, so there is no need in forcing a 64 bit value.
So just using a common int seems more natural.
2014-02-26 11:37:28 +01:00
Pierre Bourdon
70f3a069f2 Revert "Merge pull request #83 from lioncash/remove-console"
This breaks Linux stdout logging.

This reverts commit 7ac5b1f2f8, reversing
changes made to 9bc14012fc.

Revert "Merge pull request #77 from lioncash/remove-console"

This reverts commit 9bc14012fc, reversing
changes made to b18a33377d.

Conflicts:
	Source/Core/Common/LogManager.cpp
	Source/Core/DolphinWX/Frame.cpp
	Source/Core/DolphinWX/FrameAui.cpp
	Source/Core/DolphinWX/LogConfigWindow.cpp
	Source/Core/DolphinWX/LogWindow.cpp
2014-02-23 07:48:06 +01:00
Pierre Bourdon
311caef094 Merge pull request #25 from Tilka/ppc_fp
Fix non-IEEE mode
2014-02-23 04:15:37 +01:00
Pierre Bourdon
83b7bb64aa Make Common/ mostly IWYU clean (and fix errors in rest of the project detected by this change). 2014-02-22 23:37:29 +01:00
Lioncash
91286f5021 Fix the Windows build in relation to the recent changes. 2014-02-20 01:01:11 +01:00
Pierre Bourdon
9a8ea53195 Fix LinearDiskCache.h relying on a file not directly included. 2014-02-20 01:01:11 +01:00
Pierre Bourdon
3f9c38d231 Fix more header sorting issues in Common/ (now check-includes clean). 2014-02-20 01:01:10 +01:00
Lioncash
2afe215271 Convert all includes to relative paths. 2014-02-18 02:19:10 -05:00
Lioncash
3fd87a7636 Second and final pass of clearing out tabs. 2014-02-17 02:19:41 -05:00
Lioncash
cd8196f5db Turns out Console.cpp and ConsoleListener.cpp were being built into the Linux builds too. Fixes the build. 2014-02-16 20:55:07 -05:00
Lioncash
ca7bdf1d5d Remove the embedded Console from the possible logging options.
Note I do not mean the Logging window, but the console window.
It's literally rarely, if at all used, and offers less advantages over the built-in logging window (ie. it breaks on different locales: http://i.imgur.com/Cs92tQE.png)

This commit should remove all of the console logging.
2014-02-16 20:40:33 -05:00
Pierre Bourdon
92f8d93e96 Remove the old MMIO access "interface". 2014-02-16 19:22:40 +01:00
Tillmann Karras
404624bf0b Turn loops into range-based form
and some things suggested by cppcheck and compiler warnings.
2014-02-13 09:05:50 +01:00
Tillmann Karras
2ff794d299 Fix some warnings 2014-02-13 09:02:43 +01:00
Matthew Parlane
88526be3b5 Merge pull request #50 from Parlane/inifile_tidy
Fix IniFile to use string& instead of char*
2014-02-13 19:04:27 +13:00