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 inline asm constraints of wdt_enable, wdt_disable. #901

Closed
wants to merge 2 commits into from

Conversation

sprintersb
Copy link
Collaborator

This patchlet fixes inline assembly constraints of wdt_enable and wdt_disable from include/avr/wdt.h.

Some of the operands like uint8_t temp are not inputs but are being assigned to in inline asm, so they have to be moved to the ouput operands.

If a register uses cbr or sbr, then it must be in reg-class upper registers d, not general regs r.

One #define needed wrapping into do-while (or removal of terminal ;).

@sprintersb
Copy link
Collaborator Author

Adjusting constraints might be more comprehensible than masking like proposed by #888.

@sprintersb
Copy link
Collaborator Author

Implemented as 4540e09

@sprintersb sprintersb closed this Feb 1, 2024
@sprintersb sprintersb deleted the fix-wdt.h branch February 8, 2024 21:26
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.

1 participant