Mercurial > libavcodec.hg
annotate alpha/dsputil_alpha_asm.S @ 510:ccd90a9cc09b libavcodec
Add profiling support.
author | mellum |
---|---|
date | Mon, 01 Jul 2002 23:02:36 +0000 |
parents | cab79946302f |
children | fa4425cf6b31 |
rev | line source |
---|---|
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
1 /* |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
2 * Alpha optimized DSP utils |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
3 * Copyright (c) 2002 Falk Hueffner <falk@debian.org> |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
4 * |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
5 * This program is free software; you can redistribute it and/or modify |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
6 * it under the terms of the GNU General Public License as published by |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
7 * the Free Software Foundation; either version 2 of the License, or |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
8 * (at your option) any later version. |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
9 * |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
10 * This program is distributed in the hope that it will be useful, |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
13 * GNU General Public License for more details. |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
14 * |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
16 * along with this program; if not, write to the Free Software |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
18 */ |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
19 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
20 /* |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
21 * These functions are scheduled for pca56. They should work |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
22 * reasonably on ev6, though. |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
23 */ |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
24 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
25 #include "regdef.h" |
510 | 26 #ifdef HAVE_AV_CONFIG_H |
27 #include "config.h" | |
28 #endif | |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
29 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
30 /* Some nicer register names. */ |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
31 #define ta t10 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
32 #define tb t11 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
33 #define tc t12 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
34 #define td AT |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
35 /* Danger: these overlap with the argument list and the return value */ |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
36 #define te a5 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
37 #define tf a4 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
38 #define tg a3 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
39 #define th v0 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
40 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
41 .set noat |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
42 .set noreorder |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
43 .arch pca56 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
44 .text |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
45 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
46 /************************************************************************ |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
47 * void put_pixels_clamped_mvi_asm(const DCTELEM *block, uint8_t *pixels, |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
48 * int line_size) |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
49 */ |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
50 .align 6 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
51 .globl put_pixels_clamped_mvi_asm |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
52 .ent put_pixels_clamped_mvi_asm |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
53 put_pixels_clamped_mvi_asm: |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
54 .frame sp, 0, ra |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
55 .prologue 0 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
56 |
510 | 57 #ifdef HAVE_GPROF |
58 lda AT, _mcount | |
59 jsr AT, (AT), _mcount | |
60 #endif | |
61 | |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
62 lda t8, -1 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
63 lda t9, 8 # loop counter |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
64 zap t8, 0xaa, t8 # 00ff00ff00ff00ff |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
65 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
66 .align 4 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
67 1: ldq t0, 0(a0) |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
68 ldq t1, 8(a0) |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
69 ldq t2, 16(a0) |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
70 ldq t3, 24(a0) |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
71 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
72 maxsw4 t0, zero, t0 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
73 subq t9, 2, t9 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
74 maxsw4 t1, zero, t1 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
75 lda a0, 32(a0) |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
76 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
77 maxsw4 t2, zero, t2 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
78 addq a1, a2, ta |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
79 maxsw4 t3, zero, t3 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
80 minsw4 t0, t8, t0 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
81 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
82 minsw4 t1, t8, t1 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
83 minsw4 t2, t8, t2 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
84 minsw4 t3, t8, t3 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
85 pkwb t0, t0 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
86 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
87 pkwb t1, t1 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
88 pkwb t2, t2 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
89 pkwb t3, t3 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
90 stl t0, 0(a1) |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
91 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
92 stl t1, 4(a1) |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
93 addq ta, a2, a1 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
94 stl t2, 0(ta) |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
95 stl t3, 4(ta) |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
96 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
97 bne t9, 1b |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
98 ret |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
99 .end put_pixels_clamped_mvi_asm |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
100 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
101 /************************************************************************ |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
102 * void add_pixels_clamped_mvi_asm(const DCTELEM *block, uint8_t *pixels, |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
103 * int line_size) |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
104 */ |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
105 .align 6 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
106 .globl add_pixels_clamped_mvi_asm |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
107 .ent add_pixels_clamped_mvi_asm |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
108 add_pixels_clamped_mvi_asm: |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
109 .frame sp, 0, ra |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
110 .prologue 0 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
111 |
510 | 112 #ifdef HAVE_GPROF |
113 lda AT, _mcount | |
114 jsr AT, (AT), _mcount | |
115 #endif | |
116 | |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
117 lda t1, -1 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
118 lda th, 8 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
119 zap t1, 0x33, tg |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
120 nop |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
121 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
122 srl tg, 1, t0 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
123 xor tg, t0, tg # 0x8000800080008000 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
124 zap t1, 0xaa, tf # 0x00ff00ff00ff00ff |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
125 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
126 .align 4 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
127 1: ldl t1, 0(a1) # pix0 (try to hit cache line soon) |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
128 ldl t4, 4(a1) # pix1 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
129 addq a1, a2, te # pixels += line_size |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
130 ldq t0, 0(a0) # shorts0 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
131 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
132 ldl t7, 0(te) # pix2 (try to hit cache line soon) |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
133 ldl ta, 4(te) # pix3 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
134 ldq t3, 8(a0) # shorts1 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
135 ldq t6, 16(a0) # shorts2 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
136 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
137 ldq t9, 24(a0) # shorts3 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
138 unpkbw t1, t1 # 0 0 (quarter/op no.) |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
139 and t0, tg, t2 # 0 1 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
140 unpkbw t4, t4 # 1 0 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
141 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
142 bic t0, tg, t0 # 0 2 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
143 unpkbw t7, t7 # 2 0 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
144 and t3, tg, t5 # 1 1 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
145 addq t0, t1, t0 # 0 3 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
146 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
147 xor t0, t2, t0 # 0 4 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
148 unpkbw ta, ta # 3 0 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
149 and t6, tg, t8 # 2 1 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
150 maxsw4 t0, zero, t0 # 0 5 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
151 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
152 bic t3, tg, t3 # 1 2 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
153 bic t6, tg, t6 # 2 2 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
154 minsw4 t0, tf, t0 # 0 6 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
155 addq t3, t4, t3 # 1 3 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
156 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
157 pkwb t0, t0 # 0 7 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
158 xor t3, t5, t3 # 1 4 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
159 maxsw4 t3, zero, t3 # 1 5 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
160 addq t6, t7, t6 # 2 3 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
161 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
162 xor t6, t8, t6 # 2 4 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
163 and t9, tg, tb # 3 1 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
164 minsw4 t3, tf, t3 # 1 6 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
165 bic t9, tg, t9 # 3 2 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
166 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
167 maxsw4 t6, zero, t6 # 2 5 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
168 addq t9, ta, t9 # 3 3 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
169 stl t0, 0(a1) # 0 8 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
170 minsw4 t6, tf, t6 # 2 6 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
171 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
172 xor t9, tb, t9 # 3 4 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
173 maxsw4 t9, zero, t9 # 3 5 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
174 lda a0, 32(a0) # block += 16; |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
175 pkwb t3, t3 # 1 7 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
176 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
177 minsw4 t9, tf, t9 # 3 6 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
178 subq th, 2, th |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
179 pkwb t6, t6 # 2 7 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
180 pkwb t9, t9 # 3 7 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
181 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
182 stl t3, 4(a1) # 1 8 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
183 addq te, a2, a1 # pixels += line_size |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
184 stl t6, 0(te) # 2 8 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
185 stl t9, 4(te) # 3 8 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
186 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
187 bne th, 1b |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
188 ret |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
189 .end add_pixels_clamped_mvi_asm |