-
Notifications
You must be signed in to change notification settings - Fork 34
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
Cbuildcap and ctestsubset and the use of DDC #18
Comments
@francislaus : Thanks for the feedback. You are absolutely right, the original specification for CBuildCap and CTestSubset in CHERI v9 does have a special case for DDC when Given the current split of extensions in the spec, option (1) seems is a better fit. |
I also vote for option (1) - as for a purecap core we don't want to include DDC at all. |
@tariqkurd-repo @andresag01 Sounds good. I will file a PR this afternoon. |
I think using cnull instead of DDC should be fine. The use of DDC is a carryover from the MIPS spec where we also had that behaviour for other instructions (loads/stores) to save encoding space. For consistency, c0 probably makes sense. Maybe those encodings should be marked as HINTs? |
They're not hints though, they write a value to the destination register (with the exception of cd=c0, which is true regardless of what source operands you have). |
That's true, I forgot they write a non-zero value. Use of CNULL doesn't really make much sense though so maybe we could just make those encodings RESERVED? |
I could get behind the RESERVED encodings. This is done over an over in RISC-V where it does not make sense to have x0 as an operand. |
Apologies for closing this ticket. GitHub automatically closed it because it unhelpfully. |
Both cbuilcap and ctestsubset use DDC as a parameter if the cs1 == 0. However, both instructions only have Zcheri_purecap as their prerequisite. DDC is a register that is only defined in Zcheri_legacy, if I understand the spec correctly. Thus, there exists a case where the specified behaviour of the instruction is not possible.
These are the two straightforward solutions that came into my mind.
There probably are other solutions. Given the two I named, the first one seems way more clean. This would not optimally use the encoding space of the register index for cs1, but it would prevent DDC from being defined in purecap where it is not needed.
The text was updated successfully, but these errors were encountered: