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

Invalid status register shall not terminate simulation #6

Closed
vhotspur opened this issue Nov 1, 2019 · 0 comments
Closed

Invalid status register shall not terminate simulation #6

vhotspur opened this issue Nov 1, 2019 · 0 comments

Comments

@vhotspur
Copy link
Member

vhotspur commented Nov 1, 2019

If the status register is badly set (cp0_status_ksu == 3) MSIM may terminate on assertion in either convert_addr_kernel32 or convert_addr_kernel64 because of ASSERT(CPU_KERNEL_MODE(cpu)); (inside cpu.c, called from convert_addr).

It should probably be better to throw an exception (perhaps excCpU for Coprocessor Unusable) to allow the user debug the problem instead of aborting forcefully.

[Reproducible with Kalisto if one of the mfc0 $status is commented out in the context switch code.]

vhotspur added a commit that referenced this issue Dec 20, 2019
HanyzPAPU pushed a commit to HanyzPAPU2/msim_clean that referenced this issue Mar 11, 2023
HanyzPAPU pushed a commit to HanyzPAPU2/msim_clean that referenced this issue Mar 11, 2023
We throw an address error as this state is not covered explicitly
by the R4000 manual. Seems the closest as we cannot complete
the translation anyway.
HanyzPAPU pushed a commit to HanyzPAPU2/msim_clean that referenced this issue Mar 11, 2023
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

No branches or pull requests

1 participant