Commit Graph

260 Commits

Author SHA1 Message Date
bddcdd9d94 Jit_Util: Replace two MDisp usages with MatR
Same thing, less to read.
2015-09-21 08:20:35 -04:00
00ffc47751 Jit_Util: Mark a class function as const 2015-09-17 00:21:50 -04:00
c6ea9eb7c3 JitCache: Remove unused define 2015-09-16 19:15:47 -04:00
8aac59418b JitCache: Get rid of pointer casts
Silences more ubsan runtime asserts
2015-09-16 06:25:48 -04:00
c5685ba53a Merge pull request #2972 from lioncash/align
General: Replace GC_ALIGN macros with alignas
2015-09-11 17:00:13 +00:00
19459e827f Partially revert "General: Toss out PRI macro usage" 2015-09-11 09:49:00 -04:00
48031eaff7 Merge pull request #2974 from Tilka/fprf
Jit64: fix errors in FPRF calculation
2015-09-08 18:59:22 +00:00
8ce04f9a65 General: Replace GC_ALIGN macros with alignas
Standard supported alignment -> out with compiler-specific.
2015-09-06 12:53:51 -04:00
be4caa3dc0 Merge pull request #2961 from lioncash/printf
General: Toss out PRI macro usage
2015-09-06 21:02:22 +12:00
8fdb013d54 General: Toss out PRI macro usage
Now that VS supports more printf specifiers, these aren't necessary
2015-09-05 16:02:35 -04:00
8f777cd839 Jit64: fix errors in FPRF calculation 2015-09-05 20:17:53 +02:00
72eed1aa82 JitCache: drop unused method 2015-09-05 12:40:14 +02:00
df19f11cb9 Jit_Util: Add missing override specifiers 2015-08-29 00:30:18 -04:00
ee4a12ffe2 Jit64: some byte-swapping changes 2015-08-26 05:41:18 +02:00
0d92c8fb89 Jit64: Optimize dcbx 2015-08-24 18:33:23 +02:00
6f34b27323 Jit64: implement dcbf + dcbi 2015-08-24 18:33:19 +02:00
78aa01e06e Jit64: Faster linking of continuous blocks
We compile the blocks as they are executed, so it's common
to link them continuously. We end with calling JMP after every
block, but often just with a distance of 0.
So just emitting NOPs instead also "calls" the next block, but
easier for the CPU.
2015-08-21 17:41:53 +02:00
f5a10bddee Jit64: use overloaded IsSimpleReg() where useful 2015-08-06 10:39:43 +02:00
89954d658c Jit64: drop needless casts 2015-07-18 22:33:42 +02:00
daa205990f Use emplace() instead of insert() where applicable for maps. 2015-06-28 19:52:40 -04:00
f32cede086 Revert "x64: build a Position-Independent Executable (PIE)" 2015-06-14 16:06:26 +12:00
c375111076 Options: merge SCoreStartupParameter into SConfig 2015-06-12 19:07:45 +02:00
d4538c762f MemoryUtil: get executable pages near static data
and clean up a bit.
2015-06-03 21:44:31 +02:00
a0597f0d62 Jit64: turn 32 bit addresses into offsets 2015-06-03 21:44:31 +02:00
210d7c4d54 Merge pull request #2486 from Tilka/x86_32
Jit64: drop more x86_32 left-overs
2015-05-31 13:06:19 -04:00
a6004f8274 Jit64: drop more x86_32 left-overs 2015-05-31 05:28:40 +02:00
0b8372e566 Jit_Util: Make some OpArg parameters const references 2015-05-29 01:13:45 -04:00
e3a6191f02 x64Emitter: Pass some OpArg parameters by const reference
Considering OpArg is a struct, passing by value creates unnecessary copies.
2015-05-29 01:13:29 -04:00
7c04c76a26 Merge pull request #2421 from Tilka/jit_stuff
Jit64: fixes + less code
2015-05-25 23:08:24 -04:00
69963dc4b0 Merge pull request #2274 from degasus/disable_bbox
Disable bbox
2015-05-25 08:46:12 -04:00
30ebb2459e Set copyright year to when a file was created 2015-05-25 13:22:31 +02:00
cefcb0ace9 Update license headers to GPLv2+ 2015-05-25 13:22:31 +02:00
ac0e304159 Jitregister: fix common-core dependency 2015-05-25 09:33:34 +02:00
6b8ab5993a Jit64: make ForceSinglePrecision more versatile 2015-05-21 12:33:36 +02:00
9792976ee9 Jit64: fix ForceSinglePrecisionS/P
This bug never broke anything because of how these functions are used.
Fixing it should avoid some false dependencies though.
2015-05-21 12:33:36 +02:00
1b01911c01 Jit64: indent far code because it looks nice 2015-05-14 19:12:58 +02:00
accefbf0a5 JitBase: small cleanup 2015-05-14 19:08:07 +02:00
d39b519850 InputCommon/Core: Get rid of some virtual destructor warnings
These classes have virtual methods, but no virtual destructor, which causes warnings on some compilers.
2015-04-27 21:41:59 -04:00
132e1068ce Remove checks that disable fastmem if debugging and ENABLE_MEM_CHECK are enabled.
They weren't sufficient and are made redundant by previous commits; they
also (on master) caused breakage due to Jit64::psq_stXX assuming writes
would be fastmem and not clobber a register under certain conditions.

That really needs to be refactored, but for now, this works.
2015-04-24 22:37:54 -04:00
dd7ab4812b On x86, disabling fastmem isn't enough actually.
Without fastmem, the JIT code still does an inline check for RAM
addresses.  With watchpoints we have to disable that too.  (Hardware
watchpoints would avoid all the slow, but be complicated to implement
and limited in number - I doubt most people debugging games care much if
they run slower.)

With this change and watchpoints enabled, Melee runs at no more than 40%
speed, despite running at full speed without them.  Oh well.  Better
works slowly than doesn't bloody work.

Incidentally, I'm getting an unrelated crash in
PowerPC::HostIsRAMAddress when shutting down a game.  This code sucks.
2015-04-24 22:37:54 -04:00
b84f6a55ab Automatically disable fastmem and enable memcheck when there are any watchpoints.
- Move JitState::memcheck to JitOptions because it's an option.
- Add JitOptions::fastmem; switch JIT code to checking that rather than
  bFastmem directly.
- Add JitBase::UpdateMemoryOptions(), which sets both two JIT options
  (replacing the duplicate lines in Jit64 and JitIL that set memcheck
  from bMMU).
  - (!) The ARM JITs both had some lines that checked js.memcheck
    despite it being uninitialized in their cases.  I've added
    UpdateMemoryOptions to both.  There is a chance this could make
    something slower compared to the old behavior if the uninitialized
    value happened to be nonzero... hdkr should check this.
- UpdateMemoryOptions forces jo.fastmem and jo.memcheck off and on,
  respectively, if there are any watchpoints set.
- Also call that function from ClearCache.
- Have MemChecks call ClearCache when the {first,last} watchpoint is
  {added,removed}.

Enabling jo.memcheck (bah, confusing names) is currently pointless
because hitting a watchpoint does not interrupt the basic block.  That
will change in the next commit.
2015-04-24 22:37:53 -04:00
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
f82afd1b2f Fix warnings 2015-03-16 19:02:30 +01:00
48ec42d4a0 Core: Change NULLs to nullptrs. 2015-03-14 20:20:41 -05:00
859c1123ba Fix typo in usage of IsOptimizableMMIOAccess. 2015-03-08 16:20:17 -07:00
93b16a4a2d Formatting/Whitespace Cleanup
Various fixes to formatting and whitespace
2015-02-25 10:48:21 -05:00
f298f00e1b Clean up the intrinsics #ifdef mess 2015-02-24 01:02:36 +01:00
917a900ccb Refactor gather-pipe address checking.
The implementation of IsOptimizableGatherPipeWrite is extremely simple
now, but it will get a bit more complicated with dynamic-bat.
2015-02-22 11:01:42 -08:00
18ada7a0f5 Merge pull request #2033 from magumagu/mmio-fix-addresses
Fix the addresses of MMIO registers.
2015-02-22 10:58:25 -08:00
f316265973 Fix the addresses of MMIO registers.
MMIO registers are located at 0x0C000000 and 0x0D000000, not 0xCC000000.
The 0xCC000000 addresses are just an artifact of address translation.
2015-02-15 18:29:37 -08:00