Commit graph

2672 commits

Author SHA1 Message Date
twinaphex
1125099cce Cherry-pick 3609c5a117098953da789b5e535421e2007e860c from mupen64plus-libretro: Rebase do_SP_Task against Project64's RunRSP function - fixes Banjo Kazooie/Blast Corps/Banjo Tooie and possibly other Rare games with LLE (Angrylion and cxd4 RSP) - no regressions in HLE mode. Doesn't fix Perfect Dark with LLE yet (Angrylion/cxd4 RSP) - hardlocks after first splash screen - must be separate issue 2015-09-12 12:51:58 -07:00
Richard Goedeken
85ea12b7df Rename update_count to cp0_update_count so next commit will merge easier 2015-09-12 12:20:57 -07:00
Gillou68310
6d0a99f54d old_dynarec: Use uintptr_t instead of using macros to differentiate between "long" and "long long" in gencallinterp() 2015-09-01 11:04:00 +02:00
Gillou68310
8fd1009c61 old_dynarec: Allow building the old dynarec on x64 with VisualStudio2013 2015-08-31 18:29:11 +02:00
Richard Goedeken
bf68e6af90 Merge pull request #128 from mupen64plus/rename-dynarec-wiki
Rename new_dynarec.txt to new_dynarec.mediawiki
2015-08-13 20:37:50 -07:00
Dorian Fevrier
25307423ff Rename new_dynarec.txt to new_dynarec.mediawiki
This will simply allow this file to be read by github
2015-08-13 17:19:04 -04:00
Richard Goedeken
f50009c50f Merge branch 'master' of https://github.com/mupen64plus/mupen64plus-core 2015-07-21 21:06:58 -07:00
Richard Goedeken
1b988855fa wiki updates 2015-07-21 21:06:34 -07:00
Richard Goedeken
84d442184a Merge pull request #124 from Gillou68310/multdiv_x86
new_dynarec: Implemented recompiled DMULT instruction on x86
2015-07-07 22:51:24 -07:00
Richard Goedeken
8112c0419f Merge pull request #125 from Gillou68310/rm_oot_subscreen_hack
Remove Zelda OoT Subscreen Delay Fix from mupen64plus.ini
2015-07-07 22:45:23 -07:00
Gillou68310
4c669b2757 Remove Zelda OoT Subscreen Delay Fix from mupen64plus.ini 2015-06-30 14:52:31 +02:00
Gillou68310
e0554d5f9d new_dynarec: Implemented recompiled DMULT instruction on x86 2015-06-23 16:28:59 +02:00
Dorian Fevrier
d84caf0186 Merge pull request #123 from Gillou68310/textrel
Merge back "Avoid .text relocations in PIC shared library" fix + cleanup linkage_arm.S
2015-06-16 10:26:23 -04:00
Gillou68310
d0aa6005c3 new_dynarec: Cleanup linkage_arm.S 2015-06-15 18:17:12 +02:00
Sven Eckelmann
17ae4047dc Avoid .text relocations in PIC shared library
The linkage_arm code of the new_dynarec on arm currently uses TEXTREL
to patch some addresses during dynamic linking. This is not to be
expected because the code is compiled as position independent code.

Instead the access of global variables must also be position
independent in this part of the code. But indirect access through the
global offset table would require extra memory loads and use additional
registers. Furtunately, GOT can be avoided here by using PC relative
addresses. This is possible because linkage_asm.S only accesses global
variables inside the current shared object. The linker can calculate
the relative positions during compile time and only a single extra
"add" instruction is required to calculate the final address from the
PC relative offset.
2015-06-15 18:15:47 +02:00
Richard Goedeken
87b9b5778c Revert "Avoid .text relocations in PIC shared library", because according to Gillou68310 this change causes crash at start of Conker's BFD on android.
This reverts commit 560032b6e5.
2015-06-12 21:08:54 -07:00
Richard Goedeken
86a8673448 Merge pull request #122 from bentley/openbsd
Remove unnecessary OpenBSD warning.
2015-06-07 07:13:18 -07:00
Anthony J. Bentley
f62e8f8551 OpenBSD has had good support for mupen64plus for multiple releases now. 2015-06-06 23:19:52 -06:00
Richard Goedeken
44fb3c3670 bugfix: gameshark cheat codes which modified executable program code were not marking cached code pages dirty, and thus usually didn't work 2015-06-06 21:58:46 -07:00
Richard Goedeken
538b705eb4 Merge pull request #120 from conchurnavid/arm_pic_notextrel
Avoid .text relocations in PIC shared library
2015-06-06 08:56:34 -07:00
Richard Goedeken
31a41822c4 fix joystick-mapped Core events under SDL2 2015-06-03 22:52:45 -07:00
Sven Eckelmann
560032b6e5 Avoid .text relocations in PIC shared library
The linkage_arm code of the new_dynarec on arm currently uses TEXTREL
to patch some addresses during dynamic linking. This is not to be
expected because the code is compiled as position independent code.

Instead the access of global variables must also be position
independent in this part of the code. But indirect access through the
global offset table would require extra memory loads and use additional
registers. Furtunately, GOT can be avoided here by using PC relative
addresses. This is possible because linkage_asm.S only accesses global
variables inside the current shared object. The linker can calculate
the relative positions during compile time and only a single extra
"add" instruction is required to calculate the final address from the
PC relative offset.
2015-05-26 18:46:59 +02:00
Dorian Fevrier
8d60d254f8 Merge pull request #117 from littleguy77/master
Squelch sscanf warning in arm_cpu_features.
2015-05-05 11:07:31 -04:00
littleguy77
bbd99a8d0f Squelch sscanf warning in arm_cpu_features.
GCC 4.8 warns about a format/type mismatch in the sscanf statements.
2015-05-05 08:32:33 -04:00
Richard Goedeken
4ad1c2b766 byte swapping intrinsics were not added until GCC 4.3 2015-05-04 23:36:35 -07:00
Richard Goedeken
9326ebcdd1 update text files and version number for upcoming 2.5 release 2015-04-26 12:30:18 -07:00
Richard Goedeken
b78b806c3a fix build warning 2015-04-26 12:29:40 -07:00
Richard Goedeken
decc667427 regtest: we should only archive the screenshot directory if the reference video comparison test was enabled 2015-04-19 21:30:53 -07:00
Richard Goedeken
796713ca88 fix build errors in msvc2013 2015-04-12 13:53:00 -07:00
Dorian Fevrier
357fa5c124 Merge pull request #113 from Gillou68310/clean_blocks
new_dynarec: Fixed blocks restoring
2015-04-09 07:27:24 -04:00
Gillou68310
e781e800bc new_dynarec: Fixed blocks restoring 2015-04-08 10:59:04 +02:00
Dorian Fevrier
bf2f97923c Merge pull request #99 from Nebuleon/miscellanea
More decoupling
2015-03-27 22:15:05 -04:00
Nebuleon Fumika
dd7afa1c26 Factor out the code that updates the x86 rounding mode
cp1.c now contains update_x86_rounding_mode, which is used by CTC1 and
the code that loads saved states. The rounding_mode variable also gets
a new code comment explaining why it's there with the size it has.

This commit may make the Hacktarux JIT/x86, Hacktarux JIT/amd64 and
New Dynarec/x86 more compatible with games that often switch rounding
modes and require correct results, even after reloading a saved state.
2015-03-26 18:42:31 +00:00
Nebuleon Fumika
204fe02049 Move *_mode, x86 rounding mode constants, out of cp1.c
This affects global variables 'round_mode' (not to be confused with
'rounding_mode', which is a variable containing the latest rounding
mode at run time), 'trunc_mode', 'floor_mode' and 'ceil_mode'. They
are placed into the following files instead:

* src/r4300/new_dynarec/x86/assem_x86.c (uses rounding_modes, which
  already existed);
* src/r4300/x86/gcop1.c;
* src/r4300/x86-64/gcop1.c.
2015-03-26 18:42:27 +00:00
Nebuleon Fumika
3e9b64d301 recomp.c: Remove duplication in code for alternate physical addresses 2015-03-26 18:41:22 +00:00
Nebuleon Fumika
2ef6d56540 dbg_memory.c: Do not use invalid_code in CHECK_MEM 2015-03-26 18:41:22 +00:00
Nebuleon Fumika
6cab2f03f6 interpreter_r4300.def: Convert some more types to uint32_t and uint64_t
Commit 780bde88d2 should have had those
conversions, but I forgot them.
2015-03-26 18:41:22 +00:00
Nebuleon Fumika
9d255591f5 fpu.h: Use the MIPS FPU control register instead of 'rounding_mode'
Using 'rounding_mode' has two main problems:
- 'rounding_mode' is used by the Hacktarux JIT for x86 and x86-64 and
  is in the format expected by those processors. This creates coupling
  between the interpreter and the Hacktarux JIT.
- 'rounding_mode' is updated by the CTC1 opcode, but not by loading a
  saved state. If a saved state is loaded, and its FCR31 rounding mode
  bits differ from those currently being used, it takes another CTC1
  for 'rounding_mode' to be updated, but FCR31 is updated immediately.

This commit may make the interpreters more compatible with games that
often switch rounding modes and require correct results.
2015-03-26 18:41:15 +00:00
Dorian Fevrier
92fccbb716 Merge pull request #111 from conchurnavid/includes
Remove some includes which are not necessarily required
2015-03-26 10:35:56 -04:00
Conchúr Navid
c3b30745d8 Remove some includes which are not necessarily required 2015-03-25 16:05:45 +01:00
Richard Goedeken
084c54d0fa Merge pull request #110 from conchurnavid/includes
Cleanup includes order and add missing includes
2015-03-23 16:44:28 -07:00
Conchúr Navid
796ae25095 Add missing includes and forward declarations 2015-03-22 20:20:24 +01:00
Conchúr Navid
d6880e5531 Sort the includes based on type and names 2015-03-21 12:19:54 +01:00
Conchúr Navid
9548ce4081 Fix executable bits of files 2015-03-21 10:53:38 +01:00
Dorian Fevrier
0b1954d54b Merge pull request #109 from bsmiles32/fix_skip_to_next_block
Fix skip to next block logic in code invalidation.
2015-03-19 18:57:57 -04:00
Bobby Smiles
626bf95f6d Fix skip to next block logic in code invalidation.
I forgot to clear the bits before setting their new value in commit
30b97ee. That could cause problems with non word aligned addresses.
2015-03-19 18:46:51 +01:00
Richard Goedeken
65da109594 Merge pull request #108 from bsmiles32/fix_perf_regression
Don't invalidate cached code if instruction is not compiled.
2015-03-18 20:41:56 -07:00
Bobby Smiles
30b97ee9dd Don't invalidate cached code if instruction is not compiled.
This fixes the performance regression which affects Gauntlet Legend
when played with the old dynarec. The regression has been introduced
in commit 36a1c4fff7.
2015-03-19 00:02:25 +01:00
bsmiles32
409de8567c Merge pull request #106 from bsmiles32/thats_why_i_shouldnt_automerge_my_stuff
Fix regression introduced by commit 8ae91b5.
2015-03-15 13:58:13 +01:00
Bobby Smiles
4852f3db2f Fix regression introduced by commit 8ae91b5. 2015-03-15 13:30:28 +01:00