Commit Graph

16 Commits

Author SHA1 Message Date
Patrick Mackinlay
eff5477f0f mips: preserve upper 32 bits for single-precision fp operations (nw)
While this behaviour is undefined according to the MIPS R4000 Microprocessor User's Manual, various factors point toward it most likely being correct, including:
1. The fact MIPS-I exposes 16x64-bit floating-point registers, but internally implements them as pairs of 32-bit registers (with only the even-numbered pairs being valid for arithmetic operations), making it somewhat likely MOV.S, like LWC1 and SWC1, can access either half.
2. Explicit mention in IDT documentation and "See MIPS Run", i.e. "The odd-numbered registers can be accessed by move and load/store instructions", and other commentary.
3. The presence of paired-single operations in later MIPS32/64 specifications, which operate on independent single-precision values stored in each of the lower and upper halves of a single floating-point register.
2019-04-25 11:02:04 +07:00
Vas Crabb
97b6717027 (nw) Clean up the mess on master
This effectively reverts b380514764 and
c24473ddff, restoring the state at
598cd52272.

Before pushing, please check that what you're about to push is sane.
Check your local commit log and ensure there isn't anything out-of-place
before pushing to mainline.  When things like this happen, it wastes
everyone's time.  I really don't need this in a week when real work™ is
busting my balls and I'm behind where I want to be with preparing for
MAME release.
2019-03-26 11:13:37 +11:00
andreasnaive
b380514764 Revert "conflict resolution (nw)"
This reverts commit c24473ddff, reversing
changes made to 009cba4fb8.
2019-03-25 23:13:40 +01:00
Patrick Mackinlay
85f865a782 mips1: bc2/bc3 always work (nw)
BCzF/BCzT can be used (by reading input lines) when coprocessor 2 or 3 are enabled, even when there's no real coprocessor hardware.
2019-03-01 11:16:04 +07:00
Patrick Mackinlay
e02a5cf1f5 mips1: fpu emulation
Code refactoring makes the changes hard to isolate, but the main improvements are:
* implemented fpu instructions and exceptions
* corrected swl/swr implementation
* tlb mru lookup optimization
* interrupt and privilege debugger breakpoints
2019-02-26 18:54:04 +07:00
Patrick Mackinlay
130955fef2 mips1: magic number removal and more logging (nw) 2019-01-09 16:52:49 +07:00
arbee
80a5e7f43f mips1: fix Clang compile (nw) 2019-01-04 07:49:05 -05:00
Patrick Mackinlay
15c9d80813 mips1: fix coprocessor exceptions (nw)
* set the coprocessor error number in the cause register
* corrected side-effect handling in address translation
* added logging for RISC/os system calls
2019-01-03 13:32:14 +07:00
Patrick Mackinlay
0e036c6b78 mips1: fix stupid tlb error (nw) 2019-01-01 14:56:45 +07:00
Patrick Mackinlay
eb02f89a2c mips1: tlb fixes (nw)
* corrected cop0 context register encoding
* corrected invalid tlb entry exception vector
* improved logging
2018-12-20 12:48:45 +07:00
Patrick Mackinlay
a3f7b2a415 mips1: missed this (nw)
Make sure the exception target address isn't incremented.
2018-12-18 21:04:07 +07:00
Patrick Mackinlay
2af742e9d1 mips1: handle exceptions in delay slot instructions (nw)
I introduced this error when adding tlb support and modifying the exception code previously. This resolves the error, cleans up delayed branch handling and fixes a panic in the mips rx2030 and rx3230 driver.
2018-12-18 18:21:19 +07:00
Vas Crabb
f36e9e33fe (nw) adjust some stuff (uniform spacing, standardised logging, capitalised template parameters, etc.) 2018-11-28 02:55:46 +11:00
Patrick Mackinlay
aa186556c4 mips1: handle no cache (nw) 2018-11-19 21:02:48 +07:00
Patrick Mackinlay
723ccbab17 mips1: fix overflow logic (nw) 2018-11-07 10:51:03 +07:00
Patrick Mackinlay
9df6cfe087 r3000: call it like it is (nw) 2018-11-06 17:21:01 +07:00