Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add aarch64 support to the SH2 dynarec #87

Open
dsx724 opened this issue Oct 1, 2018 · 13 comments
Open

Add aarch64 support to the SH2 dynarec #87

dsx724 opened this issue Oct 1, 2018 · 13 comments
Labels

Comments

@dsx724
Copy link

dsx724 commented Oct 1, 2018

Right now, the SH2 dynarec (used for Sega 32X) only works for the following platforms:

  • Intel x86 (32bit / 64bit)
  • ARM v7 (32bit)

Every other architecture right now has to fall back on an interpreter core which is not fast enough for many low powered Aarch64 SoCs, including the one on the Nintendo Switch.

This bounty is for the purpose of adding an Aarch64 dynarec backend as well to the existing SH2 dynarec. Perfomance needs to be comparable or better than the existing dynarecs.

https://www.bountysource.com/issues/64126757-missing-feature-ifdef-__aarch64__-in-cpu-sh2-compiler-c

Bounty has been started and starts at $50.

Edited by: twinaphex

@inactive123 inactive123 changed the title missing feature: #ifdef __aarch64__ in ./cpu/sh2/compiler.c Add aarch64 support to the SH2 dynarec Oct 8, 2018
@dmiller423
Copy link

They are what 20mhz? The interpreter must be terribly slow...
This is odd since the instructions are 16b like thumb and a jump table / [] func *'s caches well compressed.
Theoretically even on bad performance 2x of them should only take ~400-500mhz to emulate...

Also isn't ARMv8 capable of running 32b arm code?

@andres-asm
Copy link

andres-asm commented Oct 8, 2018

ARMv8 can, switch, or at least libnx can't.
Even if it could that doesn't make the bounty irrelevant. AARC64 SoCs are becoming common and there are gonna be slow SoCs, fast SoCs, bad SoCs, good SoCs.

@dmiller423
Copy link

I don't have a ton of time, but given enough interest, perhaps I could add an aarch64 emitter to the dynarec in reicast and add it to picodrive as well.

@dsx724
Copy link
Author

dsx724 commented Oct 8, 2018

How much time would you estimate such a project would take?

@dmiller423
Copy link

A full aarch64 emitter to satisfy reicast would take a few weeks, updating the recompiler and testing would take several more per target. Prob ~ 2-3mo

@irixxxx
Copy link
Collaborator

irixxxx commented Jul 31, 2019

Would this be satisfactory: https://github.com/irixxxx/picodrive

@m4xw
Copy link

m4xw commented Jul 31, 2019

@irixxxx I will check it out and try it on the Switch, if it's satisfactory and you want the bounty, sure go claim afterwards.
Will probably be a few days since I have a lot of stuff to do IRL.

@Panderner
Copy link

Current state of aarch64 dynarec?

@hizzlekizzle
Copy link

no change

@Panderner
Copy link

Any updates for this?

@hizzlekizzle
Copy link

Nope. No change.

@irixxxx
Copy link
Collaborator

irixxxx commented Jan 13, 2021

With current core It should be enabled on all build targets with aarch64 architecture. Any feedback?

@m4xw
Copy link

m4xw commented Jan 28, 2021

It doesn't seem to be enabled for Switch (libnx)?
I would expect a crash since it would need support for dual bases in the emitter (different rx and rw buffers) but it runs as usual.
Should be fairly simple to add support tho if its now in the repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants