RISC-V: Handle g extension in multilib-generator

gcc/ChangeLog

	* gcc/config/riscv/multilib-generator: (canonical_order): Add 'g'.
	(arch_canonicalize): Support rv32g and rv64g and fix error
	handling.

From-SVN: r274156
This commit is contained in:
Kito Cheng 2019-08-07 03:12:34 +00:00 committed by Kito Cheng
parent 8a54b93d0c
commit 609d9bdeab
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2019-08-07 Kito Cheng <kito.cheng@sifive.com>
* gcc/config/riscv/multilib-generator: (canonical_order): Add 'g'.
(arch_canonicalize): Support rv32g and rv64g and fix error
handling.
2019-08-06 Martin Liska <mliska@suse.cz>
* cgraph.c (cgraph_node::dump): Dump DECL_IS_OPERATOR_NEW_P

View File

@ -36,17 +36,17 @@ abis = collections.OrderedDict()
required = []
reuse = []
canonical_order = "mafdqlcbjtpvn"
canonical_order = "mafdgqlcbjtpvn"
def arch_canonicalize(arch):
# TODO: Support Z, S, H, or X extensions.
# TODO: Support implied extensions, e.g. D implied F in latest spec.
# TODO: Support extension version.
new_arch = ""
if arch[:5] in ['rv32e', 'rv32i', 'rv64i']:
if arch[:5] in ['rv32e', 'rv32i', 'rv32g', 'rv64i', 'rv64g']:
new_arch = arch[:5]
else:
raise Exception("Unexpected arch: `%d`" % arch[:5])
raise Exception("Unexpected arch: `%s`" % arch[:5])
# Find any Z, S, H or X
long_ext_prefixes = ['z', 's', 'h', 'x']