Skip to content

Conversation

xdoardo
Copy link
Collaborator

@xdoardo xdoardo commented Sep 11, 2025

Since simply casting an usize to a raw pointer will incur a compilation error, I think we need built-ins to create pointers without provenance and to get the address part of a pointer with provenance.

@xdoardo xdoardo changed the title Add CHERI-specific built-ins and use them in core::ptr. Add CHERI-specific built-ins and use them in core::ptr Sep 11, 2025
@seharris
Copy link
Collaborator

This is a really small nitpick because it's just aesthetic, but I feel like it would be slightly tidier to match the existing code and use self.cast::<()>() instead of self as in addr() and without_provenance().

@xdoardo
Copy link
Collaborator Author

xdoardo commented Sep 12, 2025

This is a really small nitpick because it's just aesthetic, but I feel like it would be slightly tidier to match the existing code and use self.cast::<()>() instead of self as in addr() and without_provenance().

Fixed with c322356, which also removes the bootstrap gates.

@xdoardo xdoardo marked this pull request as ready for review September 12, 2025 13:00
@xdoardo xdoardo merged commit 7b63403 into CHERIoT-Platform:beta Sep 17, 2025
2 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