foss-for-synopsys-dwc-arc-processors / binutils-gdb

A mirror of the upstream binutils-gdb repository for ARC specific work
GNU General Public License v2.0
13 stars 10 forks source link

RISC-V: restrict inclusion of Zcf by Zce #81

Closed artemiy-volkov closed 5 months ago

artemiy-volkov commented 5 months ago

Currently, the Zce extension includes Zcf unconditionally; however, according to the Zc* spec version 1.0.4 [1]:

This patch checks whether (a) F is enabled and (b) the target is 32-bit; to that end, the check_func() helper receives the current list of used extensions (riscv_parse_subset_t *) as a third parameter so that the information about currently enabled extensions and the target can be retrieved.

[1] https://github.com/riscvarchive/riscv-code-size-reduction/releases/download/v1.0.4-3/Zc-1.0.4-3.pdf