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

Come up with some way to instruct LLVM that all PORT/DDR registers are zeroed at startup #5

Open
dylanmckay opened this issue Aug 30, 2017 · 3 comments

Comments

@dylanmckay
Copy link
Member

At the top of main, we should be able to assume that all PORT/DDR registers are zeroed.

This should let LLVM optimise RMW OR/AND/NOT instructions into a simple assignment.

@dylanmckay
Copy link
Member Author

Maybe a macro that expands to something like

llvm::assume(PORTB::read() == 0);
...

We could tell all users to insert this into the top of main.

@shepmaster
Copy link
Member

all PORT/DDR registers are zeroed.

And that's true on soft restarts too?

@Restioson
Copy link

Perhaps there could be a compiler flag to insert that, too.

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

No branches or pull requests

3 participants