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

Support for 64-bit registers #289

Closed
laanwj opened this issue May 4, 2019 · 0 comments · Fixed by #295
Closed

Support for 64-bit registers #289

laanwj opened this issue May 4, 2019 · 0 comments · Fixed by #295

Comments

@laanwj
Copy link

laanwj commented May 4, 2019

Some Kendryte K210 (RISC-V RV64GC) peripherals use 64-bit registers (see riscv-rust/k210-pac#1), and, I think, also requires 64-bit accesses to these. However, the current version of svd2rust seems to ignore <size> specification for registers completely.

bors bot added a commit that referenced this issue May 22, 2019
295: Add support for 64-bit registers r=therealprof a=Disasm

Some registers on K210 chip are 64-bit, so it's better to declare them as u64 in SVD for the reasons mentioned here: riscv-rust/k210-pac#1 (comment)
At the moment, svd2rust forbids 64-bit register declarations. This PR fixes this.

This change can cause silent bugs on platforms without 64-bit memory access operations due to the need for proper access sequence to 64-bit registers with two 32-bit accesses.

Closes #289

Co-authored-by: Vadim Kaushan <[email protected]>
@bors bors bot closed this as completed in #295 May 22, 2019
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 a pull request may close this issue.

1 participant