diff options
author | Christophe Lyon <christophe.lyon@foss.st.com> | 2021-11-10 16:58:08 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@foss.st.com> | 2021-11-10 16:58:50 +0000 |
commit | 1200e211a823816e47a9312efab61a60e12e33e5 (patch) | |
tree | af4f1f3568f467becb3705790bc93d8efd386317 /gcc | |
parent | b0c83d59f44bf677c8d74acae228acf32719acb3 (diff) | |
download | gcc-1200e211a823816e47a9312efab61a60e12e33e5.zip gcc-1200e211a823816e47a9312efab61a60e12e33e5.tar.gz gcc-1200e211a823816e47a9312efab61a60e12e33e5.tar.bz2 |
arm: Initialize vector costing fields
The movi, dup and extract costing fields were recently added to struct
vector_cost_table, but there initialization is missing for the arm
(aarch32) specific descriptions.
Although the arm port does not use these fields (only aarch64 does),
this is causing warnings during the build, and even build failures
when using gcc-4.8.5 as host compiler:
/gccsrc/gcc/config/arm/arm.c:1194:1: error: uninitialized const member 'vector_cost_table::movi'
};
^
/gccsrc/gcc/config/arm/arm.c:1194:1: warning: missing initializer for member 'vector_cost_table::movi' [-Wmissing-field-initializers]
/gccsrc/gcc/config/arm/arm.c:1194:1: error: uninitialized const member 'vector_cost_table::dup'
/gccsrc/gcc/config/arm/arm.c:1194:1: warning: missing initializer for member 'vector_cost_table::dup' [-Wmissing-field-initializers]
/gccsrc/gcc/config/arm/arm.c:1194:1: error: uninitialized const member 'vector_cost_table::extract'
/gccsrc/gcc/config/arm/arm.c:1194:1: warning: missing initializer for member 'vector_cost_table::extract' [-Wmissing-field-initializers]
This patch uses the same initialization values as in aarch64 for
consistency:
+ COSTS_N_INSNS (1), /* movi. */
+ COSTS_N_INSNS (2), /* dup. */
+ COSTS_N_INSNS (2) /* extract. */
2021-11-10 Christophe Lyon <christophe.lyon@foss.st.com>
gcc/
* config/arm/arm.c (cortexa9_extra_costs, cortexa8_extra_costs,
cortexa5_extra_costs, cortexa7_extra_costs,
cortexa12_extra_costs, cortexa15_extra_costs, v7m_extra_costs):
Initialize movi, dup and extract costing fields.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/arm/arm.c | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index c4ff06b..a5b403e 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -1189,7 +1189,10 @@ const struct cpu_cost_table cortexa9_extra_costs = /* Vector */ { COSTS_N_INSNS (1), /* alu. */ - COSTS_N_INSNS (4) /* mult. */ + COSTS_N_INSNS (4), /* mult. */ + COSTS_N_INSNS (1), /* movi. */ + COSTS_N_INSNS (2), /* dup. */ + COSTS_N_INSNS (2) /* extract. */ } }; @@ -1293,7 +1296,10 @@ const struct cpu_cost_table cortexa8_extra_costs = /* Vector */ { COSTS_N_INSNS (1), /* alu. */ - COSTS_N_INSNS (4) /* mult. */ + COSTS_N_INSNS (4), /* mult. */ + COSTS_N_INSNS (1), /* movi. */ + COSTS_N_INSNS (2), /* dup. */ + COSTS_N_INSNS (2) /* extract. */ } }; @@ -1398,7 +1404,10 @@ const struct cpu_cost_table cortexa5_extra_costs = /* Vector */ { COSTS_N_INSNS (1), /* alu. */ - COSTS_N_INSNS (4) /* mult. */ + COSTS_N_INSNS (4), /* mult. */ + COSTS_N_INSNS (1), /* movi. */ + COSTS_N_INSNS (2), /* dup. */ + COSTS_N_INSNS (2) /* extract. */ } }; @@ -1504,7 +1513,10 @@ const struct cpu_cost_table cortexa7_extra_costs = /* Vector */ { COSTS_N_INSNS (1), /* alu. */ - COSTS_N_INSNS (4) /* mult. */ + COSTS_N_INSNS (4), /* mult. */ + COSTS_N_INSNS (1), /* movi. */ + COSTS_N_INSNS (2), /* dup. */ + COSTS_N_INSNS (2) /* extract. */ } }; @@ -1608,7 +1620,10 @@ const struct cpu_cost_table cortexa12_extra_costs = /* Vector */ { COSTS_N_INSNS (1), /* alu. */ - COSTS_N_INSNS (4) /* mult. */ + COSTS_N_INSNS (4), /* mult. */ + COSTS_N_INSNS (1), /* movi. */ + COSTS_N_INSNS (2), /* dup. */ + COSTS_N_INSNS (2) /* extract. */ } }; @@ -1712,7 +1727,10 @@ const struct cpu_cost_table cortexa15_extra_costs = /* Vector */ { COSTS_N_INSNS (1), /* alu. */ - COSTS_N_INSNS (4) /* mult. */ + COSTS_N_INSNS (4), /* mult. */ + COSTS_N_INSNS (1), /* movi. */ + COSTS_N_INSNS (2), /* dup. */ + COSTS_N_INSNS (2) /* extract. */ } }; @@ -1816,7 +1834,10 @@ const struct cpu_cost_table v7m_extra_costs = /* Vector */ { COSTS_N_INSNS (1), /* alu. */ - COSTS_N_INSNS (4) /* mult. */ + COSTS_N_INSNS (4), /* mult. */ + COSTS_N_INSNS (1), /* movi. */ + COSTS_N_INSNS (2), /* dup. */ + COSTS_N_INSNS (2) /* extract. */ } }; |