diff mbox series

[v1,1/3] x86: Update evex256/512 vec macros

Message ID 20221014164008.1325863-1-goldstein.w.n@gmail.com
State New
Headers show
Series [v1,1/3] x86: Update evex256/512 vec macros | expand

Commit Message

Noah Goldstein Oct. 14, 2022, 4:40 p.m. UTC
1) Make section only define if there is not a previous definition
2) Add `VEC_lo` definition for proper reg-width but in the
   ymm/zmm0-15 range.

This commit does not change libc.so

Tested build on x86-64
---
 sysdeps/x86_64/multiarch/evex256-vecs.h | 7 +++++--
 sysdeps/x86_64/multiarch/evex512-vecs.h | 7 +++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

Comments

H.J. Lu Oct. 14, 2022, 5:31 p.m. UTC | #1
On Fri, Oct 14, 2022 at 9:40 AM Noah Goldstein <goldstein.w.n@gmail.com> wrote:
>
> 1) Make section only define if there is not a previous definition
> 2) Add `VEC_lo` definition for proper reg-width but in the
>    ymm/zmm0-15 range.
>
> This commit does not change libc.so
>
> Tested build on x86-64
> ---
>  sysdeps/x86_64/multiarch/evex256-vecs.h | 7 +++++--
>  sysdeps/x86_64/multiarch/evex512-vecs.h | 7 +++++--
>  2 files changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/sysdeps/x86_64/multiarch/evex256-vecs.h b/sysdeps/x86_64/multiarch/evex256-vecs.h
> index 222ba46dc7..4fccabd4b8 100644
> --- a/sysdeps/x86_64/multiarch/evex256-vecs.h
> +++ b/sysdeps/x86_64/multiarch/evex256-vecs.h
> @@ -28,8 +28,11 @@
>  #include "evex-vecs-common.h"
>
>  #define USE_WITH_EVEX256       1
> -#define SECTION(p)                     p##.evex
>
> -#define VEC                                    VEC_ymm
> +#ifndef SECTION
> +# define SECTION(p)                    p##.evex
> +#endif
>
> +#define VEC                                    VEC_ymm
> +#define VEC_lo                         VEC_any_ymm
>  #endif
> diff --git a/sysdeps/x86_64/multiarch/evex512-vecs.h b/sysdeps/x86_64/multiarch/evex512-vecs.h
> index d1784d5368..fecc2d3925 100644
> --- a/sysdeps/x86_64/multiarch/evex512-vecs.h
> +++ b/sysdeps/x86_64/multiarch/evex512-vecs.h
> @@ -28,8 +28,11 @@
>  #include "evex-vecs-common.h"
>
>  #define USE_WITH_EVEX512       1
> -#define SECTION(p)                     p##.evex512
>
> -#define VEC                                    VEC_zmm
> +#ifndef SECTION
> +# define SECTION(p)                    p##.evex512
> +#endif
>
> +#define VEC                                    VEC_zmm
> +#define VEC_lo                         VEC_any_zmm
>  #endif
> --
> 2.34.1
>

LGTM.

Thanks.
diff mbox series

Patch

diff --git a/sysdeps/x86_64/multiarch/evex256-vecs.h b/sysdeps/x86_64/multiarch/evex256-vecs.h
index 222ba46dc7..4fccabd4b8 100644
--- a/sysdeps/x86_64/multiarch/evex256-vecs.h
+++ b/sysdeps/x86_64/multiarch/evex256-vecs.h
@@ -28,8 +28,11 @@ 
 #include "evex-vecs-common.h"
 
 #define USE_WITH_EVEX256	1
-#define SECTION(p)			p##.evex
 
-#define VEC					VEC_ymm
+#ifndef SECTION
+# define SECTION(p)			p##.evex
+#endif
 
+#define VEC					VEC_ymm
+#define VEC_lo				VEC_any_ymm
 #endif
diff --git a/sysdeps/x86_64/multiarch/evex512-vecs.h b/sysdeps/x86_64/multiarch/evex512-vecs.h
index d1784d5368..fecc2d3925 100644
--- a/sysdeps/x86_64/multiarch/evex512-vecs.h
+++ b/sysdeps/x86_64/multiarch/evex512-vecs.h
@@ -28,8 +28,11 @@ 
 #include "evex-vecs-common.h"
 
 #define USE_WITH_EVEX512	1
-#define SECTION(p)			p##.evex512
 
-#define VEC					VEC_zmm
+#ifndef SECTION
+# define SECTION(p)			p##.evex512
+#endif
 
+#define VEC					VEC_zmm
+#define VEC_lo				VEC_any_zmm
 #endif