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

Add Armv7M support for Cortex-M4 and Cortex-M7 #61

Draft
wants to merge 362 commits into
base: main
Choose a base branch
from
Draft

Conversation

mkannwischer
Copy link
Collaborator

Continuation of #55

@jnk0le
Copy link

jnk0le commented Jul 4, 2024

regarding the pipeline models, I did some analysis on those already.
M7 (it was even cited by paper linked by one keccak file): https://github.com/jnk0le/random/tree/master/pipeline%20cycle%20test#cortex-m7
and M4: https://github.com/jnk0le/random/tree/master/pipeline%20cycle%20test#cortex-m3-and-m4

mkannwischer and others added 7 commits October 17, 2024 20:42
* Introduces loop class for loops that restore the compare-to pointer using a vmov
* Modifies mode of operation for loop extraction: The loop instructions need to appear in sequence
* Slight code modification to make loop parsable
Previously the selftest would determine which registers
are supposed to contain addresses  (and allocate memory
accordingly) by going through all memory operations and
assuming that address registers used in those are the
inputs holding the addresses initially.

This assumption does not hold as
(1) addresses may be moved around
(2) addresses may actually be a result of a previous computation.

One example where this did not work was

vmov rX, sY
ldr tZ, [rX]

here the selftest would assume that rX needs to be
an address. However, sY is the register holding the
address on entry of the code.

This commit refines the code determining the address
registers by recursively going through the DFG
and determining the _input_ registers that affect
values being used as addresses.
Note that in the above examples rX would not be
marked as an address, at it is not an input.

Hopefully this approach is more robust.
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.

4 participants