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

__clear_cache fix for ARM 64 devices plus ANDROID cleanup #618

Merged
merged 1 commit into from
Feb 3, 2019

Conversation

fzurita
Copy link
Member

@fzurita fzurita commented Feb 3, 2019

This implements a fix for a bug in some arm 64 bit CPUs as seen here:

dolphin-emu/dolphin#4204

Also, removed some ANDROID specific code that is no longer needed.

@Gillou68310 you should review this please. I didn't see any performance penalties.

Should we attribute the source of the fix in the code?

@fzurita fzurita force-pushed the arm64_exynos_bug_fix branch from 8149314 to 6bedec0 Compare February 3, 2019 04:10
@Gillou68310
Copy link
Member

Well I don't like intrinsics but I guess I won't ask you to write it in assembly ;-)
You already gave the source in this PR I don't think it's necessary to add it in the source code.

@fzurita
Copy link
Member Author

fzurita commented Feb 3, 2019

Feel free to rewrite it in assembly :-)

@Gillou68310
Copy link
Member

Maybe later

@fzurita
Copy link
Member Author

fzurita commented Feb 3, 2019

Ok to merge then?

@Gillou68310 Gillou68310 merged commit d84ca04 into mupen64plus:master Feb 3, 2019
@fzurita fzurita deleted the arm64_exynos_bug_fix branch February 3, 2019 13:03
@Gillou68310
Copy link
Member

Yep

@fzurita
Copy link
Member Author

fzurita commented Feb 4, 2019

@Gillou68310 I'm getting a warning from static analysis with clang tidy (It was added on Android Studio 3.3):

Line 4453: Local variable 'memtarget' might not have been initialized

It may explain all the breakpoint crashes I have been seeing in the play store.
signal 5 (SIGTRAP), code 1 (TRAP_BRKPT)
Thoughts?

This is in the storelr_assemble function.

@Gillou68310
Copy link
Member

That uninitialized variable is bad and should be fixed but I don't think it's the cause of the breakpoint.

Currently SWL/SWR/SDL/SDR instructions have no fallback to interpreted opcode, which means that a store with no valid TLB map or an address outside RDRAM (eg: 0xa4000000) will trigger a breakpoint. This is true for all platform except ARM which has no breakpoint.

We really need to find the game that triggers this so I can implement interpreted fallback properly.

@fzurita
Copy link
Member Author

fzurita commented Feb 5, 2019

Also, I'm still seeing some of these crashes with bad core dumps in arm64 devices:

signal 4 (SIGILL), code 1 (ILL_ILLOPC)

Any chance we are emitting some bad instruction? I'm not seeing it in arm32.

@Gillou68310
Copy link
Member

that's possible indeed

@fzurita
Copy link
Member Author

fzurita commented Feb 5, 2019

Too bad I can't find which game

@Gillou68310
Copy link
Member

¯_(ツ)_/¯

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

Successfully merging this pull request may close these issues.

2 participants