diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-06-30 18:43:24 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-06-30 19:34:51 +0200 |
commit | 8ab2ac7308cde26aa3fd7e9c5caddc8f789911ef (patch) | |
tree | 4935752481840d5432fa7c6e8655c176eaecb990 /src | |
parent | 8d1ab3e6d745c3314dab964f886f2f4cdb120310 (diff) | |
download | ghdl-8ab2ac7308cde26aa3fd7e9c5caddc8f789911ef.tar.gz ghdl-8ab2ac7308cde26aa3fd7e9c5caddc8f789911ef.tar.bz2 ghdl-8ab2ac7308cde26aa3fd7e9c5caddc8f789911ef.zip |
ortho/gcc: build vector types in type_for_mode. Fix #1384
Diffstat (limited to 'src')
-rw-r--r-- | src/ortho/gcc/ortho-lang-49.c | 8 | ||||
-rw-r--r-- | src/ortho/gcc/ortho-lang-5.c | 8 | ||||
-rw-r--r-- | src/ortho/gcc/ortho-lang-6.c | 8 | ||||
-rw-r--r-- | src/ortho/gcc/ortho-lang-7.c | 8 | ||||
-rw-r--r-- | src/ortho/gcc/ortho-lang-8.c | 8 | ||||
-rw-r--r-- | src/ortho/gcc/ortho-lang-9.c | 8 |
6 files changed, 48 insertions, 0 deletions
diff --git a/src/ortho/gcc/ortho-lang-49.c b/src/ortho/gcc/ortho-lang-49.c index f73965615..3e29f0a14 100644 --- a/src/ortho/gcc/ortho-lang-49.c +++ b/src/ortho/gcc/ortho-lang-49.c @@ -722,6 +722,14 @@ type_for_mode (enum machine_mode mode, int unsignedp) if (mode == TYPE_MODE (long_double_type_node)) return long_double_type_node; + if (VECTOR_MODE_P (mode)) + { + machine_mode inner_mode = GET_MODE_INNER (mode); + tree inner_type = type_for_mode (inner_mode, unsignedp); + if (inner_type) + return build_vector_type_for_mode (inner_type, mode); + } + return NULL_TREE; } diff --git a/src/ortho/gcc/ortho-lang-5.c b/src/ortho/gcc/ortho-lang-5.c index 6dedb14b0..3e046f7a3 100644 --- a/src/ortho/gcc/ortho-lang-5.c +++ b/src/ortho/gcc/ortho-lang-5.c @@ -709,6 +709,14 @@ type_for_mode (enum machine_mode mode, int unsignedp) if (mode == TYPE_MODE (long_double_type_node)) return long_double_type_node; + if (VECTOR_MODE_P (mode)) + { + machine_mode inner_mode = GET_MODE_INNER (mode); + tree inner_type = type_for_mode (inner_mode, unsignedp); + if (inner_type) + return build_vector_type_for_mode (inner_type, mode); + } + return NULL_TREE; } diff --git a/src/ortho/gcc/ortho-lang-6.c b/src/ortho/gcc/ortho-lang-6.c index 639356085..bd989d9a8 100644 --- a/src/ortho/gcc/ortho-lang-6.c +++ b/src/ortho/gcc/ortho-lang-6.c @@ -709,6 +709,14 @@ type_for_mode (enum machine_mode mode, int unsignedp) if (mode == TYPE_MODE (long_double_type_node)) return long_double_type_node; + if (VECTOR_MODE_P (mode)) + { + machine_mode inner_mode = GET_MODE_INNER (mode); + tree inner_type = type_for_mode (inner_mode, unsignedp); + if (inner_type) + return build_vector_type_for_mode (inner_type, mode); + } + return NULL_TREE; } diff --git a/src/ortho/gcc/ortho-lang-7.c b/src/ortho/gcc/ortho-lang-7.c index f871bf93c..e9c0d47c8 100644 --- a/src/ortho/gcc/ortho-lang-7.c +++ b/src/ortho/gcc/ortho-lang-7.c @@ -718,6 +718,14 @@ type_for_mode (enum machine_mode mode, int unsignedp) if (mode == TYPE_MODE (long_double_type_node)) return long_double_type_node; + if (VECTOR_MODE_P (mode)) + { + machine_mode inner_mode = GET_MODE_INNER (mode); + tree inner_type = type_for_mode (inner_mode, unsignedp); + if (inner_type) + return build_vector_type_for_mode (inner_type, mode); + } + return NULL_TREE; } diff --git a/src/ortho/gcc/ortho-lang-8.c b/src/ortho/gcc/ortho-lang-8.c index de5080036..350504cdf 100644 --- a/src/ortho/gcc/ortho-lang-8.c +++ b/src/ortho/gcc/ortho-lang-8.c @@ -719,6 +719,14 @@ type_for_mode (enum machine_mode mode, int unsignedp) if (mode == TYPE_MODE (long_double_type_node)) return long_double_type_node; + if (VECTOR_MODE_P (mode)) + { + machine_mode inner_mode = GET_MODE_INNER (mode); + tree inner_type = type_for_mode (inner_mode, unsignedp); + if (inner_type) + return build_vector_type_for_mode (inner_type, mode); + } + return NULL_TREE; } diff --git a/src/ortho/gcc/ortho-lang-9.c b/src/ortho/gcc/ortho-lang-9.c index 5a5ac8859..b027f0d6d 100644 --- a/src/ortho/gcc/ortho-lang-9.c +++ b/src/ortho/gcc/ortho-lang-9.c @@ -719,6 +719,14 @@ type_for_mode (enum machine_mode mode, int unsignedp) if (mode == TYPE_MODE (long_double_type_node)) return long_double_type_node; + if (VECTOR_MODE_P (mode)) + { + machine_mode inner_mode = GET_MODE_INNER (mode); + tree inner_type = type_for_mode (inner_mode, unsignedp); + if (inner_type) + return build_vector_type_for_mode (inner_type, mode); + } + return NULL_TREE; } |