ThinkOpenly / RISC-V_ISA

Apache License 2.0
5 stars 7 forks source link

Update displayOperands to handle optional operands #17

Open Linda-Njau opened 5 months ago

Linda-Njau commented 5 months ago

The displayOperands function previously did not distinguish between optional and required operands. This change updates the function to display optional operands within square brackets and position them at the end of the operand list.

ThinkOpenly commented 3 months ago

Were you able to test this?

Linda-Njau commented 3 months ago

Yes, I was able to test it. This is a direct copy from the website: vd,vs2,vs1,[,vm]

Linda-Njau commented 3 months ago

I've rebased this branch as well.

ThinkOpenly commented 3 months ago

Yes, I was able to test it. This is a direct copy from the website: vd,vs2,vs1,[,vm]

Would it be convenient to get rid of that extra comma? To produce vd,vs2,vs1[,vm] instead?