-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make ldm/stm range parsing more flexible.
Currently the Armv7-M arch model is limited to registers lists consisting of a single range: e.g., ldm r0, {r1-r7}. This is not actually the correct restriction from the manual. Actually, the registers don't have to be consecutive - the only limitation is that the lowest register is loaded from the lowest address. Or in other words: the regsiters need to be order. Also, the range is merely syntactic sugar and one can also just list all registers. This commit changes our parsing to be closer to the real world. It allows to write any register list including ranges. Internally range gets expanded to the actual list. Instructions are always written as the full list. The main motivation for this change that we were recently optimizing code containing ldm r0!, {r1-r3,r14} which cannot be parsed with the current model. With this commit, it parses correctly. This does in theory give SLOTHY more freedom in chosing register allocations, but it is yet to be seen if that is useful. args_out_combinations can become very big in this case and we may actually have to restrict that if we are running into performance issues later.
- Loading branch information
1 parent
7ecfafa
commit ce8cb55
Showing
4 changed files
with
163 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.