Skip to content

Conversation

@a4lg
Copy link
Owner

@a4lg a4lg commented Jul 29, 2023

@a4lg a4lg force-pushed the riscv-zce branch 3 times, most recently from 867db74 to 1c012c2 Compare August 3, 2023 00:07
@a4lg a4lg added the enhancement New feature or request label Aug 3, 2023
@a4lg a4lg force-pushed the riscv-zce branch 7 times, most recently from 15f7cdb to f5601c7 Compare August 8, 2023 04:11
@a4lg a4lg force-pushed the riscv-zce branch 3 times, most recently from cd8ce76 to 053288b Compare August 15, 2023 06:37
@a4lg a4lg force-pushed the riscv-zce branch 4 times, most recently from 5081148 to 0b4ac5e Compare September 7, 2023 09:35
@a4lg a4lg force-pushed the riscv-zce branch 2 times, most recently from da0e00d to b3b77b8 Compare October 19, 2023 03:17
a4lg added 3 commits October 19, 2023 06:58
Thanks to the commit 48558a5 ("RISC-V: Allow nested implications for
extensions"), we can write complex extension implications in theory.
However, to actually do that, we need to pass more information to
check_func.

For example, we want to imply 'Zcf' from 'F' if and only if the 'Zce'
extension is also enabled and XLEN is 32.  Passing rps is a way to
enable this.

This commit prepares for such complex extension implications.

bfd/ChangeLog:

	* elfxx-riscv.c (struct riscv_implicit_subset): Move around and
	change check_func function prototype.
	(check_implicit_always): New arguments.
	(check_implicit_for_i): Likewise.
	(riscv_implicit_subsets): Add comment for this variable.
	(riscv_parse_add_implicit_subsets): Call check_func with
	new arguments.
It adds a support for the 'Zce' superset compressed instruction extension
for embedded systems.

**THIS IS A MOCKUP**

Since 'Zcmp' and 'Zcmt' are not added to GNU Binutils yet, this commit is
just a mockup.  However, it outlines what will be required on the 'Zce'
support along with new complex implication design.

bfd/ChangeLog:

	* elfxx-riscv.c (check_implicit_for_f_zce): New function to check
	whether adding implication 'F' -> 'Zcf' is appropriate.
	(riscv_implicit_subsets): Add conditional implication from 'F'
	-> 'Zcf'.  (riscv_supported_std_z_ext): [MOCK] Add 'Zce' to the
	supported 'Z' extension list.
**NEVER COMMIT THIS.**

This commit is intended to be merged to the previous patch once 'Zcmp'
and 'Zcmt' extensions are ready.

It adds several tests related to 'Zce' implications.

bfd/ChangeLog:

	* elfxx-riscv.c: [MOCK] Uncomment mock lines to pass the test.

gas/ChangeLog:

	* testsuite/gas/riscv/march-imply-zce.d: New test.
	* testsuite/gas/riscv/march-imply-zce-f-32.d: Likewise.
	* testsuite/gas/riscv/march-imply-zce-f-64.d: Likewise.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants