Skip to content

Conversation

arichardson
Copy link
Member

This ensures that addi 0 is no longer incorrectly compressed to c.cmove in capability mode. The difference here is that addi 0 should clear the capability metadata, but if we compress it c.mv (which behaves as CMove in capability mode) we retain the capability metadata. This commit also adds patterns to ensure that CMove is compressed to c.cmove in capability mode (but not in integer mode).

NOTE: this should be restricted to standards-compatible mode only since ISAv8/9 did not define a pattern for compressed cmove. For example, QEMU only supports this when running in standards compliant mode: CTSRD-CHERI/qemu@4f95f3f

This ensures that addi 0 is no longer incorrectly compressed to c.cmove
in capability mode. The difference here is that addi 0 should clear the
capability metadata, but if we compress it c.mv (which behaves as CMove
in capability mode) we retain the capability metadata.
This commit also adds patterns to ensure that CMove is compressed to
c.cmove in capability mode (but not in integer mode).

NOTE: this should be restricted to standards-compatible mode only since
ISAv8/9 did not define a pattern for compressed cmove.
For example, QEMU only supports this when running in standards compliant
mode: CTSRD-CHERI/qemu@4f95f3f
@arichardson arichardson marked this pull request as draft July 11, 2025 10:20
@arichardson
Copy link
Member Author

This is not ready to be merged since the HW and QEMU don't support it.

@PeterRugg FYI

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