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

Message ID 20221014184156.223306-1-goldstein.w.n@gmail.com
State Superseded
Headers
Series [v4,1/3] x86: Update evex256/512 vec macros |

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent

Commit Message

Noah Goldstein Oct. 14, 2022, 6:41 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(-)
  

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