A while ago I rewrote and ported the pulp gcc and pulp binutils to a newer gcc release. I imported the new tests that were added to the assembler and I found a few discrepancies:
cv.extbs t0,t1 is encoded as 0x040362b3, but I think this should be 0x100362b3. The 28-th bit (counting from zero) should be 1. (python -c 'print(0x100362b3 >> 28 & 1)'). Similar issue with the other ext* instructions.
In the assembler and in the test cv-hwlp-fail-operand-01.s it assumes that the branch offset must be an even integer in [0, 4094]. Looking at the encoding though (12-bit unsigned immediate) it seems to me the range should be an even integer in [0, 8190]
A while ago I rewrote and ported the pulp gcc and pulp binutils to a newer gcc release. I imported the new tests that were added to the assembler and I found a few discrepancies:
From https://cv32e40p.readthedocs.io/en/latest/instruction_set_extensions/#general-alu-encoding
cv.extbs t0,t1
is encoded as0x040362b3
, but I think this should be0x100362b3
. The 28-th bit (counting from zero) should be 1. (python -c 'print(0x100362b3 >> 28 & 1)'
). Similar issue with the otherext*
instructions.From https://cv32e40p.readthedocs.io/en/latest/instruction_set_extensions/#hardware-loops
cv-hwlp-fail-operand-01.s
it assumes that the branch offset must be an even integer in[0, 4094]
. Looking at the encoding though (12-bit unsigned immediate) it seems to me the range should be an even integer in[0, 8190]
Robert