[v1,03/27] x86/fpu: Add file for common data used across svml_s_*_avx512.S files

Message ID 20221207085236.1424424-3-goldstein.w.n@gmail.com
State New
Headers
Series [v1,01/27] x86/fpu: Create helper file for common data macros |

Checks

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

Commit Message

Noah Goldstein Dec. 7, 2022, 8:52 a.m. UTC
  All rodata that is used by more than one implementation can be defined
     here to save .rodata size.

At the moment definitions are only for the following implementations:
    atanf
    atanhf
    log
    log10f
    log2
    tanf

have been added.
---
 .../x86_64/fpu/svml_s_common_evex512_rodata.S | 19 +++++++++++++
 .../svml_s_common_evex512_rodata_offsets.h    | 27 +++++++++++++++++++
 2 files changed, 46 insertions(+)
 create mode 100644 sysdeps/x86_64/fpu/svml_s_common_evex512_rodata.S
 create mode 100644 sysdeps/x86_64/fpu/svml_s_common_evex512_rodata_offsets.h
  

Patch

diff --git a/sysdeps/x86_64/fpu/svml_s_common_evex512_rodata.S b/sysdeps/x86_64/fpu/svml_s_common_evex512_rodata.S
new file mode 100644
index 0000000000..4652b7be41
--- /dev/null
+++ b/sysdeps/x86_64/fpu/svml_s_common_evex512_rodata.S
@@ -0,0 +1,19 @@ 
+#include "svml_s_common_evex512_rodata_offsets.h"
+
+	.section .rodata.evex512, "a"
+	.align	64
+	.globl	COMMON_DATA_NAME
+COMMON_DATA_NAME:
+	/* Used By: atanf, atanhf, log10f, log2f, logf, tanf.  */
+	DATA_VEC (COMMON_DATA_NAME, _OneF, 0x3f800000)
+	/* Used By: logf, tanf.  */
+	DATA_VEC (COMMON_DATA_NAME, _NotiOffExpoMask, 0xff800000)
+	/* Used By: atanhf, logf.  */
+	DATA_VEC (COMMON_DATA_NAME, _Neg5F, 0xbf000000)
+	/* Used By: tanf, atanhf.  */
+	DATA_VEC (COMMON_DATA_NAME, _AbsMask, 0x7fffffff)
+	/* Used By: atanf, tanhf.  */
+	DATA_VEC (COMMON_DATA_NAME, _SignMask, 0x80000000)
+
+	.type	COMMON_DATA_NAME, @object
+	.size	COMMON_DATA_NAME, .-COMMON_DATA_NAME
diff --git a/sysdeps/x86_64/fpu/svml_s_common_evex512_rodata_offsets.h b/sysdeps/x86_64/fpu/svml_s_common_evex512_rodata_offsets.h
new file mode 100644
index 0000000000..f41020f760
--- /dev/null
+++ b/sysdeps/x86_64/fpu/svml_s_common_evex512_rodata_offsets.h
@@ -0,0 +1,27 @@ 
+#ifndef _SVML_S_COMMON_EVEX512_RODATA_OFFSETS_H
+#define _SVML_S_COMMON_EVEX512_RODATA_OFFSETS_H	1
+
+#include "svml_common_data_macros.h.S"
+
+#define COMMON_DATA_NAME __svml_s_common_evex512_data
+
+#define _OneF            0
+#define _NotiOffExpoMask 64
+#define _Neg5F           128
+#define _AbsMask         192
+#define _SignMask        256
+
+
+#define COMMON_DATA(offset) ((offset) + (COMMON_DATA_NAME))
+#define DATA_VEC(data_name, offset, value)                                     \
+    float_vector64(data_name, offset, value)
+
+#ifdef LOCAL_DATA_NAME
+# define LOCAL_DATA(offset) ((offset) + (LOCAL_DATA_NAME))
+#endif
+
+#ifdef LOCAL_DATA_NAME_UNALIGNED
+# define LOCAL_DATA_UNALIGNED(offset) ((offset) + (LOCAL_DATA_NAME_UNALIGNED))
+#endif
+
+#endif