Description
Dear team,
I wanted to bring to your attention an issue I encountered while studying your code. I noticed that you have defined three additional registers that seem to have the same function as those in the original unicorn. However, these registers do not conform to ARM register definitions.
After further investigation, I realized that these registers are only used for stack swapping during interrupts. In order to properly change the stack during ARM interrupts, the value of UCARMREGCONTROL [1] should be modified to determine the current process stack being used. This is also mentioned in The Definitive Guide to ARM Cortex M3 and Cortex M4 Processors, as shown in the attached figure.
I tried making this change in the code and the running results showed that unicorn was able to correctly handle the stack change request. I would like to submit my changes for your review so that you can see the specific location of the modification.
Thank you for your attention to this matter.
Best regards.