Skip to content

Conversation

@romancardenas
Copy link
Contributor

To the best of my knowledge, zeroing general-purpose registers is not required at all. In fact, after zeroing them, the boot process uses a few temporary registers and leaves them dirty when jumping to main.

I checked the cortex-m-rt source code, and it seems that they do not clear general-purpose registers. Thus, I guess that it is not harmful to shrink the boot process a bit.

@romancardenas romancardenas requested a review from a team as a code owner June 26, 2025 06:39
Copy link
Member

@MabezDev MabezDev left a comment

Choose a reason for hiding this comment

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

Makes sense, we don't zero the gp/fp registers in esp-riscv-rt either

@romancardenas romancardenas added this pull request to the merge queue Jun 26, 2025
Merged via the queue into master with commit 953ad99 Jun 26, 2025
138 checks passed
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