about summary refs log tree commit diff
path: root/sysdeps/x86_64/fpu/multiarch/Makefile
blob: e1a490dd98b4be07a6677f671b47280a15d3344e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
ifeq ($(subdir),math)
libm-sysdep_routines += \
  s_ceil-c \
  s_ceilf-c \
  s_floor-c \
  s_floorf-c \
  s_nearbyint-c \
  s_nearbyintf-c \
  s_rint-c \
  s_rintf-c \
  s_roundeven-c \
  s_roundevenf-c \
  s_trunc-c \
  s_truncf-c \
# libm-sysdep_routines

libm-sysdep_routines += \
  s_ceil-sse4_1 \
  s_ceilf-sse4_1 \
  s_floor-sse4_1 \
  s_floorf-sse4_1 \
  s_nearbyint-sse4_1 \
  s_nearbyintf-sse4_1 \
  s_rint-sse4_1 \
  s_rintf-sse4_1 \
  s_roundeven-sse4_1 \
  s_roundevenf-sse4_1 \
  s_trunc-sse4_1 \
  s_truncf-sse4_1 \
# libm-sysdep_routines

libm-sysdep_routines += \
  e_asin-fma \
  e_atan2-fma \
  e_exp-fma \
  e_log-fma \
  e_log2-fma \
  e_pow-fma \
  s_atan-fma \
  s_expm1-fma \
  s_log1p-fma \
  s_sin-fma \
  s_sincos-fma \
  s_tan-fma \
# libm-sysdep_routines

CFLAGS-e_asin-fma.c = -mfma -mavx2
CFLAGS-e_atan2-fma.c = -mfma -mavx2
CFLAGS-e_exp-fma.c = -mfma -mavx2
CFLAGS-e_log-fma.c = -mfma -mavx2
CFLAGS-e_log2-fma.c = -mfma -mavx2
CFLAGS-e_pow-fma.c = -mfma -mavx2
CFLAGS-s_atan-fma.c = -mfma -mavx2
CFLAGS-s_expm1-fma.c = -mfma -mavx2
CFLAGS-s_log1p-fma.c = -mfma -mavx2
CFLAGS-s_sin-fma.c = -mfma -mavx2
CFLAGS-s_tan-fma.c = -mfma -mavx2
CFLAGS-s_sincos-fma.c = -mfma -mavx2

libm-sysdep_routines += \
  s_cosf-sse2 \
  s_sincosf-sse2 \
  s_sinf-sse2 \
# libm-sysdep_routines

libm-sysdep_routines += \
  e_exp2f-fma \
  e_expf-fma \
  e_log2f-fma \
  e_logf-fma \
  e_powf-fma \
  s_cosf-fma \
  s_sincosf-fma \
  s_sinf-fma \
# libm-sysdep_routines

CFLAGS-e_exp2f-fma.c = -mfma -mavx2
CFLAGS-e_expf-fma.c = -mfma -mavx2
CFLAGS-e_log2f-fma.c = -mfma -mavx2
CFLAGS-e_logf-fma.c = -mfma -mavx2
CFLAGS-e_powf-fma.c = -mfma -mavx2
CFLAGS-s_sinf-fma.c = -mfma -mavx2
CFLAGS-s_cosf-fma.c = -mfma -mavx2
CFLAGS-s_sincosf-fma.c = -mfma -mavx2

libm-sysdep_routines += \
  e_asin-fma4 \
  e_atan2-fma4 \
  e_exp-fma4 \
  e_log-fma4 \
  e_pow-fma4 \
  s_atan-fma4 \
  s_sin-fma4 \
  s_sincos-fma4 \
  s_tan-fma4 \
# libm-sysdep_routines

CFLAGS-e_asin-fma4.c = -mfma4
CFLAGS-e_atan2-fma4.c = -mfma4
CFLAGS-e_exp-fma4.c = -mfma4
CFLAGS-e_log-fma4.c = -mfma4
CFLAGS-e_pow-fma4.c = -mfma4
CFLAGS-s_atan-fma4.c = -mfma4
CFLAGS-s_sin-fma4.c = -mfma4
CFLAGS-s_tan-fma4.c = -mfma4
CFLAGS-s_sincos-fma4.c = -mfma4

libm-sysdep_routines += \
  e_atan2-avx \
  e_exp-avx \
  e_log-avx \
  s_atan-avx \
  s_sin-avx \
  s_sincos-avx \
  s_tan-avx \
# libm-sysdep_routines

CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
CFLAGS-s_sincos-avx.c = -msse2avx -DSSE2AVX
endif

ifeq ($(subdir),mathvec)
libmvec-multiarch-double-func-list = \
  2_core-sse2 \
  2_core_sse4 \
  4_core-sse \
  4_core_avx2 \
  8_core-avx2 \
  8_core_avx512
libmvec-multiarch-float-func-list = \
  f4_core-sse2 \
  f4_core_sse4 \
  f8_core-sse \
  f8_core_avx2 \
  f16_core-avx2 \
  f16_core_avx512

libmvec-sysdep_routines += \
  $(foreach l,$(libmvec-multiarch-double-func-list), \
    $(addprefix svml_d_,$(addsuffix $(l),$(libmvec-funcs)))) \
  $(foreach l,$(libmvec-multiarch-float-func-list), \
    $(addprefix svml_s_,$(addsuffix $(l),$(libmvec-funcs))))
endif