Commit Graph

4450 Commits

Author SHA1 Message Date
Andrew Church
85bf8a0497 interpreter: Implement correct rounding for fmadds/ps_madd.
Simply casting a double-precision result to single-precision can result
in an incorrect LSB if the double-precision result is inexact but the
rounded value is exactly between two single-precision values.
2017-01-04 07:24:21 +09:00
Andrew Church
84a63ef51e interpreter: Use the proper floating-point type when setting FPRF.
This makes a difference when the result to a single-precision
instruction is a single-precision denormal; passing it as a double
causes FPRF to signal a normal result instead of a denormal.
2017-01-04 07:24:21 +09:00
Andrew Church
64de0b21cc interpreter: Fix format conversion behavior of stfs. 2017-01-04 07:24:21 +09:00
Andrew Church
628fea9074 interpreter: Properly detect underflow of floating-point operations.
PowerPC CPUs detect underflow using different conditions than x86 CPUs,
so if we get a rounded result equal to the minimum normal value, we
need to manually check for underflow.  See comments in fpArithGeneric()
for details.
2017-01-04 07:24:21 +09:00
Andrew Church
d2bb617ed0 interpreter: Fix behavior of ps_merge with large double-precision inputs. 2017-01-04 07:24:21 +09:00
Andrew Church
8fd700878c interpreter: Implement fres/ps_res and frsqrte/ps_rsqrte correctly. 2017-01-04 07:24:21 +09:00
Andrew Church
e9078166bd interpreter: Fix loss of sign bit on some edge cases in frC rounding for fmuls. 2017-01-04 07:24:21 +09:00
Andrew Church
1b739214a0 espresso: Fix reversed operand order in rlwimi disassembly. 2017-01-04 07:24:17 +09:00
Andrew Church
8c34c9e845 espresso: Ignore register fields which are ignored by hardware.
A real Espresso ignores some register fields which are unused by certain
instructions, such as frC in fadd.  Such invalid opcodes are presumably
not generated by any real-life compilers, but ignore such fields anyway
for completeness.  This may also provide a marginal performance boost to
the interpreter.

This is probably not a complete set of ignored fields, but it's enough
to pass all relevant tests in the current test suite at
<http://achurch.org/cpu-tests/ppc750cl.s>.
2016-12-31 23:14:39 +09:00
Andrew Church
19d8091287 gpu: Optimize copying between linear-mode surfaces.
The single function AddrComputeSurfaceAddrFromCoord<1, false, 8, 0> was
consuming 20% of CPU time (over all threads!) during the Xenoblade intro
movie.
2016-12-14 09:32:28 -08:00
James
7374cc5cea Merge pull request #387 from achurch/gl-sync-scan-fix
opengl: Use a sorted resource map to optimize resource updates.
2016-12-14 12:38:32 +01:00
Andrew Church
5fff296aaa Remove execute permissions from source files. 2016-12-14 18:11:38 +09:00
Andrew Church
c908700d47 kernel: Fix relocation of symbols located at the end of a section. 2016-12-14 18:11:34 +09:00
Andrew Church
2f1de9f6b9 ppcutils: Fix incorrect va_list overflow argument address. 2016-12-14 18:11:18 +09:00
Andrew Church
d831973e21 opengl: Fix uninitialized state cache field. 2016-12-14 18:11:06 +09:00
Andrew Church
848014a538 opengl: Use a sorted resource map to optimize resource updates.
Since resources are not currently expunged when the memory is reused for
another purpose, the resource maps grow over time, causing the linear
scans in notify{Cpu,Gpu}Flush() and surfaceSync() to consume more and
more CPU as time goes on.  This change introduces a ResourceMemoryMap
class to keep a sorted list of resource memory endpoints, so the scans
can touch exactly those resources that fit the requested memory range
without having to iterate over every single allocated resource.
2016-12-14 18:08:11 +09:00
James Benton
3eb3304466 Move libdecaf/*.cpp to libdecaf/src/*.cpp
libdecaf/*.* is meant for header files only.
2016-10-11 21:31:22 +01:00
James Benton
022f7a8d47 Modify ELF reading to use be_val with structs.
This allows us to delete the old shit BigEndianView.
2016-10-10 20:05:17 +01:00
James Benton
816e374819 Fix de-reference of invalid iterator. 2016-10-10 19:15:30 +01:00
James Benton
46106a1f73 gx2: Add missing CHECK_OFFSET for GX2ShadowRegisters. 2016-10-09 21:30:31 +01:00
James Benton
31243b3d2e Add missing definition for RelocationHeader::Magic. 2016-10-04 21:23:56 +01:00
James Benton
26e0fc9713 gx2: Remove duplicated kernel function register. 2016-10-04 20:43:33 +01:00
James Benton
877f0873f6 kernel: Unify symbol/export lists into a single unordered_map for HLE module symbols.
Now throws an assert if there is a symbol name conflict.
2016-10-04 20:43:28 +01:00
James Benton
7839ba6d11 Fix usage of g prefix for static variables in kernel_loader.cpp 2016-10-04 20:43:24 +01:00
James Benton
43ddddbbdb gx2: Log unknown GX2Init attribute types. 2016-10-04 20:43:19 +01:00
James Benton
7319cf122b Remove unused declaration. 2016-10-04 20:43:15 +01:00
James Benton
212adc5573 latte: Fix missing CF_CONST from LOOP_END disassembly. 2016-10-02 16:46:03 +01:00
James Benton
5075b4e280 Fix -Wshadow error. 2016-10-02 16:45:58 +01:00
James Benton
2d24bbbf79 glsl: SET* should set value 0xffffffff for int/uint types, not 1. 2016-10-02 12:28:00 +01:00
James Benton
4f6c55e6ab Seperate gfd::File into gfd::Reader and gfd::Writer.
gfd::Reader will use memory in Wii U memory space so that we can relocate
the 32 bit pointers in order to fixup the GX2 structs.
2016-10-02 12:27:41 +01:00
Brett Lawson
8160f5b113 ax: Fix bug with aux bus down-mix sample selection. 2016-09-28 20:36:31 -07:00
Brett Lawson
fc359b3632 sdl: Indicate backend mode in titlebar. 2016-09-28 16:47:15 -07:00
Brett Lawson
f514e5081b ax: Fix bug causing aux buses to be mixed incorrectly. 2016-09-28 16:47:15 -07:00
Brett Lawson
ea78959b99 Fix incorrectly set register field on non-compute. 2016-09-28 16:47:15 -07:00
Brett Lawson
e2cb07bf53 Fix configuration handling error in OpenGL Debugger UI. 2016-09-28 16:47:15 -07:00
Brett Lawson
929401254e Abstracted PM4 parsing to allow sharing with DX12. 2016-09-28 16:47:14 -07:00
Brett Lawson
8de8b04c62 Fixed incorrect handling of latte disassembly for TEX/VTX. 2016-09-28 16:46:34 -07:00
Brett Lawson
6e82ad91d7 Fixed issue where gpu_utilities were not namespaced. 2016-09-28 16:46:34 -07:00
Brett Lawson
16dc422fbe Added some missing SQ registers. 2016-09-28 16:46:34 -07:00
James Benton
5a99efeb46 coreinit: Fix variable name shadowing in FSRenameAsync. 2016-09-27 22:05:18 +01:00
James Benton
a3e69d1281 nn_save: Implement SAVERename{Async}.
Also fix return types to use SaveStatus typedef of FSStatus.
2016-09-27 21:45:57 +01:00
James Benton
afb4205639 coreinit: Implement FSRename{Async}. 2016-09-27 21:45:10 +01:00
James Benton
2c7b4524f9 filesystem: Add support for file moving / renaming.
Also introduce fs::Error, which we need to start using for other file
system operations!
2016-09-27 21:44:43 +01:00
James Benton
aa8380f902 decaf-sdl: Fix toggle display layout.
Also lets use a struct instead of passing around float[4] everywhere...!
2016-09-27 21:43:17 +01:00
James Benton
95e4f09d2b coreinit: Fix scheduler lock when used from non-cpu core threads. 2016-09-13 23:39:54 +01:00
Brett Lawson
d871756e66 Fix some things that were missed in the last commit.
There were some crazy changes to the debugger::ui drawing
code that I hadn't noticed.  I fixed them and then added
the blank DX12 drawer as I did with the rest of the draw
components.
2016-09-06 01:20:09 -07:00
Brett Lawson
e2b1d17831 Refactor decafsdl and libdecaf to support new backends.
Note that this refactor also includes a blank setup
for DX12 support.
2016-09-06 00:45:28 -07:00
Brett Lawson
9c701e2511 debugger: Added voice stream mode to the voices window. 2016-09-06 00:37:14 -07:00
James Benton
ee470034d4 gpu: Remove empty file latte_enum_sx.h 2016-09-04 22:26:38 +01:00
James Benton
3e0023abdf latte: Use the ENUM macros for all latte enums. 2016-09-04 22:26:33 +01:00