aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKito Cheng <kito.cheng@sifive.com>2019-08-07 03:12:34 +0000
committerKito Cheng <kito@gcc.gnu.org>2019-08-07 03:12:34 +0000
commit609d9bdeab1365b04b84891e5d75cd86d003c8e2 (patch)
tree4256947b5ca794fda7ce649c6cfc93abbb0e44f9
parent8a54b93d0ca632b1923f9530f02c14c0b122cc6d (diff)
downloadgcc-609d9bdeab1365b04b84891e5d75cd86d003c8e2.zip
gcc-609d9bdeab1365b04b84891e5d75cd86d003c8e2.tar.gz
gcc-609d9bdeab1365b04b84891e5d75cd86d003c8e2.tar.bz2
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
-rw-r--r--gcc/ChangeLog6
-rwxr-xr-xgcc/config/riscv/multilib-generator6
2 files changed, 9 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 11ae775..0fc0a21 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/riscv/multilib-generator b/gcc/config/riscv/multilib-generator
index e58231c..a4125ff 100755
--- a/gcc/config/riscv/multilib-generator
+++ b/gcc/config/riscv/multilib-generator
@@ -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']