Skip to content

Commit d5e6940

Browse files
authored
Fix declaration of input arguments in the x86_64 microkernels for DOT and AXPY (#1965)
* Tag operands 0 and 1 as both input and output For #1964 (basically a continuation of coding problems first seen in #1292)
1 parent 24e697e commit d5e6940

37 files changed

+202
-202
lines changed

kernel/x86_64/caxpy_microk_bulldozer-2.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ static void caxpy_kernel_8( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *alpha)
114114
"vzeroupper \n\t"
115115

116116
:
117-
:
118-
"r" (i), // 0
119-
"r" (n), // 1
117+
"+r" (i), // 0
118+
"+r" (n) // 1
119+
:
120120
"r" (x), // 2
121121
"r" (y), // 3
122122
"r" (alpha), // 4
@@ -180,10 +180,10 @@ static void caxpy_kernel_8( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *alpha)
180180
"jnz 1b \n\t"
181181
"vzeroupper \n\t"
182182

183-
:
184-
:
185-
"r" (i), // 0
186-
"r" (n), // 1
183+
:
184+
"+r" (i), // 0
185+
"+r" (n) // 1
186+
:
187187
"r" (x), // 2
188188
"r" (y), // 3
189189
"r" (alpha), // 4

kernel/x86_64/caxpy_microk_haswell-2.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ static void caxpy_kernel_8( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *alpha)
112112
"vzeroupper \n\t"
113113

114114
:
115-
:
116-
"r" (i), // 0
117-
"r" (n), // 1
115+
"+r" (i), // 0
116+
"+r" (n) // 1
117+
:
118118
"r" (x), // 2
119119
"r" (y), // 3
120120
"r" (alpha), // 4

kernel/x86_64/caxpy_microk_sandy-2.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ static void caxpy_kernel_8( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *alpha)
9595
"jnz 1b \n\t"
9696
"vzeroupper \n\t"
9797

98-
:
99-
:
100-
"r" (i), // 0
101-
"r" (n), // 1
98+
:
99+
"+r" (i), // 0
100+
"+r" (n) // 1
101+
:
102102
"r" (x), // 2
103103
"r" (y), // 3
104104
"r" (alpha), // 4

kernel/x86_64/caxpy_microk_steamroller-2.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ static void caxpy_kernel_8( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *alpha)
113113
"jnz 1b \n\t"
114114
"vzeroupper \n\t"
115115

116-
:
117-
:
118-
"r" (i), // 0
119-
"r" (n), // 1
116+
:
117+
"+r" (i), // 0
118+
"+r" (n) // 1
119+
:
120120
"r" (x), // 2
121121
"r" (y), // 3
122122
"r" (alpha), // 4
@@ -181,9 +181,9 @@ static void caxpy_kernel_8( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *alpha)
181181
"vzeroupper \n\t"
182182

183183
:
184-
:
185-
"r" (i), // 0
186-
"r" (n), // 1
184+
"+r" (i), // 0
185+
"+r" (n) // 1
186+
:
187187
"r" (x), // 2
188188
"r" (y), // 3
189189
"r" (alpha), // 4

kernel/x86_64/cdot_microk_bulldozer-2.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ static void cdot_kernel_16( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *dot)
9797
"vzeroupper \n\t"
9898

9999
:
100-
:
101-
"r" (i), // 0
102-
"r" (n), // 1
100+
"+r" (i), // 0
101+
"+r" (n) // 1
102+
:
103103
"r" (x), // 2
104104
"r" (y), // 3
105105
"r" (dot) // 4
@@ -175,10 +175,10 @@ static void cdot_kernel_16( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *dot)
175175
"vmovups %%xmm4, 16(%4) \n\t"
176176
"vzeroupper \n\t"
177177

178-
:
179-
:
180-
"r" (i), // 0
181-
"r" (n), // 1
178+
:
179+
"+r" (i), // 0
180+
"+r" (n) // 1
181+
:
182182
"r" (x), // 2
183183
"r" (y), // 3
184184
"r" (dot) // 4

kernel/x86_64/cdot_microk_haswell-2.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ static void cdot_kernel_16( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *dot)
9898
"vzeroupper \n\t"
9999

100100
:
101-
:
102-
"r" (i), // 0
103-
"r" (n), // 1
101+
"+r" (i), // 0
102+
"+r" (n) // 1
103+
:
104104
"r" (x), // 2
105105
"r" (y), // 3
106106
"r" (dot) // 4

kernel/x86_64/cdot_microk_sandy-2.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ static void cdot_kernel_16( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *dot)
105105
"vmovups %%xmm4, 16(%4) \n\t"
106106
"vzeroupper \n\t"
107107

108-
:
109-
:
110-
"r" (i), // 0
111-
"r" (n), // 1
108+
:
109+
"+r" (i), // 0
110+
"+r" (n) // 1
111+
:
112112
"r" (x), // 2
113113
"r" (y), // 3
114114
"r" (dot) // 4

kernel/x86_64/cdot_microk_steamroller-2.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ static void cdot_kernel_16( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *dot)
9797
"vzeroupper \n\t"
9898

9999
:
100-
:
101-
"r" (i), // 0
102-
"r" (n), // 1
100+
"+r" (i), // 0
101+
"+r" (n) // 1
102+
:
103103
"r" (x), // 2
104104
"r" (y), // 3
105105
"r" (dot) // 4
@@ -175,10 +175,10 @@ static void cdot_kernel_16( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *dot)
175175
"vmovups %%xmm4, 16(%4) \n\t"
176176
"vzeroupper \n\t"
177177

178-
:
179-
:
180-
"r" (i), // 0
181-
"r" (n), // 1
178+
:
179+
"+r" (i), // 0
180+
"+r" (n) // 1
181+
:
182182
"r" (x), // 2
183183
"r" (y), // 3
184184
"r" (dot) // 4

kernel/x86_64/daxpy_microk_bulldozer-2.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ static void daxpy_kernel_8( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *alpha)
6464
"jnz 1b \n\t"
6565

6666
:
67-
:
68-
"r" (i), // 0
69-
"r" (n), // 1
67+
"+r" (i), // 0
68+
"+r" (n) // 1
69+
:
7070
"r" (x), // 2
7171
"r" (y), // 3
7272
"r" (alpha) // 4

kernel/x86_64/daxpy_microk_haswell-2.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ static void daxpy_kernel_8( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *alpha)
5959
"jnz 1b \n\t"
6060
"vzeroupper \n\t"
6161

62-
:
63-
:
64-
"r" (i), // 0
65-
"r" (n), // 1
62+
:
63+
"+r" (i), // 0
64+
"+r" (n) // 1
65+
:
6666
"r" (x), // 2
6767
"r" (y), // 3
6868
"r" (alpha) // 4

kernel/x86_64/daxpy_microk_nehalem-2.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ static void daxpy_kernel_8( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *alpha)
7373
"jnz 1b \n\t"
7474

7575
:
76-
:
77-
"r" (i), // 0
78-
"r" (n), // 1
76+
"+r" (i), // 0
77+
"+r" (n) // 1
78+
:
7979
"r" (x), // 2
8080
"r" (y), // 3
8181
"r" (alpha) // 4

kernel/x86_64/daxpy_microk_piledriver-2.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ static void daxpy_kernel_8( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *alpha)
7878
"subq $16, %1 \n\t"
7979
"jnz 1b \n\t"
8080

81-
:
82-
:
83-
"r" (i), // 0
84-
"r" (n), // 1
81+
:
82+
"+r" (i), // 0
83+
"+r" (n) // 1
84+
:
8585
"r" (x), // 2
8686
"r" (y), // 3
8787
"r" (alpha) // 4
@@ -140,10 +140,10 @@ static void daxpy_kernel_8( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *alpha)
140140
"subq $16, %1 \n\t"
141141
"jnz 1b \n\t"
142142

143-
:
144-
:
145-
"r" (i), // 0
146-
"r" (n), // 1
143+
:
144+
"+r" (i), // 0
145+
"+r" (n) // 1
146+
:
147147
"r" (x), // 2
148148
"r" (y), // 3
149149
"r" (alpha) // 4

kernel/x86_64/daxpy_microk_sandy-2.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ static void daxpy_kernel_8( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *alpha)
9999

100100
"vzeroupper \n\t"
101101

102-
:
103-
:
104-
"r" (i), // 0
105-
"r" (n), // 1
102+
:
103+
"+r" (i), // 0
104+
"+r" (n) // 1
105+
:
106106
"r" (x), // 2
107107
"r" (y), // 3
108108
"r" (alpha) // 4

kernel/x86_64/daxpy_microk_steamroller-2.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ static void daxpy_kernel_8( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *alpha)
7878
"subq $16, %1 \n\t"
7979
"jnz 1b \n\t"
8080

81-
:
82-
:
83-
"r" (i), // 0
84-
"r" (n), // 1
81+
:
82+
"+r" (i), // 0
83+
"+r" (n) // 1
84+
:
8585
"r" (x), // 2
8686
"r" (y), // 3
8787
"r" (alpha) // 4
@@ -140,10 +140,10 @@ static void daxpy_kernel_8( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *alpha)
140140
"subq $16, %1 \n\t"
141141
"jnz 1b \n\t"
142142

143-
:
144-
:
145-
"r" (i), // 0
146-
"r" (n), // 1
143+
:
144+
"+r" (i), // 0
145+
"+r" (n) // 1
146+
:
147147
"r" (x), // 2
148148
"r" (y), // 3
149149
"r" (alpha) // 4

kernel/x86_64/ddot_microk_bulldozer-2.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ static void ddot_kernel_8( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *dot)
6565

6666
"vmovsd %%xmm4, (%4) \n\t"
6767

68-
:
69-
:
70-
"r" (i), // 0
71-
"r" (n), // 1
68+
:
69+
"+r" (i), // 0
70+
"+r" (n) // 1
71+
:
7272
"r" (x), // 2
7373
"r" (y), // 3
7474
"r" (dot) // 4

kernel/x86_64/ddot_microk_haswell-2.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ static void ddot_kernel_8( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *dot)
7777
"vzeroupper \n\t"
7878

7979
:
80-
:
81-
"r" (i), // 0
82-
"r" (n), // 1
80+
"+r" (i), // 0
81+
"+r" (n) // 1
82+
:
8383
"r" (x), // 2
8484
"r" (y), // 3
8585
"r" (dot) // 4

kernel/x86_64/ddot_microk_nehalem-2.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ static void ddot_kernel_8( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *dot)
7575

7676
"movsd %%xmm4, (%4) \n\t"
7777

78-
:
79-
:
80-
"r" (i), // 0
81-
"r" (n), // 1
78+
:
79+
"+r" (i), // 0
80+
"+r" (n) // 1
81+
:
8282
"r" (x), // 2
8383
"r" (y), // 3
8484
"r" (dot) // 4

kernel/x86_64/ddot_microk_piledriver-2.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ static void ddot_kernel_8( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *dot)
8181
"vmovsd %%xmm4, (%4) \n\t"
8282
"vzeroupper \n\t"
8383

84-
:
85-
:
86-
"r" (i), // 0
87-
"r" (n), // 1
84+
:
85+
"+r" (i), // 0
86+
"+r" (n) // 1
87+
:
8888
"r" (x), // 2
8989
"r" (y), // 3
9090
"r" (dot) // 4
@@ -145,10 +145,10 @@ static void ddot_kernel_8( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *dot)
145145
"vmovsd %%xmm4, (%4) \n\t"
146146
"vzeroupper \n\t"
147147

148-
:
149-
:
150-
"r" (i), // 0
151-
"r" (n), // 1
148+
:
149+
"+r" (i), // 0
150+
"+r" (n) // 1
151+
:
152152
"r" (x), // 2
153153
"r" (y), // 3
154154
"r" (dot) // 4

kernel/x86_64/ddot_microk_sandy-2.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ static void ddot_kernel_8( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *dot)
8181
"vmovsd %%xmm4, (%4) \n\t"
8282
"vzeroupper \n\t"
8383

84-
:
85-
:
86-
"r" (i), // 0
87-
"r" (n), // 1
84+
:
85+
"+r" (i), // 0
86+
"+r" (n) // 1
87+
:
8888
"r" (x), // 2
8989
"r" (y), // 3
9090
"r" (dot) // 4

kernel/x86_64/ddot_microk_steamroller-2.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ static void ddot_kernel_8( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *dot)
7878
"vmovsd %%xmm4, (%4) \n\t"
7979
"vzeroupper \n\t"
8080

81-
:
82-
:
83-
"r" (i), // 0
84-
"r" (n), // 1
81+
:
82+
"+r" (i), // 0
83+
"+r" (n) // 1
84+
:
8585
"r" (x), // 2
8686
"r" (y), // 3
8787
"r" (dot) // 4

0 commit comments

Comments
 (0)