Tillmann Karras
9de77b7c23
x64FPURoundMode: always set x87 precision
...
Set the x87 precision, even on x64. Since we are using x87 instructions
in the JIT now, we can't guarantee that x87 precision will never
influence Dolphin on x64.
2014-05-01 01:10:00 +02:00
Tillmann Karras
ed762a3eda
x64FPURoundMode: use fesetround() instead of asm
2014-05-01 01:09:55 +02:00
Tillmann Karras
e659f5ac58
JitBackpatch: fix NOP padding
...
The new NOP emitter breaks when called with a negative count. As it
turns out, it did happen when deoptimizing 8 bit MOVs because they are
only 4 bytes long and need no BSWAP.
2014-04-30 15:26:11 +02:00
Pierre Bourdon
aef24d509b
Merge pull request #304 from Tilka/nop
...
Optimize NOPs
2014-04-27 11:52:05 +02:00
Tillmann Karras
886c887e80
Fix Fastmem on CPUs without MOVBE
...
The problem was that when BSWAP was used, UnsafeWriteRegToReg() returned
the address of that instead of the MOV.
2014-04-25 01:11:52 +02:00
Tillmann Karras
acfd9ee76c
Add remaining possible uses of MOVBE
...
Also fixes a missing 'break' statement in DisassembleMov().
2014-04-24 16:36:03 +02:00
Tillmann Karras
957649b7af
Optimize NOPs
2014-04-23 21:15:09 +02:00
Tillmann Karras
b3c7395a23
Atomic: support clang 3.4+
2014-04-17 10:39:02 +02:00
Pierre Bourdon
cf315a487f
Merge pull request #271 from delroth/threading-stuff
...
Threading improvements: add Common::Flag and improve Common::Event
2014-04-14 23:23:16 +02:00
Pierre Bourdon
7074feacbe
Common::Event: Add a faster Windows specific implementation based on the concurrency runtime.
2014-04-14 23:13:15 +02:00
Pierre Bourdon
48bd904028
Common::Event: Implement in terms of Common::Flag to get rid of a volatile and optimize with early returns and atomic swaps
2014-04-14 23:13:15 +02:00
Pierre Bourdon
e24cad0780
Common::Flag: Add support for TestAndSet + test by implementing basic spinlocks.
2014-04-14 23:13:15 +02:00
Tony Wasserka
ccc04944b2
BitField: Fix alignment issues.
...
At least one platform (ARM with NEON instructions enabled) generates SIGBUSes if BitField objects aren't aligned properly.
2014-04-14 20:04:44 +02:00
Pierre Bourdon
6bdcbad3e4
Common: Move the Event class to a separate file, and add tests for it. Fix includes everywhere to match this.
2014-04-14 10:54:07 +02:00
Pierre Bourdon
f9fb39d383
Common: Add a 'Flag' class that is used to encapsulate a boolean flag manipulated from several threads
2014-04-14 10:54:07 +02:00
Tony Wasserka
12841928df
BitField: Optimize generated assembly by forcing inlining.
2014-04-13 13:27:01 +02:00
Pierre Bourdon
b2597739ff
x64Emitter: Add the MOVBE instruction.
2014-04-11 23:33:21 +02:00
Pierre Bourdon
d2de1ddabc
CPUDetect: add support for MOVBE detection
2014-04-11 23:29:03 +02:00
Ryan Houdek
87d106d65c
Remove dumb CodeBlock duplication in the emitters.
...
Fixes issue 6990.
This uses a bit of templating to remove the duplicate code that is the CodeBlocks in each emitter headers.
No actual functionality change in this.
2014-04-09 13:53:43 -05:00
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