-
Notifications
You must be signed in to change notification settings - Fork 0
/
processMandelbrotElement_3.ptx
299 lines (265 loc) · 7.86 KB
/
processMandelbrotElement_3.ptx
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
//
// Generated by NVIDIA NVVM Compiler
// Compiler built on Fri Sep 5 06:40:32 2014 (1409892032)
// Cuda compilation tools, release 6.5, V6.5.19
//
.version 4.1
.target sm_20
.address_size 64
.visible .func (.param .b64 func_retval0) _Z20calculateGlobalIndexv(
)
{
.reg .s32 %r<11>;
.reg .s64 %rd<4>;
mov.u32 %r1, %ctaid.x;
mov.u32 %r2, %ctaid.y;
mov.u32 %r3, %nctaid.x;
mad.lo.s32 %r4, %r3, %r2, %r1;
mov.u32 %r5, %tid.x;
mov.u32 %r6, %ntid.x;
mov.u32 %r7, %tid.y;
mad.lo.s32 %r8, %r7, %r6, %r5;
cvt.u64.u32 %rd1, %r8;
mov.u32 %r9, %ntid.y;
mul.lo.s32 %r10, %r9, %r6;
mul.wide.u32 %rd2, %r10, %r4;
add.s64 %rd3, %rd2, %rd1;
st.param.b64 [func_retval0+0], %rd3;
ret;
}
.visible .func (.param .b32 func_retval0) _Z12doIterationsddddjj(
.param .b64 _Z12doIterationsddddjj_param_0,
.param .b64 _Z12doIterationsddddjj_param_1,
.param .b64 _Z12doIterationsddddjj_param_2,
.param .b64 _Z12doIterationsddddjj_param_3,
.param .b32 _Z12doIterationsddddjj_param_4,
.param .b32 _Z12doIterationsddddjj_param_5
)
{
.reg .pred %p<3>;
.reg .s32 %r<7>;
.reg .f64 %fd<23>;
ld.param.f64 %fd22, [_Z12doIterationsddddjj_param_0];
ld.param.f64 %fd21, [_Z12doIterationsddddjj_param_1];
ld.param.f64 %fd9, [_Z12doIterationsddddjj_param_2];
ld.param.f64 %fd10, [_Z12doIterationsddddjj_param_3];
ld.param.u32 %r4, [_Z12doIterationsddddjj_param_5];
mov.u32 %r6, 0;
BB1_1:
mov.f64 %fd2, %fd22;
mul.f64 %fd3, %fd21, %fd21;
mul.f64 %fd4, %fd2, %fd2;
add.f64 %fd11, %fd4, %fd3;
setp.gtu.f64 %p1, %fd11, 0d4010000000000000;
@%p1 bra BB1_3;
add.s32 %r6, %r6, 1;
mul.f64 %fd12, %fd2, 0d4008000000000000;
mul.f64 %fd13, %fd12, %fd21;
mul.f64 %fd14, %fd13, %fd21;
mul.f64 %fd15, %fd4, %fd2;
sub.f64 %fd16, %fd15, %fd14;
add.f64 %fd22, %fd16, %fd9;
mul.f64 %fd17, %fd12, %fd2;
mul.f64 %fd18, %fd17, %fd21;
mul.f64 %fd19, %fd3, %fd21;
sub.f64 %fd20, %fd18, %fd19;
add.f64 %fd21, %fd20, %fd10;
setp.le.u32 %p2, %r6, %r4;
@%p2 bra BB1_1;
BB1_3:
st.param.b32 [func_retval0+0], %r6;
ret;
}
.visible .entry _Z28processMandelbrotElementTestPdPKdS1_ddjjjj(
.param .u64 _Z28processMandelbrotElementTestPdPKdS1_ddjjjj_param_0,
.param .u64 _Z28processMandelbrotElementTestPdPKdS1_ddjjjj_param_1,
.param .u64 _Z28processMandelbrotElementTestPdPKdS1_ddjjjj_param_2,
.param .f64 _Z28processMandelbrotElementTestPdPKdS1_ddjjjj_param_3,
.param .f64 _Z28processMandelbrotElementTestPdPKdS1_ddjjjj_param_4,
.param .u32 _Z28processMandelbrotElementTestPdPKdS1_ddjjjj_param_5,
.param .u32 _Z28processMandelbrotElementTestPdPKdS1_ddjjjj_param_6,
.param .u32 _Z28processMandelbrotElementTestPdPKdS1_ddjjjj_param_7,
.param .u32 _Z28processMandelbrotElementTestPdPKdS1_ddjjjj_param_8
)
{
.reg .pred %p<12>;
.reg .s32 %r<44>;
.reg .s64 %rd<16>;
.reg .f64 %fd<84>;
ld.param.u64 %rd3, [_Z28processMandelbrotElementTestPdPKdS1_ddjjjj_param_0];
ld.param.u64 %rd4, [_Z28processMandelbrotElementTestPdPKdS1_ddjjjj_param_1];
ld.param.u64 %rd5, [_Z28processMandelbrotElementTestPdPKdS1_ddjjjj_param_2];
ld.param.f64 %fd18, [_Z28processMandelbrotElementTestPdPKdS1_ddjjjj_param_3];
ld.param.f64 %fd19, [_Z28processMandelbrotElementTestPdPKdS1_ddjjjj_param_4];
ld.param.u32 %r15, [_Z28processMandelbrotElementTestPdPKdS1_ddjjjj_param_6];
ld.param.u32 %r16, [_Z28processMandelbrotElementTestPdPKdS1_ddjjjj_param_7];
mov.u32 %r17, %ctaid.x;
mov.u32 %r18, %nctaid.x;
mov.u32 %r19, %ctaid.y;
mad.lo.s32 %r20, %r18, %r19, %r17;
mov.u32 %r21, %tid.y;
mov.u32 %r22, %ntid.x;
mov.u32 %r23, %tid.x;
mad.lo.s32 %r24, %r21, %r22, %r23;
cvt.u64.u32 %rd6, %r24;
mov.u32 %r25, %ntid.y;
mul.lo.s32 %r26, %r25, %r22;
mul.wide.u32 %rd7, %r26, %r20;
add.s64 %rd1, %rd7, %rd6;
ld.param.u32 %rd8, [_Z28processMandelbrotElementTestPdPKdS1_ddjjjj_param_8];
setp.ge.u64 %p1, %rd1, %rd8;
@%p1 bra BB2_17;
cvta.to.global.u64 %rd2, %rd3;
cvta.to.global.u64 %rd9, %rd4;
cvta.to.global.u64 %rd10, %rd5;
shl.b64 %rd11, %rd1, 3;
add.s64 %rd12, %rd9, %rd11;
add.s64 %rd13, %rd10, %rd11;
ld.global.f64 %fd81, [%rd12];
mul.f64 %fd20, %fd81, %fd18;
ld.global.f64 %fd80, [%rd13];
mul.f64 %fd21, %fd80, %fd19;
setp.eq.s32 %p2, %r16, 1;
selp.f64 %fd3, %fd20, %fd18, %p2;
selp.f64 %fd4, %fd21, %fd19, %p2;
mov.u32 %r39, 0;
BB2_2:
mov.f64 %fd6, %fd81;
mul.f64 %fd7, %fd80, %fd80;
mul.f64 %fd8, %fd6, %fd6;
add.f64 %fd22, %fd8, %fd7;
setp.gtu.f64 %p3, %fd22, 0d4010000000000000;
@%p3 bra BB2_4;
add.s32 %r39, %r39, 1;
mul.f64 %fd23, %fd6, 0d4008000000000000;
mul.f64 %fd24, %fd23, %fd80;
mul.f64 %fd25, %fd24, %fd80;
mul.f64 %fd26, %fd8, %fd6;
sub.f64 %fd27, %fd26, %fd25;
add.f64 %fd81, %fd27, %fd3;
mul.f64 %fd28, %fd23, %fd6;
mul.f64 %fd29, %fd28, %fd80;
mul.f64 %fd30, %fd7, %fd80;
sub.f64 %fd31, %fd29, %fd30;
add.f64 %fd80, %fd31, %fd4;
setp.le.u32 %p4, %r39, %r15;
@%p4 bra BB2_2;
BB2_4:
add.s32 %r4, %r39, 1;
cvt.rn.f64.u32 %fd11, %r4;
{
.reg .b32 %temp;
mov.b64 {%temp, %r40}, %fd11;
}
setp.ne.s32 %p5, %r4, 0;
setp.lt.s32 %p6, %r40, 2146435072;
and.pred %p7, %p5, %p6;
@%p7 bra BB2_10;
abs.f64 %fd32, %fd11;
setp.gtu.f64 %p8, %fd32, 0d7FF0000000000000;
@%p8 bra BB2_9;
@%p5 bra BB2_8;
mov.f64 %fd83, 0dFFF0000000000000;
bra.uni BB2_16;
BB2_8:
mov.f64 %fd83, 0dFFF8000000000000;
bra.uni BB2_16;
BB2_9:
add.f64 %fd83, %fd11, %fd11;
bra.uni BB2_16;
BB2_10:
{
.reg .b32 %temp;
mov.b64 {%r41, %temp}, %fd11;
}
setp.lt.s32 %p10, %r40, 1048576;
@%p10 bra BB2_12;
mov.u32 %r42, -1023;
bra.uni BB2_13;
BB2_12:
mul.f64 %fd35, %fd11, 0d4350000000000000;
{
.reg .b32 %temp;
mov.b64 {%temp, %r40}, %fd35;
}
{
.reg .b32 %temp;
mov.b64 {%r41, %temp}, %fd35;
}
mov.u32 %r42, -1077;
BB2_13:
shr.u32 %r30, %r40, 20;
add.s32 %r43, %r42, %r30;
and.b32 %r31, %r40, -2146435073;
or.b32 %r32, %r31, 1072693248;
mov.b64 %fd82, {%r41, %r32};
setp.lt.s32 %p11, %r32, 1073127583;
@%p11 bra BB2_15;
{
.reg .b32 %temp;
mov.b64 {%r33, %temp}, %fd82;
}
{
.reg .b32 %temp;
mov.b64 {%temp, %r34}, %fd82;
}
add.s32 %r35, %r34, -1048576;
mov.b64 %fd82, {%r33, %r35};
add.s32 %r43, %r43, 1;
BB2_15:
add.f64 %fd37, %fd82, 0d3FF0000000000000;
mov.f64 %fd38, 0d3FF0000000000000;
// inline asm
rcp.approx.ftz.f64 %fd36,%fd37;
// inline asm
neg.f64 %fd39, %fd37;
fma.rn.f64 %fd40, %fd39, %fd36, %fd38;
fma.rn.f64 %fd41, %fd40, %fd40, %fd40;
fma.rn.f64 %fd42, %fd41, %fd36, %fd36;
add.f64 %fd43, %fd82, 0dBFF0000000000000;
mul.f64 %fd44, %fd43, %fd42;
fma.rn.f64 %fd45, %fd43, %fd42, %fd44;
mul.f64 %fd46, %fd45, %fd45;
mov.f64 %fd47, 0d3ED0EE258B7A8B04;
mov.f64 %fd48, 0d3EB1380B3AE80F1E;
fma.rn.f64 %fd49, %fd48, %fd46, %fd47;
mov.f64 %fd50, 0d3EF3B2669F02676F;
fma.rn.f64 %fd51, %fd49, %fd46, %fd50;
mov.f64 %fd52, 0d3F1745CBA9AB0956;
fma.rn.f64 %fd53, %fd51, %fd46, %fd52;
mov.f64 %fd54, 0d3F3C71C72D1B5154;
fma.rn.f64 %fd55, %fd53, %fd46, %fd54;
mov.f64 %fd56, 0d3F624924923BE72D;
fma.rn.f64 %fd57, %fd55, %fd46, %fd56;
mov.f64 %fd58, 0d3F8999999999A3C4;
fma.rn.f64 %fd59, %fd57, %fd46, %fd58;
mov.f64 %fd60, 0d3FB5555555555554;
fma.rn.f64 %fd61, %fd59, %fd46, %fd60;
sub.f64 %fd62, %fd43, %fd45;
add.f64 %fd63, %fd62, %fd62;
neg.f64 %fd64, %fd45;
fma.rn.f64 %fd65, %fd64, %fd43, %fd63;
mul.f64 %fd66, %fd42, %fd65;
mul.f64 %fd67, %fd61, %fd46;
fma.rn.f64 %fd68, %fd67, %fd45, %fd66;
xor.b32 %r36, %r43, -2147483648;
mov.u32 %r37, -2147483648;
mov.u32 %r38, 1127219200;
mov.b64 %fd69, {%r36, %r38};
mov.b64 %fd70, {%r37, %r38};
sub.f64 %fd71, %fd69, %fd70;
mov.f64 %fd72, 0d3FE62E42FEFA39EF;
fma.rn.f64 %fd73, %fd71, %fd72, %fd45;
neg.f64 %fd74, %fd71;
fma.rn.f64 %fd75, %fd74, %fd72, %fd73;
sub.f64 %fd76, %fd75, %fd45;
sub.f64 %fd77, %fd68, %fd76;
mov.f64 %fd78, 0d3C7ABC9E3B39803F;
fma.rn.f64 %fd79, %fd71, %fd78, %fd77;
add.f64 %fd83, %fd73, %fd79;
BB2_16:
add.s64 %rd15, %rd2, %rd11;
st.global.f64 [%rd15], %fd83;
BB2_17:
ret;
}