openhwgroup / corev-binutils-gdb

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

HWLP boundary bug, ALU encoding bug and general formatting fixes #39

Closed jessicamills closed 2 years ago

jessicamills commented 2 years ago

gas/ChangeLog.COREV:

* config/tc-riscv.c (riscv_ip): Fix boundary bug for hardware loop
branch operands - upper boundary of long branch offset changed from
4094 to 8191 and short offset from 30 to 63.

gas/testsuite/ChangeLog.COREV:

* gas/riscv/cv-alu-extbs.d: Fix test after encoding change.
* gas/riscv/cv-alu-extbs.s: Likewise.
* gas/riscv/cv-alu-extbz.d: Likewise.
* gas/riscv/cv-alu-exths.d: Likewise.
* gas/riscv/cv-alu-exthz.d: Likewise.
* gas/riscv/cv-alu-march-rv32i-xcorev.d: Amend test with branch
offset boundary change.
* gas/riscv/cv-hwlp-endi.d: Likewise.
* gas/riscv/cv-hwlp-endi.s: Likewise.
* gas/riscv/cv-hwlp-fail-operand-01.l: Likewise.
* gas/riscv/cv-hwlp-fail-operand-01.s: Likewise.
* gas/riscv/cv-hwlp-fail-operand-02.l: Likewise.
* gas/riscv/cv-hwlp-fail-operand-02.s: Likewise.
* gas/riscv/cv-hwlp-fail-operand-03.l: Likewise.
* gas/riscv/cv-hwlp-fail-operand-03.s: Likewise.
* gas/riscv/cv-hwlp-fail-operand-04.l: Likewise.
* gas/riscv/cv-hwlp-fail-operand-04.s: Likewise.
* gas/riscv/cv-hwlp-setup.d: Likewise.
* gas/riscv/cv-hwlp-setup.s: Likewise.
* gas/riscv/cv-hwlp-starti.d: Likewise.
* gas/riscv/cv-hwlp-starti.s: Likewise.

include/ChangeLog.COREV:

* opcode/riscv-opc.h: Fix hexadecimal number format inconsistencies
for matches and masks.

ld/testsuite/ChangeLog.COREV:

* ld-riscv-elf/ld-riscv-elf.exp: Renamed CORE-V hwlp tests to match
-march option for the instruction set.
* ld-riscv-elf/cv-hwloop-starti.s: Renamed to cv-hwlp-starti.s.
* ld-riscv-elf/cv-hwloop-starti.d: Renamed to cv-hwlp-starti.d.
* ld-riscv-elf/cv-hwloop-endi.d: Renamed to cv-hwlp-endi.d.
* ld-riscv-elf/cv-hwloop-endi.s: Renamed to cv-hwlp-endi.s.
* ld-riscv-elf/cv-hwloop-setup.d: Renamed to cv-hwlp-setup.d.
* ld-riscv-elf/cv-hwloop-setup.s: Renamed to cv-hwlp-setup.s.
* ld-riscv-elf/cv-hwloop-setupi.d: Renamed to cv-hwlp-setupi.d.
* ld-riscv-elf/cv-hwloop-setupi.s: Renamed to cv-hwlp-setupi.s.

opcodes/ChangeLog.COREV:

* riscv-opc.c (MATCH_CV_EXTHS, MATCH_CV_EXTHZ, MATCH_CV_EXTBS)
(MATCH_CV_EXTBZ): Add new match.
(riscv_opcodes): Fix indentation inconsistencies.
jessicamills commented 2 years ago

@NBruschi & @EnricoTabanelli could you please review this fix. Thank you

jessicamills commented 2 years ago

@NBruschi & @EnricoTabanelli I have now rebased this after the merge of your work, please review when possible. Thanks

NBruschi commented 2 years ago

@jessicamills, All looks good but I noticed an ld regression, from 38 expected passes to 34 and 4 unresolved. They are because of you changed the names of the ld hwloop tests from hwloop to hwlp. You should also edit the test file located in ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp

jessicamills commented 2 years ago

Thank you @NBruschi, I have updated this. Please let me know if all is ok.

jessicamills commented 2 years ago

@NBruschi Are you able to merge?

NBruschi commented 2 years ago

Unfortunately I have not the write access to merge this pull request

jessicamills commented 2 years ago

Ok no problem - since you have reviewed and approved this pull request, I will merge it.