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

Fix armv7m arch model #124

Merged
merged 4 commits into from
Dec 16, 2024
Merged

Fix armv7m arch model #124

merged 4 commits into from
Dec 16, 2024

Conversation

mkannwischer
Copy link
Collaborator

@mkannwischer mkannwischer commented Dec 15, 2024

Some small fixes pulled out of the armv7m branch:

  1. Setting the arch_name

  2. Fixing the model for vldm/vstm. Small tweaks to the Armv7-M architecture model #116 changed the model for those and incorrectly modelled it as allowing any combination of registers in the register list of vldm/vstm. While this is true for ldm and stm, it doesn't work for vldm/vstm. There it actually need to be a list of consecutive registers (which makes sense because otherwise there are just too many combinations). This lead to an explosion of combinations and, consequently, RAM usage.

  3. Work around LLVM complaining about .w for ldr/str instructions with negative offset. These are 32-bit anyway as only the 32-bit encoding allows negative offsets. We cannot fix this in our input code as the address fixup changes the offests. Better ideas are welcome!

  4. Fix some warnings about the regexes in the armv7m model.

@mkannwischer mkannwischer marked this pull request as ready for review December 15, 2024 03:45
Copy link
Collaborator

@dop-amin dop-amin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

slothy/targets/arm_v7m/arch_v7m.py Show resolved Hide resolved
@mkannwischer mkannwischer merged commit 4d32165 into main Dec 16, 2024
13 checks passed
@mkannwischer mkannwischer deleted the fix-armv7m branch December 16, 2024 10:32
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