Currently, the Zce extension includes Zcf unconditionally; however, according to the Zc* spec version 1.0.4 [1]:
Specifying Zce on RV32 without F includes Zca, Zcb, Zcmp, Zcmt
Specifying Zce on RV32 with F includes Zca, Zcb, Zcmp, Zcmt and Zcf
Specifying Zce on RV64 always includes Zca, Zcb, Zcmp, Zcmt
Zcf doesn’t exist for RV64
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.
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