dosbox-staging:vogons/ppc-dynrec-r4330

Last commit made on 2020-02-24
Get this branch:
git clone -b vogons/ppc-dynrec-r4330 https://git.launchpad.net/dosbox-staging

Branch merges

Branch information

Name:
vogons/ppc-dynrec-r4330
Repository:
lp:dosbox-staging

Recent commits

26ecc85... by jmarsh <email address hidden>

Add PowerPC dynamic recompiler

This patch adds a dynamic recompiler for 32-bit PowerPC, based on
the existing dynrec framework. I've only tested it on a wii but there
should be no reason for it not to work on PowerPC based Macs. As far as
performance goes with core=normal I get 0.7fps from PCPBENCH, with
core=dynamic I get 3.1fps. There are some other big-endian improvements
that can be made that get it up to 4.0 but I haven't included them here
as they aren't related to dynrec.

I haven't touched any of the autoconfigure scripts, config.h needs the
following settings:
The compiler needs to support gcc inline assembly (checked via
defined(__GNUC__)) for dcache flushing/icache invalidation. There
doesn't seem to be a portable way to achieve this, but they're not
supervisor level instructions so should be fine for any userspace
program to use.

Some comments on the changes:

- I had to name the FPU_Rec struct so it could be forward-declared in
  risc_ppc.h (having a dedicated register pointed to it helps FPU
  heavy code).
- Removed some unneeded WORDS_BIGENDIAN guards in the self-modifying
  code detection, they weren't needed as the additions aren't meant to
  overflow between bytes.
- Made dyn_run_code() get called before dyn_return(BR_Link1/BR_Link2)
  and shuffled their locations a bit. The reason for this is that the
  PPC dynrec generates its epilog once in gen_run_code() and then puts
  a jump to it whenever gen_return_function() is called, rather than
  emitting a full epilog every time. If dyn_return() was called before
  dyn_run_code() the address of the epilog is unknown.
- Added missing cache_block_before_close()/cache_block_closing() calls
  for those blocks, since they were missing.
- The dynrec decoder wasn't differentiating between little-endian (host)
  memory access and regular memory access. I added new functions where
  necessary (hopefully caught them all) and aliased them to the regular
  functions when WORDS_BIGENDIAN is not defined.
- dyn_ret_near() was bugged, it tried to write a dword to &reg_ip which
  overran on big-endian.

Imported-from: https://www.vogons.org/viewtopic.php?p=731185#p731185

57bf045... by Peter Veenstra <email address hidden>

some big endian improvents and drive_fat fixes. (jmarsh)

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4330

fd11108... by Peter Veenstra <email address hidden>

Enhance capturing to handle unchanged screens more efficiently(jmarsh)

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4329

27610a2... by Peter Veenstra <email address hidden>

Small cleanup and move to ++i instead of i++ for iterators in this file

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4328

2b00069... by Peter Veenstra <email address hidden>

remove unused variable

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4327

9912151... by Peter Veenstra <email address hidden>

Add patch 285 from MHM to fix bug 367, mimics the normal event.gain code

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4326

4d4c738... by Peter Veenstra <email address hidden>

fix two tiny bugs introduced by 4065.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4325

5d7c4f0... by Peter Veenstra <email address hidden>

Fix bug 469. Give 640x480 and upwards square pixels and several fixes for high colour modes. (jmarsh)

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4324

a2f473c... by Peter Veenstra <email address hidden>

Fix compilation for platforms where the include guard is different and the exported symbol was changed by Khronos.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4323

5fc132c... by Peter Veenstra <email address hidden>

Improve logging and OS X support (jmarsh).

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4322