Commit graph

736 commits

Author SHA1 Message Date
Tyler Stachecki
ee44e46abb os/windows: Add keyboard press and release events. 2014-08-27 19:10:03 -04:00
Tyler Stachecki
d011d9b5f5 Fix some obvious common TLB bugs. 2014-08-26 22:58:21 -04:00
Tyler Stachecki
99a6b1ee28 os/unix: Add keyboard press and release events. 2014-08-26 22:44:27 -04:00
Tyler Stachecki
3ed2957de7 Fix a careless mistake in the last commit. 2014-08-24 21:53:30 -04:00
Tyler Stachecki
dad4626533 Fix the showstopping coherency bug.
This bug is the result of an optimization gone wrong. To keep
performance high, we cache the last-used MIPS instruction and data
segments (useg, sseg, kseg, uxseg, etc.), instead of recomputing the
segment 1-2x per cycle (it's expensive).

Unfortunately, this means that the segments need to be manually
invalidated at certain points, lest one risks using a segment which
may no longer be valid. This was the case for this bug, in which the
segments were not invalidated following an ERET (exception return).
2014-08-24 20:58:16 -04:00
Tyler Stachecki
315a1220c7 Add a temporary fix to restore builds on MSVC. 2014-08-24 11:20:04 -04:00
Tyler Stachecki
d839dd57a3 Remove some bogus, unnecessary logic. 2014-08-24 00:36:21 -04:00
Tyler Stachecki
1fcc6254ff Remove a pair of fall-through branch targets. 2014-08-23 23:56:37 -04:00
Tyler Stachecki
d72a7d38ef Last batch of TLB translation fixes. 2014-08-23 23:52:52 -04:00
Tyler Stachecki
404bbb9253 Use the correct page mask value. 2014-08-23 22:36:46 -04:00
Tyler Stachecki
6ef9115668 Fix a bunch of TLB translation bugs. 2014-08-23 22:10:46 -04:00
Tyler Stachecki
e6bc8ebe64 Add more TLB support, verify things. 2014-08-23 20:06:45 -04:00
Tyler Stachecki
aba5b13ba1 Fix MFC1 now that FS/FT handling is correct. 2014-08-23 16:59:24 -04:00
Tyler Stachecki
c7e09f90bd Add enough support for libdragon to run. 2014-08-23 16:25:35 -04:00
Tyler Stachecki
84deb2fd6b Set available RDRAM size for 6102/6105 carts. 2014-08-23 15:59:15 -04:00
Tyler Stachecki
c6c6b2782d Fix a very subtle bug in the segment cacher. 2014-08-23 15:22:50 -04:00
Tyler Stachecki
5f5d4da9a6 Commit preliminary (untested) TLB support. 2014-08-23 14:24:21 -04:00
Tyler Stachecki
925e1e2dcd Make sure SSSE3 flags are passed to GCC/Clang. 2014-08-22 08:44:00 -04:00
Tyler Stachecki
2b94264a92 Pass IW to each opcode function.
Instead of having almost every opcode function load IW off the
stack through the VR4300 pointer, just pass it as an argument on
the stack to reduce binary size and hoist a load up.

Thanks go out to Narann for this idea.
2014-08-22 07:54:53 -04:00
Tyler Stachecki
53c875b06c Support more ops within the CACHE instruction. 2014-08-21 21:46:53 -04:00
Tyler Stachecki
266b77bd5c Remove a useless state/cycle type. 2014-08-21 21:45:50 -04:00
Tyler Stachecki
d1d03d36bf Remvoe the pseudo-fault (UNC). 2014-08-21 21:45:30 -04:00
Tyler Stachecki
156b41d6a1 Optimize writes that hit in the data cache. 2014-08-21 21:43:21 -04:00
Tyler Stachecki
da980ed4d2 Fix up some sloppy hacks from before. 2014-08-21 21:43:16 -04:00
Tyler Stachecki
172d61358f Actually start using the data cache. 2014-08-21 21:43:11 -04:00
Tyler Stachecki
81c799576a Fill and flush data cache lines as required. 2014-08-21 21:43:07 -04:00
Tyler Stachecki
04a40ccc91 Implement DCM/DCB according to the manual. 2014-08-21 21:43:00 -04:00
Tyler Stachecki
3ef365b78f Move data memory writes to fault handlers. 2014-08-21 21:42:48 -04:00
Tyler Stachecki
f95d6c80af Make data cache accesses less painful to look at. 2014-08-21 21:42:09 -04:00
Tyler Stachecki
7ed69c7d38 Fix MI_INIT_MODE_REG bug.
MI_INIT_MODE, MI_EBUS_TEST_MODE and MI_RDRAM_REG_MODE bits
were begin unconditionally masked out, even when not explicitly
asked.

Thanks to bsmiles32 for pointing out this bug.
2014-08-21 20:45:03 -04:00
Tyler Stachecki
13eb205caf Fix bugs in LDL/LDR combined function.
Thanks to Nacho for reporting this bug.
2014-08-21 20:41:22 -04:00
Tyler Stachecki
2a7cbe9f20 Fix some Windows issues introduced in last commits. 2014-08-21 09:40:46 -07:00
Tyler Stachecki
38ba3f7893 Fix x86_64 build errors in last commits. 2014-08-21 12:24:08 -04:00
Tyler Stachecki
65d4da87c6 Add SSE2/SSSE3 implementations of RSP bitwise functions. 2014-08-19 16:08:42 +00:00
Tyler Stachecki
1d3e7bac33 Add NEON implementations of RSP bitwise functions. 2014-08-19 15:18:28 +00:00
Tyler Stachecki
0158b65c0c Start implementing NEON backend for RSP. 2014-08-19 11:39:42 +00:00
Tyler Stachecki
ced4183158 More restructuring of arch/ and os/ code. 2014-08-18 16:54:01 +00:00
Tyler Stachecki
3e8ba50851 Add common arch/ folder, move headers out of os/.
Much of the architecture-specific code uses compiler-agnostic
intrinsics. For this reason, split it out into an arch/ folder,
leaving only the compiler and environment-specific code in os/.
2014-08-18 16:08:45 +00:00
Tyler Stachecki
2e43bb6f49 Add non-x86_64 implementations for DMULT/DMULTU. 2014-08-18 12:38:36 +00:00
Tyler Stachecki
b95522aa7f Cleanup the CMakeLists file after last commit. 2014-08-17 16:56:17 +00:00
Tyler Stachecki
0ab8ead055 Add support for IA32, remove ARM NEON requirement. 2014-08-17 16:29:57 +00:00
Tyler Stachecki
42f7833b62 Add support for ARM builds with GCC/Clang. 2014-08-17 16:29:48 +00:00
Tyler Stachecki
fb3d52d222 Fix a typo in the last commit.
Thanks, krom!
2014-08-03 17:04:47 -04:00
Tyler Stachecki
7116582a6b Combine more execution functions. 2014-08-03 13:42:08 -04:00
Tyler Stachecki
26908fb00e Combine some execution functions. 2014-08-03 03:46:33 -04:00
Tyler Stachecki
ab941a6854 Add os/timer, implement backends. 2014-08-03 03:02:14 -04:00
Tyler Stachecki
4fcd566f02 Add os/rom_file, implement backends. 2014-08-03 01:53:19 -04:00
Tyler Stachecki
6f15585802 Cleanup Windows os/ code. 2014-08-02 23:44:13 -04:00
Tyler Stachecki
2c7c109d16 Reduce number of symbols. 2014-08-02 23:29:13 -04:00
Tyler Stachecki
776a27dbab Fix a bug in the busy wait detector. 2014-08-02 19:06:34 -04:00