[WIP] Detection of ARM THUMB context switch #4555
Draft
+19
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Your checklist for this pull request
Detailed description
This is a WIP / Draft merge for my work on detecting ARM THUMB context switches. This can only be done when the A2 encoding of the
blx
instruction is encountered, which I am detecting and handling. See A8-346 of the "ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition."Keep in mind I've yet to clean up artifacts, prints, and other things from the MR, so don't judge too hard the cleanliness until I say otherwise haha. I've also yet to "de-magic" some numbers with defines.
Test plan
I have not written tests yet for this, but I do have an example binary that I have patched from the original issue (#4357) attached here, that will be taken into consideration when writing tests.
Closing issues
closes #4357
p2kmod.zip