scarv / xcrypto

XCrypto: a cryptographic ISE for RISC-V
MIT License
90 stars 10 forks source link

Spec: multi-precision comparisons #30

Closed danpage closed 5 years ago

danpage commented 5 years ago

As written, there's a bug with the multi-precision comparisons. These are meant to capture "chained" or digit-wise comparison steps, so accept and produce a flag; at the moment the flag is produced in GPR[rd], but it should also be accepted from say GPR[rs] (or even GPR[rd]) vs. XCR[crs3].

ben-marshall commented 5 years ago

Fixing this requires encoding changes for all three MP comparison instructions. See spec figure 4 for context.

I'm about to implement the MP compare instructions now, so I will put all of these changes together into a single commit.

ben-marshall commented 5 years ago

Re-open so Dan can sign off on the specification document changes.

ben-marshall commented 5 years ago

@danpage - Do you want to just look over the spec document changes and close this issue if you are satisfied they match what you intended? This is something of a mega-change, so it might be better to sit and go through it together anyway.

danpage commented 5 years ago

I just looked over the spec. document, and it looks fine to me; I'll close the issue.