Skip to content

Conversation

@xdoardo
Copy link
Collaborator

@xdoardo xdoardo commented Nov 7, 2025

The is_like_cheri target option must be used if and only if the families of the target contain "cheri".

This value is then used to make the compiler generate a slightly different inline assembly when translating the black_box intrinsic which, as it was before, would cause an error on CHERIoT:

error: couldn't allocate input reg for constraint 'r'

With this patch, the generated inline assembly uses as constraint "C" (capability-sized register) instead of "r". This patch should solve this problem not only on CHERIoT, but hopefully on other CHERI-like platforms as well: we can't, however, test this claim right now, as we currently support CHERIoT only.

Also adds a test to verify that basic usage of black_box works as expected.

@xdoardo xdoardo merged commit 3294bab into CHERIoT-Platform:beta Nov 18, 2025
4 checks passed
@xdoardo xdoardo deleted the is_like_cheri branch November 18, 2025 16:19
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