openhwgroup / corev-binutils-gdb

GNU General Public License v2.0
9 stars 26 forks source link

Immediate encoding not correct for 8/16-b SIMD instructions #53

Closed pascalgouedo closed 1 year ago

pascalgouedo commented 1 year ago

Hi,

Like in RISC-V specification (JAL example) , all PULP instructions are described using following notation for immediate:

immx[0|x-1:1] means for a decimal value encoded on x bits, bit 0 comes first and then (x-1):1

For instance: 24 =0x18 => imm6[5:0] = 0b01_1000 so imm6[0|5:1] = 0b00_1100

Right now assembler is using imm6[5:0] rather than imm6[0|5:1] in binary encoding of PULP instructions.

Cheers, Pascal.

jeremybennett commented 1 year ago

@pascalgouedo thanks for this. I will get @NandniJamnadas to fix this.

NandniJamnadas commented 1 year ago

@pascalgouedo I have a fix for this. I will submit a pull request as soon I finish testing.

NandniJamnadas commented 1 year ago

@pascalgouedo Here is the PR for this fix: https://github.com/openhwgroup/corev-binutils-gdb/pull/54

jeremybennett commented 1 year ago

Resolved in commit 60994899cc8aeaa6a96c3abb8230682e5a8e3de2