~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/security/nss/lib/freebl/mpi/vis_64.il

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
2
!  The contents of this file are subject to the Mozilla Public
 
3
!  License Version 1.1 (the "License"); you may not use this file
 
4
!  except in compliance with the License. You may obtain a copy of
 
5
!  the License at http://www.mozilla.org/MPL/
 
6
!  
 
7
!  Software distributed under the License is distributed on an "AS
 
8
!  IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
 
9
!  implied. See the License for the specific language governing
 
10
!  rights and limitations under the License.
 
11
!  
 
12
!  The Original Code is vis inline macros (64 bit).  (vis_64.il 3.4)
 
13
 
14
!  The Initial Developer of the Original Code is Sun Microsystems Inc.
 
15
!  Portions created by Sun Microsystems Inc. are 
 
16
!  Copyright (C) 1998-2000 Sun Microsystems Inc. All Rights Reserved.
 
17
!  
 
18
!  Contributor(s):
 
19
!  
 
20
!  Alternatively, the contents of this file may be used under the
 
21
!  terms of the GNU General Public License Version 2 or later (the
 
22
!  "GPL"), in which case the provisions of the GPL are applicable 
 
23
!  instead of those above.      If you wish to allow use of your 
 
24
!  version of this file only under the terms of the GPL and not to
 
25
!  allow others to use your version of this file under the MPL,
 
26
!  indicate your decision by deleting the provisions above and
 
27
!  replace them with the notice and other provisions required by
 
28
!  the GPL.  If you do not delete the provisions above, a recipient
 
29
!  may use your version of this file under either the MPL or the
 
30
!  GPL.
 
31
!   $Id: vis_64.il,v 1.1 2000/09/29 23:38:05 nelsonb%netscape.com Exp $
 
32
 
33
! @(#)vis_64.il 3.4     00/03/02 SMI
 
34
 
 
35
! This file is to be used in place of vis.il in 64-bit builds.
 
36
 
 
37
!--------------------------------------------------------------------
 
38
! Pure edge handling instructions
 
39
!
 
40
! int vis_edge8(void */*frs1*/, void */*frs2*/);
 
41
!
 
42
        .inline vis_edge8,16
 
43
        edge8   %o0,%o1,%o0
 
44
        .end
 
45
!
 
46
! int vis_edge8l(void */*frs1*/, void */*frs2*/);
 
47
!
 
48
        .inline vis_edge8l,16
 
49
        edge8l  %o0,%o1,%o0
 
50
        .end
 
51
!
 
52
! int vis_edge16(void */*frs1*/, void */*frs2*/);
 
53
!
 
54
        .inline vis_edge16,16
 
55
        edge16  %o0,%o1,%o0
 
56
        .end
 
57
!
 
58
! int vis_edge16l(void */*frs1*/, void */*frs2*/);
 
59
!
 
60
        .inline vis_edge16l,16
 
61
        edge16l %o0,%o1,%o0
 
62
        .end
 
63
!
 
64
! int vis_edge32(void */*frs1*/, void */*frs2*/);
 
65
!
 
66
        .inline vis_edge32,16
 
67
        edge32  %o0,%o1,%o0
 
68
        .end
 
69
!
 
70
! int vis_edge32l(void */*frs1*/, void */*frs2*/);
 
71
!
 
72
        .inline vis_edge32l,16
 
73
        edge32l %o0,%o1,%o0
 
74
        .end
 
75
 
 
76
!--------------------------------------------------------------------
 
77
! Edge handling instructions with negative return values if cc set
 
78
!
 
79
! int vis_edge8cc(void */*frs1*/, void */*frs2*/);
 
80
!
 
81
        .inline vis_edge8cc,16
 
82
        edge8   %o0,%o1,%o0
 
83
        mov     0,%o1
 
84
        movgu   %xcc,-1024,%o1
 
85
        or      %o1,%o0,%o0
 
86
        .end
 
87
!
 
88
! int vis_edge8lcc(void */*frs1*/, void */*frs2*/);
 
89
!
 
90
        .inline vis_edge8lcc,16
 
91
        edge8l  %o0,%o1,%o0
 
92
        mov     0,%o1
 
93
        movgu   %xcc,-1024,%o1
 
94
        or      %o1,%o0,%o0
 
95
        .end
 
96
!
 
97
! int vis_edge16cc(void */*frs1*/, void */*frs2*/);
 
98
!
 
99
        .inline vis_edge16cc,16
 
100
        edge16  %o0,%o1,%o0
 
101
        mov     0,%o1
 
102
        movgu   %xcc,-1024,%o1
 
103
        or      %o1,%o0,%o0
 
104
        .end
 
105
!
 
106
! int vis_edge16lcc(void */*frs1*/, void */*frs2*/);
 
107
!
 
108
        .inline vis_edge16lcc,16
 
109
        edge16l %o0,%o1,%o0
 
110
        mov     0,%o1
 
111
        movgu   %xcc,-1024,%o1
 
112
        or      %o1,%o0,%o0
 
113
        .end
 
114
!
 
115
! int vis_edge32cc(void */*frs1*/, void */*frs2*/);
 
116
!
 
117
        .inline vis_edge32cc,16
 
118
        edge32  %o0,%o1,%o0
 
119
        mov     0,%o1
 
120
        movgu   %xcc,-1024,%o1
 
121
        or      %o1,%o0,%o0
 
122
        .end
 
123
!
 
124
! int vis_edge32lcc(void */*frs1*/, void */*frs2*/);
 
125
!
 
126
        .inline vis_edge32lcc,16
 
127
        edge32l %o0,%o1,%o0
 
128
        mov     0,%o1
 
129
        movgu   %xcc,-1024,%o1
 
130
        or      %o1,%o0,%o0
 
131
        .end
 
132
 
 
133
!--------------------------------------------------------------------
 
134
! Alignment instructions
 
135
!
 
136
! void *vis_alignaddr(void */*rs1*/, int /*rs2*/);
 
137
!
 
138
        .inline vis_alignaddr,12
 
139
        alignaddr       %o0,%o1,%o0
 
140
        .end
 
141
!
 
142
! void *vis_alignaddrl(void */*rs1*/, int /*rs2*/);
 
143
!
 
144
        .inline vis_alignaddrl,12
 
145
        alignaddrl      %o0,%o1,%o0
 
146
        .end
 
147
!
 
148
! double vis_faligndata(double /*frs1*/, double /*frs2*/);
 
149
!
 
150
        .inline vis_faligndata,16
 
151
        faligndata      %f0,%f2,%f0
 
152
        .end
 
153
 
 
154
!--------------------------------------------------------------------
 
155
! Partitioned comparison instructions
 
156
!
 
157
! int vis_fcmple16(double /*frs1*/, double /*frs2*/);
 
158
!
 
159
        .inline vis_fcmple16,16
 
160
        fcmple16        %f0,%f2,%o0
 
161
        .end
 
162
!
 
163
! int vis_fcmpne16(double /*frs1*/, double /*frs2*/);
 
164
!
 
165
        .inline vis_fcmpne16,16
 
166
        fcmpne16        %f0,%f2,%o0
 
167
        .end
 
168
!
 
169
! int vis_fcmple32(double /*frs1*/, double /*frs2*/);
 
170
!
 
171
        .inline vis_fcmple32,16
 
172
        fcmple32        %f0,%f2,%o0
 
173
        .end
 
174
!
 
175
! int vis_fcmpne32(double /*frs1*/, double /*frs2*/);
 
176
!
 
177
        .inline vis_fcmpne32,16
 
178
        fcmpne32        %f0,%f2,%o0
 
179
        .end
 
180
!
 
181
! int vis_fcmpgt16(double /*frs1*/, double /*frs2*/);
 
182
!
 
183
        .inline vis_fcmpgt16,16
 
184
        fcmpgt16        %f0,%f2,%o0
 
185
        .end
 
186
!
 
187
! int vis_fcmpeq16(double /*frs1*/, double /*frs2*/);
 
188
!
 
189
        .inline vis_fcmpeq16,16
 
190
        fcmpeq16        %f0,%f2,%o0
 
191
        .end
 
192
!
 
193
! int vis_fcmpgt32(double /*frs1*/, double /*frs2*/);
 
194
!
 
195
        .inline vis_fcmpgt32,16
 
196
        fcmpgt32        %f0,%f2,%o0
 
197
        .end
 
198
!
 
199
! int vis_fcmpeq32(double /*frs1*/, double /*frs2*/);
 
200
!
 
201
        .inline vis_fcmpeq32,16
 
202
        fcmpeq32        %f0,%f2,%o0
 
203
        .end
 
204
 
 
205
!--------------------------------------------------------------------
 
206
! Partitioned arithmetic
 
207
!
 
208
! double vis_fmul8x16(float /*frs1*/, double /*frs2*/);
 
209
!
 
210
        .inline vis_fmul8x16,12
 
211
        fmul8x16        %f1,%f2,%f0
 
212
        .end
 
213
!
 
214
! double vis_fmul8x16_dummy(float /*frs1*/, int /*dummy*/, double /*frs2*/);
 
215
!
 
216
        .inline vis_fmul8x16_dummy,16
 
217
        fmul8x16        %f1,%f4,%f0
 
218
        .end
 
219
!
 
220
! double vis_fmul8x16au(float /*frs1*/, float /*frs2*/);
 
221
!
 
222
        .inline vis_fmul8x16au,8
 
223
        fmul8x16au      %f1,%f3,%f0
 
224
        .end
 
225
!
 
226
! double vis_fmul8x16al(float /*frs1*/, float /*frs2*/);
 
227
!
 
228
        .inline vis_fmul8x16al,8
 
229
        fmul8x16al      %f1,%f3,%f0
 
230
        .end
 
231
!
 
232
! double vis_fmul8sux16(double /*frs1*/, double /*frs2*/);
 
233
!
 
234
        .inline vis_fmul8sux16,16
 
235
        fmul8sux16      %f0,%f2,%f0
 
236
        .end
 
237
!
 
238
! double vis_fmul8ulx16(double /*frs1*/, double /*frs2*/);
 
239
!
 
240
        .inline vis_fmul8ulx16,16
 
241
        fmul8ulx16      %f0,%f2,%f0
 
242
        .end
 
243
!
 
244
! double vis_fmuld8sux16(float /*frs1*/, float /*frs2*/);
 
245
!
 
246
        .inline vis_fmuld8sux16,8
 
247
        fmuld8sux16     %f1,%f3,%f0
 
248
        .end
 
249
!
 
250
! double vis_fmuld8ulx16(float /*frs1*/, float /*frs2*/);
 
251
!
 
252
        .inline vis_fmuld8ulx16,8
 
253
        fmuld8ulx16     %f1,%f3,%f0
 
254
        .end
 
255
!
 
256
! double vis_fpadd16(double /*frs1*/, double /*frs2*/);
 
257
!
 
258
        .inline vis_fpadd16,16
 
259
        fpadd16 %f0,%f2,%f0
 
260
        .end
 
261
!
 
262
! float vis_fpadd16s(float /*frs1*/, float /*frs2*/);
 
263
!
 
264
        .inline vis_fpadd16s,8
 
265
        fpadd16s        %f1,%f3,%f0
 
266
        .end
 
267
!
 
268
! double vis_fpadd32(double /*frs1*/, double /*frs2*/);
 
269
!
 
270
        .inline vis_fpadd32,16
 
271
        fpadd32 %f0,%f2,%f0
 
272
        .end
 
273
!
 
274
! float vis_fpadd32s(float /*frs1*/, float /*frs2*/);
 
275
!
 
276
        .inline vis_fpadd32s,8
 
277
        fpadd32s        %f1,%f3,%f0
 
278
        .end
 
279
!
 
280
! double vis_fpsub16(double /*frs1*/, double /*frs2*/);
 
281
!
 
282
        .inline vis_fpsub16,16
 
283
        fpsub16 %f0,%f2,%f0
 
284
        .end
 
285
!
 
286
! float vis_fpsub16s(float /*frs1*/, float /*frs2*/);
 
287
!
 
288
        .inline vis_fpsub16s,8
 
289
        fpsub16s        %f1,%f3,%f0
 
290
        .end
 
291
!
 
292
! double vis_fpsub32(double /*frs1*/, double /*frs2*/);
 
293
!
 
294
        .inline vis_fpsub32,16
 
295
        fpsub32 %f0,%f2,%f0
 
296
        .end
 
297
!
 
298
! float vis_fpsub32s(float /*frs1*/, float /*frs2*/);
 
299
!
 
300
        .inline vis_fpsub32s,8
 
301
        fpsub32s        %f1,%f3,%f0
 
302
        .end
 
303
 
 
304
!--------------------------------------------------------------------
 
305
! Pixel packing
 
306
!
 
307
! float vis_fpack16(double /*frs2*/);
 
308
!
 
309
        .inline vis_fpack16,8
 
310
        fpack16 %f0,%f0
 
311
        .end
 
312
!
 
313
! double vis_fpack16_pair(double /*frs2*/, double /*frs2*/);
 
314
!
 
315
        .inline vis_fpack16_pair,16
 
316
        fpack16 %f0,%f0
 
317
        fpack16 %f2,%f1
 
318
        .end
 
319
!
 
320
! void vis_st2_fpack16(double, double, double *)
 
321
!
 
322
        .inline vis_st2_fpack16,24
 
323
        fpack16 %f0,%f0
 
324
        fpack16 %f2,%f1
 
325
        st      %f0,[%o2+0]
 
326
        st      %f1,[%o2+4]
 
327
        .end
 
328
!
 
329
! void vis_std_fpack16(double, double, double *)
 
330
!
 
331
        .inline vis_std_fpack16,24
 
332
        fpack16 %f0,%f0
 
333
        fpack16 %f2,%f1
 
334
        std     %f0,[%o2]
 
335
        .end
 
336
!
 
337
! void vis_st2_fpackfix(double, double, double *)
 
338
!
 
339
        .inline vis_st2_fpackfix,24
 
340
        fpackfix %f0,%f0
 
341
        fpackfix %f2,%f1
 
342
        st      %f0,[%o2+0]
 
343
        st      %f1,[%o2+4]
 
344
        .end
 
345
!
 
346
! double vis_fpack16_to_hi(double /*frs1*/, double /*frs2*/);
 
347
!
 
348
        .inline vis_fpack16_to_hi,16
 
349
        fpack16 %f2,%f0
 
350
        .end
 
351
 
 
352
! double vis_fpack16_to_lo(double /*frs1*/, double /*frs2*/);
 
353
!
 
354
        .inline vis_fpack16_to_lo,16
 
355
        fpack16 %f2,%f3
 
356
        fmovs   %f3,%f1         /* without this, optimizer goes wrong */
 
357
        .end
 
358
 
 
359
!
 
360
! double vis_fpack32(double /*frs1*/, double /*frs2*/);
 
361
!
 
362
        .inline vis_fpack32,16
 
363
        fpack32 %f0,%f2,%f0
 
364
        .end
 
365
!
 
366
! float vis_fpackfix(double /*frs2*/);
 
367
!
 
368
        .inline vis_fpackfix,8
 
369
        fpackfix        %f0,%f0
 
370
        .end
 
371
!
 
372
! double vis_fpackfix_pair(double /*frs2*/, double /*frs2*/);
 
373
!
 
374
        .inline vis_fpackfix_pair,16
 
375
        fpackfix        %f0,%f0
 
376
        fpackfix        %f2,%f1
 
377
        .end
 
378
 
 
379
!--------------------------------------------------------------------
 
380
! Motion estimation
 
381
!
 
382
! double vis_pxldist64(double accum /*frd*/, double pxls1 /*frs1*/, 
 
383
!                      double pxls2 /*frs2*/);
 
384
!
 
385
        .inline vis_pxldist64,24
 
386
        pdist   %f2,%f4,%f0
 
387
        .end
 
388
 
 
389
!--------------------------------------------------------------------
 
390
! Channel merging
 
391
!
 
392
! double vis_fpmerge(float /*frs1*/, float /*frs2*/);
 
393
!
 
394
        .inline vis_fpmerge,8
 
395
        fpmerge %f1,%f3,%f0
 
396
        .end
 
397
 
 
398
!--------------------------------------------------------------------
 
399
! Pixel expansion
 
400
!
 
401
! double vis_fexpand(float /*frs2*/);
 
402
!
 
403
        .inline vis_fexpand,4
 
404
        fexpand %f1,%f0
 
405
        .end
 
406
 
 
407
! double vis_fexpand_hi(double /*frs2*/);
 
408
!
 
409
        .inline vis_fexpand_hi,8
 
410
        fexpand %f0,%f0
 
411
        .end
 
412
 
 
413
! double vis_fexpand_lo(double /*frs2*/);
 
414
!
 
415
        .inline vis_fexpand_lo,8
 
416
        fexpand %f1,%f0
 
417
        .end
 
418
 
 
419
!--------------------------------------------------------------------
 
420
! Bitwise logical operations
 
421
!
 
422
! double vis_fnor(double /*frs1*/, double /*frs2*/);
 
423
!
 
424
        .inline vis_fnor,16
 
425
        fnor    %f0,%f2,%f0
 
426
        .end
 
427
!
 
428
! float vis_fnors(float /*frs1*/, float /*frs2*/);
 
429
!
 
430
        .inline vis_fnors,8
 
431
        fnors   %f1,%f3,%f0
 
432
        .end
 
433
!
 
434
! double vis_fandnot(double /*frs1*/, double /*frs2*/);
 
435
!
 
436
        .inline vis_fandnot,16
 
437
        fandnot1 %f0,%f2,%f0
 
438
        .end
 
439
!
 
440
! float vis_fandnots(float /*frs1*/, float /*frs2*/);
 
441
!
 
442
        .inline vis_fandnots,8
 
443
        fandnot1s %f1,%f3,%f0
 
444
        .end
 
445
!
 
446
! double vis_fnot(double /*frs1*/);
 
447
!
 
448
        .inline vis_fnot,8
 
449
        fnot1   %f0,%f0
 
450
        .end
 
451
!
 
452
! float vis_fnots(float /*frs1*/);
 
453
!
 
454
        .inline vis_fnots,4
 
455
        fnot1s  %f1,%f0
 
456
        .end
 
457
!
 
458
! double vis_fxor(double /*frs1*/, double /*frs2*/);
 
459
!
 
460
        .inline vis_fxor,16
 
461
        fxor    %f0,%f2,%f0
 
462
        .end
 
463
!
 
464
! float vis_fxors(float /*frs1*/, float /*frs2*/);
 
465
!
 
466
        .inline vis_fxors,8
 
467
        fxors   %f1,%f3,%f0
 
468
        .end
 
469
!
 
470
! double vis_fnand(double /*frs1*/, double /*frs2*/);
 
471
!
 
472
        .inline vis_fnand,16
 
473
        fnand   %f0,%f2,%f0
 
474
        .end
 
475
!
 
476
! float vis_fnands(float /*frs1*/, float /*frs2*/);
 
477
!
 
478
        .inline vis_fnands,8
 
479
        fnands  %f1,%f3,%f0
 
480
        .end
 
481
!
 
482
! double vis_fand(double /*frs1*/, double /*frs2*/);
 
483
!
 
484
        .inline vis_fand,16
 
485
        fand    %f0,%f2,%f0
 
486
        .end
 
487
!
 
488
! float vis_fands(float /*frs1*/, float /*frs2*/);
 
489
!
 
490
        .inline vis_fands,8
 
491
        fands   %f1,%f3,%f0
 
492
        .end
 
493
!
 
494
! double vis_fxnor(double /*frs1*/, double /*frs2*/);
 
495
!
 
496
        .inline vis_fxnor,16
 
497
        fxnor   %f0,%f2,%f0
 
498
        .end
 
499
!
 
500
! float vis_fxnors(float /*frs1*/, float /*frs2*/);
 
501
!
 
502
        .inline vis_fxnors,8
 
503
        fxnors  %f1,%f3,%f0
 
504
        .end
 
505
!
 
506
! double vis_fsrc(double /*frs1*/);
 
507
!
 
508
        .inline vis_fsrc,8
 
509
        fsrc1   %f0,%f0
 
510
        .end
 
511
!
 
512
! float vis_fsrcs(float /*frs1*/);
 
513
!
 
514
        .inline vis_fsrcs,4
 
515
        fsrc1s  %f1,%f0
 
516
        .end
 
517
!
 
518
! double vis_fornot(double /*frs1*/, double /*frs2*/);
 
519
!
 
520
        .inline vis_fornot,16
 
521
        fornot1 %f0,%f2,%f0
 
522
        .end
 
523
!
 
524
! float vis_fornots(float /*frs1*/, float /*frs2*/);
 
525
!
 
526
        .inline vis_fornots,8
 
527
        fornot1s %f1,%f3,%f0
 
528
        .end
 
529
!
 
530
! double vis_for(double /*frs1*/, double /*frs2*/);
 
531
!
 
532
        .inline vis_for,16
 
533
        for     %f0,%f2,%f0
 
534
        .end
 
535
!
 
536
! float vis_fors(float /*frs1*/, float /*frs2*/);
 
537
!
 
538
        .inline vis_fors,8
 
539
        fors    %f1,%f3,%f0
 
540
        .end
 
541
!
 
542
! double vis_fzero(/* void */)
 
543
!
 
544
        .inline vis_fzero,0
 
545
        fzero   %f0
 
546
        .end
 
547
!
 
548
! float vis_fzeros(/* void */)
 
549
!
 
550
        .inline vis_fzeros,0
 
551
        fzeros  %f0
 
552
        .end
 
553
!
 
554
! double vis_fone(/* void */)
 
555
!
 
556
        .inline vis_fone,0
 
557
        fone    %f0
 
558
        .end
 
559
!
 
560
! float vis_fones(/* void */)
 
561
!
 
562
        .inline vis_fones,0
 
563
        fones   %f0
 
564
        .end
 
565
 
 
566
!--------------------------------------------------------------------
 
567
! Partial store instructions
 
568
!
 
569
! vis_stdfa_ASI_PST8P(double frd, void *rs1, int rmask)
 
570
!
 
571
        .inline vis_stdfa_ASI_PST8P,20
 
572
        stda    %f0,[%o1]%o2,0xc0       ! ASI_PST8_P
 
573
        .end
 
574
!
 
575
! vis_stdfa_ASI_PST8PL(double frd, void *rs1, int rmask)
 
576
!
 
577
        .inline vis_stdfa_ASI_PST8PL,20
 
578
        stda    %f0,[%o1]%o2,0xc8       ! ASI_PST8_PL
 
579
        .end
 
580
!
 
581
! vis_stdfa_ASI_PST8P_int_pair(void *rs1, void *rs2, void *rs3, int rmask);
 
582
!
 
583
        .inline vis_stdfa_ASI_PST8P_int_pair,28
 
584
        ld      [%o0],%f4
 
585
        ld      [%o1],%f5
 
586
        stda    %f4,[%o2]%o3,0xc0       ! ASI_PST8_P
 
587
        .end
 
588
!
 
589
! vis_stdfa_ASI_PST8S(double frd, void *rs1, int rmask)
 
590
!
 
591
        .inline vis_stdfa_ASI_PST8S,20
 
592
        stda    %f0,[%o1]%o2,0xc1       ! ASI_PST8_S
 
593
        .end
 
594
!
 
595
! vis_stdfa_ASI_PST16P(double frd, void *rs1, int rmask)
 
596
!
 
597
        .inline vis_stdfa_ASI_PST16P,20
 
598
        stda    %f0,[%o1]%o2,0xc2       ! ASI_PST16_P
 
599
        .end
 
600
!
 
601
! vis_stdfa_ASI_PST16S(double frd, void *rs1, int rmask)
 
602
!
 
603
        .inline vis_stdfa_ASI_PST16S,20
 
604
        stda    %f0,[%o1]%o2,0xc3       ! ASI_PST16_S
 
605
        .end
 
606
!
 
607
! vis_stdfa_ASI_PST32P(double frd, void *rs1, int rmask)
 
608
!
 
609
        .inline vis_stdfa_ASI_PST32P,20
 
610
        stda    %f0,[%o1]%o2,0xc4       ! ASI_PST32_P
 
611
        .end
 
612
!
 
613
! vis_stdfa_ASI_PST32S(double frd, void *rs1, int rmask)
 
614
!
 
615
        .inline vis_stdfa_ASI_PST32S,20
 
616
        stda    %f0,[%o1]%o2,0xc5       ! ASI_PST32_S
 
617
        .end
 
618
 
 
619
!--------------------------------------------------------------------
 
620
! Short store instructions
 
621
!
 
622
! vis_stdfa_ASI_FL8P(double frd, void *rs1)
 
623
!
 
624
        .inline vis_stdfa_ASI_FL8P,16
 
625
        stda    %f0,[%o1]0xd0   ! ASI_FL8_P
 
626
        .end
 
627
!
 
628
! vis_stdfa_ASI_FL8P_index(double frd, void *rs1, long index)
 
629
!
 
630
        .inline vis_stdfa_ASI_FL8P_index,24
 
631
        stda    %f0,[%o1+%o2]0xd0 ! ASI_FL8_P
 
632
        .end
 
633
!
 
634
! vis_stdfa_ASI_FL8S(double frd, void *rs1)
 
635
!
 
636
        .inline vis_stdfa_ASI_FL8S,16
 
637
        stda    %f0,[%o1]0xd1   ! ASI_FL8_S
 
638
        .end
 
639
!
 
640
! vis_stdfa_ASI_FL16P(double frd, void *rs1)
 
641
!
 
642
        .inline vis_stdfa_ASI_FL16P,16
 
643
        stda    %f0,[%o1]0xd2   ! ASI_FL16_P
 
644
        .end
 
645
!
 
646
! vis_stdfa_ASI_FL16P_index(double frd, void *rs1, long index)
 
647
!
 
648
        .inline vis_stdfa_ASI_FL16P_index,24
 
649
        stda    %f0,[%o1+%o2]0xd2 ! ASI_FL16_P
 
650
        .end
 
651
!
 
652
! vis_stdfa_ASI_FL16S(double frd, void *rs1)
 
653
!
 
654
        .inline vis_stdfa_ASI_FL16S,16
 
655
        stda    %f0,[%o1]0xd3   ! ASI_FL16_S
 
656
        .end
 
657
!
 
658
! vis_stdfa_ASI_FL8PL(double frd, void *rs1)
 
659
!
 
660
        .inline vis_stdfa_ASI_FL8PL,16
 
661
        stda    %f0,[%o1]0xd8   ! ASI_FL8_PL
 
662
        .end
 
663
!
 
664
! vis_stdfa_ASI_FL8SL(double frd, void *rs1)
 
665
!
 
666
        .inline vis_stdfa_ASI_FL8SL,16
 
667
        stda    %f0,[%o1]0xd9   ! ASI_FL8_SL
 
668
        .end
 
669
!
 
670
! vis_stdfa_ASI_FL16PL(double frd, void *rs1)
 
671
!
 
672
        .inline vis_stdfa_ASI_FL16PL,16
 
673
        stda    %f0,[%o1]0xda   ! ASI_FL16_PL
 
674
        .end
 
675
!
 
676
! vis_stdfa_ASI_FL16SL(double frd, void *rs1)
 
677
!
 
678
        .inline vis_stdfa_ASI_FL16SL,16
 
679
        stda    %f0,[%o1]0xdb   ! ASI_FL16_SL
 
680
        .end
 
681
 
 
682
!--------------------------------------------------------------------
 
683
! Short load instructions
 
684
!
 
685
! double vis_lddfa_ASI_FL8P(void *rs1)
 
686
!
 
687
        .inline vis_lddfa_ASI_FL8P,8
 
688
        ldda    [%o0]0xd0,%f4   ! ASI_FL8_P
 
689
        fmovd   %f4,%f0         ! Compiler can clean this up
 
690
        .end
 
691
!
 
692
! double vis_lddfa_ASI_FL8P_index(void *rs1, long index)
 
693
!
 
694
        .inline vis_lddfa_ASI_FL8P_index,16
 
695
        ldda    [%o0+%o1]0xd0,%f4
 
696
        fmovd   %f4,%f0
 
697
        .end
 
698
!
 
699
! double vis_lddfa_ASI_FL8P_hi(void *rs1, unsigned int index)
 
700
!
 
701
        .inline vis_lddfa_ASI_FL8P_hi,12
 
702
        sra     %o1,16,%o1
 
703
        ldda    [%o0+%o1]0xd0,%f4
 
704
        fmovd   %f4,%f0
 
705
        .end
 
706
!
 
707
! double vis_lddfa_ASI_FL8P_lo(void *rs1, unsigned int index)
 
708
!
 
709
        .inline vis_lddfa_ASI_FL8P_lo,12
 
710
        sll     %o1,16,%o1
 
711
        sra     %o1,16,%o1
 
712
        ldda    [%o0+%o1]0xd0,%f4
 
713
        fmovd   %f4,%f0
 
714
        .end
 
715
!
 
716
! double vis_lddfa_ASI_FL8S(void *rs1)
 
717
!
 
718
        .inline vis_lddfa_ASI_FL8S,8
 
719
        ldda    [%o0]0xd1,%f4   ! ASI_FL8_S
 
720
        fmovd   %f4,%f0
 
721
        .end
 
722
!
 
723
! double vis_lddfa_ASI_FL16P(void *rs1)
 
724
!
 
725
        .inline vis_lddfa_ASI_FL16P,8
 
726
        ldda    [%o0]0xd2,%f4   ! ASI_FL16_P
 
727
        fmovd   %f4,%f0
 
728
        .end
 
729
!
 
730
! double vis_lddfa_ASI_FL16P_index(void *rs1, long index)
 
731
!
 
732
        .inline vis_lddfa_ASI_FL16P_index,16
 
733
        ldda    [%o0+%o1]0xd2,%f4 ! ASI_FL16_P
 
734
        fmovd   %f4,%f0
 
735
        .end
 
736
!
 
737
! double vis_lddfa_ASI_FL16S(void *rs1)
 
738
!
 
739
        .inline vis_lddfa_ASI_FL16S,8
 
740
        ldda    [%o0]0xd3,%f4   ! ASI_FL16_S
 
741
        fmovd   %f4,%f0
 
742
        .end
 
743
!
 
744
! double vis_lddfa_ASI_FL8PL(void *rs1)
 
745
!
 
746
        .inline vis_lddfa_ASI_FL8PL,8
 
747
        ldda    [%o0]0xd8,%f4   ! ASI_FL8_PL
 
748
        fmovd   %f4,%f0
 
749
        .end
 
750
!
 
751
! double vis_lddfa_ASI_FL8PL_index(void *rs1, long index)
 
752
!
 
753
        .inline vis_lddfa_ASI_FL8PL_index,16
 
754
        ldda    [%o0+%o1]0xd8,%f4       ! ASI_FL8_PL
 
755
        fmovd   %f4,%f0
 
756
        .end
 
757
!
 
758
! double vis_lddfa_ASI_FL8SL(void *rs1)
 
759
!
 
760
        .inline vis_lddfa_ASI_FL8SL,8
 
761
        ldda    [%o0]0xd9,%f4   ! ASI_FL8_SL
 
762
        fmovd   %f4,%f0
 
763
        .end
 
764
!
 
765
! double vis_lddfa_ASI_FL16PL(void *rs1)
 
766
!
 
767
        .inline vis_lddfa_ASI_FL16PL,8
 
768
        ldda    [%o0]0xda,%f4   ! ASI_FL16_PL
 
769
        fmovd   %f4,%f0
 
770
        .end
 
771
!
 
772
! double vis_lddfa_ASI_FL16PL_index(void *rs1, long index)
 
773
!
 
774
        .inline vis_lddfa_ASI_FL16PL_index,16
 
775
        ldda    [%o0+%o1]0xda,%f4       ! ASI_FL16_PL
 
776
        fmovd   %f4,%f0
 
777
        .end
 
778
!
 
779
! double vis_lddfa_ASI_FL16SL(void *rs1)
 
780
!
 
781
        .inline vis_lddfa_ASI_FL16SL,8
 
782
        ldda    [%o0]0xdb,%f4   ! ASI_FL16_SL
 
783
        fmovd   %f4,%f0
 
784
        .end
 
785
 
 
786
!--------------------------------------------------------------------
 
787
! Graphics status register
 
788
!
 
789
! unsigned int vis_read_gsr(void)
 
790
!
 
791
        .inline vis_read_gsr,0
 
792
        rd      %gsr,%o0
 
793
        .end
 
794
!
 
795
! void vis_write_gsr(unsigned int /* GSR */)
 
796
!
 
797
        .inline vis_write_gsr,4
 
798
        wr      %g0,%o0,%gsr
 
799
        .end
 
800
 
 
801
!--------------------------------------------------------------------
 
802
! Voxel texture mapping
 
803
!
 
804
! unsigned long vis_array8(unsigned long long /*rs1 */, int /*rs2*/)
 
805
!
 
806
        .inline vis_array8,12
 
807
        array8  %o0,%o1,%o0
 
808
        .end
 
809
!
 
810
! unsigned long vis_array16(unsigned long long /*rs1*/, int /*rs2*/)
 
811
!
 
812
        .inline vis_array16,12
 
813
        array16 %o0,%o1,%o0
 
814
        .end
 
815
!
 
816
! unsigned long vis_array32(unsigned long long /*rs1*/, int /*rs2*/)
 
817
!
 
818
        .inline vis_array32,12
 
819
        array32 %o0,%o1,%o0
 
820
        .end
 
821
 
 
822
!--------------------------------------------------------------------
 
823
! Register aliasing and type casts
 
824
!
 
825
! float vis_read_hi(double /* frs1 */);
 
826
!
 
827
        .inline vis_read_hi,8
 
828
        fmovs   %f0,%f0
 
829
        .end
 
830
!
 
831
! float vis_read_lo(double /* frs1 */);
 
832
!
 
833
        .inline vis_read_lo,8
 
834
        fmovs   %f1,%f0         ! %f0 = low word (frs1); return %f0;
 
835
        .end
 
836
!
 
837
! double vis_write_hi(double /* frs1 */, float /* frs2 */);
 
838
!
 
839
        .inline vis_write_hi,12
 
840
        fmovs   %f3,%f0         ! %f3 = float frs2; return %f0:f1;
 
841
        .end
 
842
!
 
843
! double vis_write_lo(double /* frs1 */, float /* frs2 */);
 
844
!
 
845
        .inline vis_write_lo,12
 
846
        fmovs   %f3,%f1         ! %f3 = float frs2; return %f0:f1;
 
847
        .end
 
848
!
 
849
! double vis_freg_pair(float /* frs1 */, float /* frs2 */);
 
850
!
 
851
        .inline vis_freg_pair,8
 
852
        fmovs   %f1,%f0         ! %f1 = float frs1; put in hi;
 
853
        fmovs   %f3,%f1         ! %f3 = float frs2; put in lo; return %f0:f1;
 
854
        .end
 
855
!
 
856
! float vis_to_float(unsigned int /*value*/);
 
857
!
 
858
        .inline vis_to_float,4
 
859
        st      %o0,[%sp+2183]
 
860
        ld      [%sp+2183],%f0
 
861
        .end
 
862
!
 
863
! double vis_to_double(unsigned int /*value1*/, unsigned int /*value2*/);
 
864
!
 
865
        .inline vis_to_double,8
 
866
        st      %o0,[%sp+2183]
 
867
        ld      [%sp+2183],%f0
 
868
        st      %o1,[%sp+2183]
 
869
        ld      [%sp+2183],%f1
 
870
        .end
 
871
!
 
872
! double vis_to_double_dup(unsigned int /*value*/);
 
873
!
 
874
        .inline vis_to_double_dup,4
 
875
        st      %o0,[%sp+2183]
 
876
        ld      [%sp+2183],%f1
 
877
        fmovs   %f1,%f0         ! duplicate value
 
878
        .end
 
879
!
 
880
! double vis_ll_to_double(unsigned long long /*value*/);
 
881
!
 
882
        .inline vis_ll_to_double,8
 
883
        stx     %o0,[%sp+2183]
 
884
        ldd     [%sp+2183],%f0
 
885
        .end
 
886
 
 
887
!--------------------------------------------------------------------
 
888
! Address space identifier (ASI) register
 
889
!
 
890
! unsigned int vis_read_asi(void)
 
891
!
 
892
        .inline vis_read_asi,0
 
893
        rd      %asi,%o0
 
894
        .end
 
895
!
 
896
! void vis_write_asi(unsigned int /* ASI */)
 
897
!
 
898
        .inline vis_write_asi,4
 
899
        wr      %g0,%o0,%asi
 
900
        .end
 
901
 
 
902
!--------------------------------------------------------------------
 
903
! Load/store from/into alternate space
 
904
!
 
905
! float vis_ldfa_ASI_REG(void *rs1)
 
906
!
 
907
        .inline vis_ldfa_ASI_REG,8
 
908
        lda     [%o0+0]%asi,%f4
 
909
        fmovs   %f4,%f0         ! Compiler can clean this up
 
910
        .end
 
911
!
 
912
! float vis_ldfa_ASI_P(void *rs1)
 
913
!
 
914
        .inline vis_ldfa_ASI_P,8
 
915
        lda     [%o0]0x80,%f4   ! ASI_P
 
916
        fmovs   %f4,%f0         ! Compiler can clean this up
 
917
        .end
 
918
!
 
919
! float vis_ldfa_ASI_PL(void *rs1)
 
920
!
 
921
        .inline vis_ldfa_ASI_PL,8
 
922
        lda     [%o0]0x88,%f4   ! ASI_PL
 
923
        fmovs   %f4,%f0         ! Compiler can clean this up
 
924
        .end
 
925
!
 
926
! double vis_lddfa_ASI_REG(void *rs1)
 
927
!
 
928
        .inline vis_lddfa_ASI_REG,8
 
929
        ldda    [%o0+0]%asi,%f4
 
930
        fmovd   %f4,%f0         ! Compiler can clean this up
 
931
        .end
 
932
!
 
933
! double vis_lddfa_ASI_P(void *rs1)
 
934
!
 
935
        .inline vis_lddfa_ASI_P,8
 
936
        ldda    [%o0]0x80,%f4   ! ASI_P
 
937
        fmovd   %f4,%f0         ! Compiler can clean this up
 
938
        .end
 
939
!
 
940
! double vis_lddfa_ASI_PL(void *rs1)
 
941
!
 
942
        .inline vis_lddfa_ASI_PL,8
 
943
        ldda    [%o0]0x88,%f4   ! ASI_PL
 
944
        fmovd   %f4,%f0         ! Compiler can clean this up
 
945
        .end
 
946
!
 
947
! vis_stfa_ASI_REG(float frs, void *rs1)
 
948
!
 
949
        .inline vis_stfa_ASI_REG,12
 
950
        sta     %f1,[%o1+0]%asi
 
951
        .end
 
952
!
 
953
! vis_stfa_ASI_P(float frs, void *rs1)
 
954
!
 
955
        .inline vis_stfa_ASI_P,12
 
956
        sta     %f1,[%o1]0x80   ! ASI_P
 
957
        .end
 
958
!
 
959
! vis_stfa_ASI_PL(float frs, void *rs1)
 
960
!
 
961
        .inline vis_stfa_ASI_PL,12
 
962
        sta     %f1,[%o1]0x88   ! ASI_PL
 
963
        .end
 
964
!
 
965
! vis_stdfa_ASI_REG(double frd, void *rs1)
 
966
!
 
967
        .inline vis_stdfa_ASI_REG,16
 
968
        stda    %f0,[%o1+0]%asi
 
969
        .end
 
970
!
 
971
! vis_stdfa_ASI_P(double frd, void *rs1)
 
972
!
 
973
        .inline vis_stdfa_ASI_P,16
 
974
        stda    %f0,[%o1]0x80   ! ASI_P
 
975
        .end
 
976
!
 
977
! vis_stdfa_ASI_PL(double frd, void *rs1)
 
978
!
 
979
        .inline vis_stdfa_ASI_PL,16
 
980
        stda    %f0,[%o1]0x88   ! ASI_PL
 
981
        .end
 
982
!
 
983
! unsigned short vis_lduha_ASI_REG(void *rs1)
 
984
!
 
985
        .inline vis_lduha_ASI_REG,8
 
986
        lduha   [%o0+0]%asi,%o0
 
987
        .end
 
988
!
 
989
! unsigned short vis_lduha_ASI_P(void *rs1)
 
990
!
 
991
        .inline vis_lduha_ASI_P,8
 
992
        lduha   [%o0]0x80,%o0   ! ASI_P
 
993
        .end
 
994
!
 
995
! unsigned short vis_lduha_ASI_PL(void *rs1)
 
996
!
 
997
        .inline vis_lduha_ASI_PL,8
 
998
        lduha   [%o0]0x88,%o0   ! ASI_PL
 
999
        .end
 
1000
!
 
1001
! unsigned short vis_lduha_ASI_P_index(void *rs1, long index)
 
1002
!
 
1003
        .inline vis_lduha_ASI_P_index,16
 
1004
        lduha   [%o0+%o1]0x80,%o0       ! ASI_P
 
1005
        .end
 
1006
!
 
1007
! unsigned short vis_lduha_ASI_PL_index(void *rs1, long index)
 
1008
!
 
1009
        .inline vis_lduha_ASI_PL_index,16
 
1010
        lduha   [%o0+%o1]0x88,%o0       ! ASI_PL
 
1011
        .end
 
1012
 
 
1013
!--------------------------------------------------------------------
 
1014
! Prefetch
 
1015
!
 
1016
! void vis_prefetch_read(void * /*address*/);
 
1017
!
 
1018
        .inline vis_prefetch_read,8
 
1019
        prefetch        [%o0+0],0
 
1020
        .end
 
1021
!
 
1022
! void vis_prefetch_write(void * /*address*/);
 
1023
!
 
1024
        .inline vis_prefetch_write,8
 
1025
        prefetch        [%o0+0],2
 
1026
        .end