[PATCH 4/8] Hexagon (target/hexagon) Introduce tag_rev_info.c.inc

Taylor Simpson posted 8 patches 1 month, 4 weeks ago
Maintainers: Brian Cain <brian.cain@oss.qualcomm.com>, Laurent Vivier <laurent@vivier.eu>, Pierrick Bouvier <pierrick.bouvier@linaro.org>
There is a newer version of this series
[PATCH 4/8] Hexagon (target/hexagon) Introduce tag_rev_info.c.inc
Posted by Taylor Simpson 1 month, 4 weeks ago
From: Matheus Tavares Bernardino <matheus.bernardino@oss.qualcomm.com>

Table that records which CPU revision introduced or removed each opcode

Co-authored-by: Brian Cain <brian.cain@oss.qualcomm.com>
Co-authored-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
Signed-off-by: Taylor Simpson <ltaylorsimpson@gmail.com>
---
 target/hexagon/tag_rev_info.c.inc | 61 +++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)
 create mode 100644 target/hexagon/tag_rev_info.c.inc

diff --git a/target/hexagon/tag_rev_info.c.inc b/target/hexagon/tag_rev_info.c.inc
new file mode 100644
index 0000000000..ed7fb68aaf
--- /dev/null
+++ b/target/hexagon/tag_rev_info.c.inc
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#ifndef HEXAGON_TAG_ARCH_TABLE_H
+#define HEXAGON_TAG_ARCH_TABLE_H
+
+struct tag_rev_info { int introduced, removed; };
+
+static const struct tag_rev_info tag_rev_info[XX_LAST_OPCODE] = {
+    [A7_clip] = { .introduced = 0x67, .removed = 0x0 },
+    [A7_croundd_ri] = { .introduced = 0x67, .removed = 0x0 },
+    [A7_croundd_rr] = { .introduced = 0x67, .removed = 0x0 },
+    [A7_vclip] = { .introduced = 0x67, .removed = 0x0 },
+    [F2_dfmax] = { .introduced = 0x67, .removed = 0x0 },
+    [F2_dfmin] = { .introduced = 0x67, .removed = 0x0 },
+    [F2_dfmpyfix] = { .introduced = 0x67, .removed = 0x0 },
+    [F2_dfmpyhh] = { .introduced = 0x67, .removed = 0x0 },
+    [F2_dfmpylh] = { .introduced = 0x67, .removed = 0x0 },
+    [F2_dfmpyll] = { .introduced = 0x67, .removed = 0x0 },
+    [J2_callrh] = { .introduced = 0x73, .removed = 0x0 },
+    [J2_jumprh] = { .introduced = 0x73, .removed = 0x0 },
+    [L2_loadw_aq] = { .introduced = 0x68, .removed = 0x0 },
+    [L4_loadd_aq] = { .introduced = 0x68, .removed = 0x0 },
+    [M7_dcmpyiw] = { .introduced = 0x67, .removed = 0x0 },
+    [M7_dcmpyiw_acc] = { .introduced = 0x67, .removed = 0x0 },
+    [M7_dcmpyiwc] = { .introduced = 0x67, .removed = 0x0 },
+    [M7_dcmpyiwc_acc] = { .introduced = 0x67, .removed = 0x0 },
+    [M7_dcmpyrw] = { .introduced = 0x67, .removed = 0x0 },
+    [M7_dcmpyrw_acc] = { .introduced = 0x67, .removed = 0x0 },
+    [M7_dcmpyrwc] = { .introduced = 0x67, .removed = 0x0 },
+    [M7_dcmpyrwc_acc] = { .introduced = 0x67, .removed = 0x0 },
+    [M7_wcmpyiw] = { .introduced = 0x67, .removed = 0x0 },
+    [M7_wcmpyiw_rnd] = { .introduced = 0x67, .removed = 0x0 },
+    [M7_wcmpyiwc] = { .introduced = 0x67, .removed = 0x0 },
+    [M7_wcmpyiwc_rnd] = { .introduced = 0x67, .removed = 0x0 },
+    [M7_wcmpyrw] = { .introduced = 0x67, .removed = 0x0 },
+    [M7_wcmpyrw_rnd] = { .introduced = 0x67, .removed = 0x0 },
+    [M7_wcmpyrwc] = { .introduced = 0x67, .removed = 0x0 },
+    [M7_wcmpyrwc_rnd] = { .introduced = 0x67, .removed = 0x0 },
+    [R6_release_at_vi] = { .introduced = 0x68, .removed = 0x0 },
+    [R6_release_st_vi] = { .introduced = 0x68, .removed = 0x0 },
+    [S2_storew_rl_at_vi] = { .introduced = 0x68, .removed = 0x0 },
+    [S2_storew_rl_st_vi] = { .introduced = 0x68, .removed = 0x0 },
+    [S4_stored_rl_at_vi] = { .introduced = 0x68, .removed = 0x0 },
+    [S4_stored_rl_st_vi] = { .introduced = 0x68, .removed = 0x0 },
+    [V6_v6mpyhubs10] = { .introduced = 0x68, .removed = 0x0 },
+    [V6_v6mpyhubs10_vxx] = { .introduced = 0x68, .removed = 0x0 },
+    [V6_v6mpyvubs10] = { .introduced = 0x68, .removed = 0x0 },
+    [V6_v6mpyvubs10_vxx] = { .introduced = 0x68, .removed = 0x0 },
+    [V6_vasrvuhubrndsat] = { .introduced = 0x69, .removed = 0x0 },
+    [V6_vasrvuhubsat] = { .introduced = 0x69, .removed = 0x0 },
+    [V6_vasrvwuhrndsat] = { .introduced = 0x69, .removed = 0x0 },
+    [V6_vasrvwuhsat] = { .introduced = 0x69, .removed = 0x0 },
+    [V6_vassign_tmp] = { .introduced = 0x69, .removed = 0x0 },
+    [V6_vcombine_tmp] = { .introduced = 0x69, .removed = 0x0 },
+    [V6_vmpyuhvs] = { .introduced = 0x69, .removed = 0x0 },
+};
+
+#endif /* HEXAGON_TAG_ARCH_TABLE_H */
-- 
2.43.0
Re: [PATCH 4/8] Hexagon (target/hexagon) Introduce tag_rev_info.c.inc
Posted by Richard Henderson 1 month, 4 weeks ago
On 2/12/26 13:34, Taylor Simpson wrote:
> From: Matheus Tavares Bernardino<matheus.bernardino@oss.qualcomm.com>
> 
> Table that records which CPU revision introduced or removed each opcode
> 
> Co-authored-by: Brian Cain<brian.cain@oss.qualcomm.com>
> Co-authored-by: Taylor Simpson<ltaylorsimpson@gmail.com>
> Signed-off-by: Brian Cain<brian.cain@oss.qualcomm.com>
> Signed-off-by: Taylor Simpson<ltaylorsimpson@gmail.com>
> ---
>   target/hexagon/tag_rev_info.c.inc | 61 +++++++++++++++++++++++++++++++
>   1 file changed, 61 insertions(+)
>   create mode 100644 target/hexagon/tag_rev_info.c.inc
> 
> diff --git a/target/hexagon/tag_rev_info.c.inc b/target/hexagon/tag_rev_info.c.inc
> new file mode 100644
> index 0000000000..ed7fb68aaf
> --- /dev/null
> +++ b/target/hexagon/tag_rev_info.c.inc
> @@ -0,0 +1,61 @@
> +/*
> + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
> + * SPDX-License-Identifier: GPL-2.0-or-later
> + */
> +
> +#ifndef HEXAGON_TAG_ARCH_TABLE_H
> +#define HEXAGON_TAG_ARCH_TABLE_H
> +
> +struct tag_rev_info { int introduced, removed; };
> +
> +static const struct tag_rev_info tag_rev_info[XX_LAST_OPCODE] = {
> +    [A7_clip] = { .introduced = 0x67, .removed = 0x0 },
> +    [A7_croundd_ri] = { .introduced = 0x67, .removed = 0x0 },
> +    [A7_croundd_rr] = { .introduced = 0x67, .removed = 0x0 },

Any reason not to use enum HexagonVersion?

r~
Re: [PATCH 4/8] Hexagon (target/hexagon) Introduce tag_rev_info.c.inc
Posted by Taylor Simpson 1 month, 4 weeks ago
On Thu, Feb 12, 2026 at 4:52 PM Richard Henderson <
richard.henderson@linaro.org> wrote:

> On 2/12/26 13:34, Taylor Simpson wrote:
> > From: Matheus Tavares Bernardino<matheus.bernardino@oss.qualcomm.com>
> >
> > Table that records which CPU revision introduced or removed each opcode
> >
> > Co-authored-by: Brian Cain<brian.cain@oss.qualcomm.com>
> > Co-authored-by: Taylor Simpson<ltaylorsimpson@gmail.com>
> > Signed-off-by: Brian Cain<brian.cain@oss.qualcomm.com>
> > Signed-off-by: Taylor Simpson<ltaylorsimpson@gmail.com>
> > ---
> >   target/hexagon/tag_rev_info.c.inc | 61 +++++++++++++++++++++++++++++++
> >   1 file changed, 61 insertions(+)
> >   create mode 100644 target/hexagon/tag_rev_info.c.inc
> >
> > diff --git a/target/hexagon/tag_rev_info.c.inc
> b/target/hexagon/tag_rev_info.c.inc
> > new file mode 100644
> > index 0000000000..ed7fb68aaf
> > --- /dev/null
> > +++ b/target/hexagon/tag_rev_info.c.inc
> > @@ -0,0 +1,61 @@
> > +/*
> > + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
> > + * SPDX-License-Identifier: GPL-2.0-or-later
> > + */
> > +
> > +#ifndef HEXAGON_TAG_ARCH_TABLE_H
> > +#define HEXAGON_TAG_ARCH_TABLE_H
> > +
> > +struct tag_rev_info { int introduced, removed; };
> > +
> > +static const struct tag_rev_info tag_rev_info[XX_LAST_OPCODE] = {
> > +    [A7_clip] = { .introduced = 0x67, .removed = 0x0 },
> > +    [A7_croundd_ri] = { .introduced = 0x67, .removed = 0x0 },
> > +    [A7_croundd_rr] = { .introduced = 0x67, .removed = 0x0 },
>
> Any reason not to use enum HexagonVersion?
>
> r~
>

Good call.  I will change this.

Thanks,
Taylor