663 lines
23 KiB
Plaintext
663 lines
23 KiB
Plaintext
|
1 .file "color_hsv.c"
|
||
|
2 __SP_H__ = 0x3e
|
||
|
3 __SP_L__ = 0x3d
|
||
|
4 __SREG__ = 0x3f
|
||
|
5 __tmp_reg__ = 0
|
||
|
6 __zero_reg__ = 1
|
||
|
9 .text
|
||
|
10 .Ltext0:
|
||
|
103 .global interpolateLinearly
|
||
|
105 interpolateLinearly:
|
||
|
106 .stabd 46,0,0
|
||
|
1:color_hsv.c **** #include "color_hsv.h"
|
||
|
2:color_hsv.c ****
|
||
|
3:color_hsv.c **** void interpolateLinearly(hsv_t start, hsv_t end, size_t steps, hsv_t *colors) {
|
||
|
108 .LM0:
|
||
|
109 .LFBB1:
|
||
|
110 0000 2F92 push r2
|
||
|
111 0002 3F92 push r3
|
||
|
112 0004 4F92 push r4
|
||
|
113 0006 5F92 push r5
|
||
|
114 0008 6F92 push r6
|
||
|
115 000a 7F92 push r7
|
||
|
116 000c 8F92 push r8
|
||
|
117 000e 9F92 push r9
|
||
|
118 0010 AF92 push r10
|
||
|
119 0012 BF92 push r11
|
||
|
120 0014 CF92 push r12
|
||
|
121 0016 DF92 push r13
|
||
|
122 0018 EF92 push r14
|
||
|
123 001a FF92 push r15
|
||
|
124 001c 0F93 push r16
|
||
|
125 001e 1F93 push r17
|
||
|
126 0020 CF93 push r28
|
||
|
127 0022 DF93 push r29
|
||
|
128 0024 CDB7 in r28,__SP_L__
|
||
|
129 0026 DEB7 in r29,__SP_H__
|
||
|
130 0028 2A97 sbiw r28,10
|
||
|
131 002a 0FB6 in __tmp_reg__,__SREG__
|
||
|
132 002c F894 cli
|
||
|
133 002e DEBF out __SP_H__,r29
|
||
|
134 0030 0FBE out __SREG__,__tmp_reg__
|
||
|
135 0032 CDBF out __SP_L__,r28
|
||
|
136 /* prologue: function */
|
||
|
137 /* frame size = 10 */
|
||
|
138 /* stack size = 28 */
|
||
|
139 .L__stack_usage = 28
|
||
|
140 0034 D82E mov r13,r24
|
||
|
141 0036 C92E mov r12,r25
|
||
|
142 0038 F701 movw r30,r14
|
||
|
4:color_hsv.c **** if( steps == 1 ) {
|
||
|
144 .LM1:
|
||
|
145 003a 0130 cpi r16,1
|
||
|
146 003c 1105 cpc r17,__zero_reg__
|
||
|
147 003e 01F0 breq .L2
|
||
|
148 .LBB2:
|
||
|
149 .LBB3:
|
||
|
5:color_hsv.c **** colors[0] = start;
|
||
|
6:color_hsv.c **** return;
|
||
|
7:color_hsv.c **** }
|
||
|
8:color_hsv.c ****
|
||
|
9:color_hsv.c **** for( size_t i = 0; i < steps; i++ ) {
|
||
|
10:color_hsv.c **** hsv_t tmp;
|
||
|
11:color_hsv.c **** tmp.hue = (uint16_t)((int16_t)start.hue + ((int16_t)end.hue - (int16_t)start.hue) * (int16_t)i /
|
||
|
151 .LM2:
|
||
|
152 0040 3B01 movw r6,r22
|
||
|
153 0042 2901 movw r4,r18
|
||
|
154 0044 461A sub r4,r22
|
||
|
155 0046 570A sbc r5,r23
|
||
|
156 0048 842F mov r24,r20
|
||
|
157 004a 90E0 ldi r25,0
|
||
|
12:color_hsv.c **** tmp.sat = (uint8_t)((int16_t)start.sat + ((int16_t)end.sat - (int16_t)start.sat) * (int16_t)i / (
|
||
|
159 .LM3:
|
||
|
160 004c BC01 movw r22,r24
|
||
|
161 004e 6D19 sub r22,r13
|
||
|
162 0050 7109 sbc r23,__zero_reg__
|
||
|
163 0052 7E83 std Y+6,r23
|
||
|
164 0054 6D83 std Y+5,r22
|
||
|
165 0056 852F mov r24,r21
|
||
|
166 0058 90E0 ldi r25,0
|
||
|
13:color_hsv.c **** tmp.val = (uint8_t)((int16_t)start.val + ((int16_t)end.val - (int16_t)start.val) * (int16_t)i / (
|
||
|
168 .LM4:
|
||
|
169 005a 9C01 movw r18,r24
|
||
|
170 005c 2C19 sub r18,r12
|
||
|
171 005e 3109 sbc r19,__zero_reg__
|
||
|
172 0060 3887 std Y+8,r19
|
||
|
173 0062 2F83 std Y+7,r18
|
||
|
174 0064 3396 adiw r30,3
|
||
|
175 0066 1A86 std Y+10,__zero_reg__
|
||
|
176 0068 1986 std Y+9,__zero_reg__
|
||
|
177 006a E12C mov r14,__zero_reg__
|
||
|
178 006c F12C mov r15,__zero_reg__
|
||
|
179 006e 80E0 ldi r24,0
|
||
|
180 0070 90E0 ldi r25,0
|
||
|
181 0072 20E0 ldi r18,0
|
||
|
182 0074 30E0 ldi r19,0
|
||
|
11:color_hsv.c **** tmp.sat = (uint8_t)((int16_t)start.sat + ((int16_t)end.sat - (int16_t)start.sat) * (int16_t)i / (
|
||
|
184 .LM5:
|
||
|
185 0076 5801 movw r10,r16
|
||
|
186 0078 41E0 ldi r20,1
|
||
|
187 007a A41A sub r10,r20
|
||
|
188 007c B108 sbc r11,__zero_reg__
|
||
|
189 007e 00C0 rjmp .L3
|
||
|
190 .L2:
|
||
|
191 .LBE3:
|
||
|
192 .LBE2:
|
||
|
5:color_hsv.c **** return;
|
||
|
194 .LM6:
|
||
|
195 0080 6083 st Z,r22
|
||
|
196 0082 7183 std Z+1,r23
|
||
|
197 0084 8283 std Z+2,r24
|
||
|
198 0086 9383 std Z+3,r25
|
||
|
6:color_hsv.c **** }
|
||
|
200 .LM7:
|
||
|
201 0088 00C0 rjmp .L1
|
||
|
202 .L3:
|
||
|
203 008a 1C01 movw r2,r24
|
||
|
204 008c 240C add r2,r4
|
||
|
205 008e 351C adc r3,r5
|
||
|
206 0090 4D81 ldd r20,Y+5
|
||
|
207 0092 5E81 ldd r21,Y+6
|
||
|
208 0094 4E0D add r20,r14
|
||
|
209 0096 5F1D adc r21,r15
|
||
|
210 0098 5A83 std Y+2,r21
|
||
|
211 009a 4983 std Y+1,r20
|
||
|
212 009c 4F81 ldd r20,Y+7
|
||
|
213 009e 5885 ldd r21,Y+8
|
||
|
214 00a0 6985 ldd r22,Y+9
|
||
|
215 00a2 7A85 ldd r23,Y+10
|
||
|
216 00a4 460F add r20,r22
|
||
|
217 00a6 571F adc r21,r23
|
||
|
218 00a8 5C83 std Y+4,r21
|
||
|
219 00aa 4B83 std Y+3,r20
|
||
|
220 .LBB5:
|
||
|
9:color_hsv.c **** hsv_t tmp;
|
||
|
222 .LM8:
|
||
|
223 00ac 2017 cp r18,r16
|
||
|
224 00ae 3107 cpc r19,r17
|
||
|
225 00b0 01F0 breq .L1
|
||
|
226 00b2 4F01 movw r8,r30
|
||
|
227 00b4 53E0 ldi r21,3
|
||
|
228 00b6 851A sub r8,r21
|
||
|
229 00b8 9108 sbc r9,__zero_reg__
|
||
|
230 .LBB4:
|
||
|
11:color_hsv.c **** tmp.sat = (uint8_t)((int16_t)start.sat + ((int16_t)end.sat - (int16_t)start.sat) * (int16_t)i / (
|
||
|
232 .LM9:
|
||
|
233 00ba B501 movw r22,r10
|
||
|
234 00bc 0E94 0000 call __divmodhi4
|
||
|
235 00c0 660D add r22,r6
|
||
|
236 00c2 771D adc r23,r7
|
||
|
14:color_hsv.c **** colors[i] = tmp;
|
||
|
238 .LM10:
|
||
|
239 00c4 D401 movw r26,r8
|
||
|
240 00c6 6D93 st X+,r22
|
||
|
241 00c8 7C93 st X,r23
|
||
|
242 00ca 4F01 movw r8,r30
|
||
|
243 00cc B1E0 ldi r27,1
|
||
|
244 00ce 8B1A sub r8,r27
|
||
|
245 00d0 9108 sbc r9,__zero_reg__
|
||
|
12:color_hsv.c **** tmp.val = (uint8_t)((int16_t)start.val + ((int16_t)end.val - (int16_t)start.val) * (int16_t)i / (
|
||
|
247 .LM11:
|
||
|
248 00d2 C701 movw r24,r14
|
||
|
249 00d4 B501 movw r22,r10
|
||
|
250 00d6 0E94 0000 call __divmodhi4
|
||
|
251 00da 6D0D add r22,r13
|
||
|
253 .LM12:
|
||
|
254 00dc D401 movw r26,r8
|
||
|
255 00de 6C93 st X,r22
|
||
|
13:color_hsv.c **** colors[i] = tmp;
|
||
|
257 .LM13:
|
||
|
258 00e0 8985 ldd r24,Y+9
|
||
|
259 00e2 9A85 ldd r25,Y+10
|
||
|
260 00e4 B501 movw r22,r10
|
||
|
261 00e6 0E94 0000 call __divmodhi4
|
||
|
262 00ea 6C0D add r22,r12
|
||
|
264 .LM14:
|
||
|
265 00ec 6083 st Z,r22
|
||
|
266 .LBE4:
|
||
|
9:color_hsv.c **** hsv_t tmp;
|
||
|
268 .LM15:
|
||
|
269 00ee 2F5F subi r18,-1
|
||
|
270 00f0 3F4F sbci r19,-1
|
||
|
271 00f2 3496 adiw r30,4
|
||
|
272 00f4 4B81 ldd r20,Y+3
|
||
|
273 00f6 5C81 ldd r21,Y+4
|
||
|
274 00f8 5A87 std Y+10,r21
|
||
|
275 00fa 4987 std Y+9,r20
|
||
|
276 00fc E980 ldd r14,Y+1
|
||
|
277 00fe FA80 ldd r15,Y+2
|
||
|
278 0100 C101 movw r24,r2
|
||
|
279 0102 00C0 rjmp .L3
|
||
|
280 .L1:
|
||
|
281 /* epilogue start */
|
||
|
282 .LBE5:
|
||
|
15:color_hsv.c **** }
|
||
|
16:color_hsv.c **** }
|
||
|
284 .LM16:
|
||
|
285 0104 2A96 adiw r28,10
|
||
|
286 0106 0FB6 in __tmp_reg__,__SREG__
|
||
|
287 0108 F894 cli
|
||
|
288 010a DEBF out __SP_H__,r29
|
||
|
289 010c 0FBE out __SREG__,__tmp_reg__
|
||
|
290 010e CDBF out __SP_L__,r28
|
||
|
291 0110 DF91 pop r29
|
||
|
292 0112 CF91 pop r28
|
||
|
293 0114 1F91 pop r17
|
||
|
294 0116 0F91 pop r16
|
||
|
295 0118 FF90 pop r15
|
||
|
296 011a EF90 pop r14
|
||
|
297 011c DF90 pop r13
|
||
|
298 011e CF90 pop r12
|
||
|
299 0120 BF90 pop r11
|
||
|
300 0122 AF90 pop r10
|
||
|
301 0124 9F90 pop r9
|
||
|
302 0126 8F90 pop r8
|
||
|
303 0128 7F90 pop r7
|
||
|
304 012a 6F90 pop r6
|
||
|
305 012c 5F90 pop r5
|
||
|
306 012e 4F90 pop r4
|
||
|
307 0130 3F90 pop r3
|
||
|
308 0132 2F90 pop r2
|
||
|
309 0134 0895 ret
|
||
|
317 .Lscope1:
|
||
|
319 .stabd 78,0,0
|
||
|
320 .global __floatunsisf
|
||
|
321 .global __divsf3
|
||
|
322 .global __fixunssfsi
|
||
|
323 .global __floatsisf
|
||
|
324 .global __subsf3
|
||
|
325 .global __mulsf3
|
||
|
328 .global hsv2rgb
|
||
|
330 hsv2rgb:
|
||
|
331 .stabd 46,0,0
|
||
|
17:color_hsv.c ****
|
||
|
18:color_hsv.c **** void hsv2rgbList(hsv_t* hsvList, rgb_t* rgbList, size_t count) {
|
||
|
19:color_hsv.c **** for(size_t i = 0; i < count; ++i) {
|
||
|
20:color_hsv.c **** rgbList[i] = hsv2rgb(&hsvList[i]);
|
||
|
21:color_hsv.c **** }
|
||
|
22:color_hsv.c **** }
|
||
|
23:color_hsv.c ****
|
||
|
24:color_hsv.c **** rgb_t hsv2rgb(hsv_t* hsv) {
|
||
|
333 .LM17:
|
||
|
334 .LFBB2:
|
||
|
335 0136 2F92 push r2
|
||
|
336 0138 3F92 push r3
|
||
|
337 013a 4F92 push r4
|
||
|
338 013c 5F92 push r5
|
||
|
339 013e 6F92 push r6
|
||
|
340 0140 7F92 push r7
|
||
|
341 0142 8F92 push r8
|
||
|
342 0144 9F92 push r9
|
||
|
343 0146 AF92 push r10
|
||
|
344 0148 BF92 push r11
|
||
|
345 014a CF92 push r12
|
||
|
346 014c DF92 push r13
|
||
|
347 014e EF92 push r14
|
||
|
348 0150 FF92 push r15
|
||
|
349 0152 0F93 push r16
|
||
|
350 0154 1F93 push r17
|
||
|
351 0156 CF93 push r28
|
||
|
352 0158 DF93 push r29
|
||
|
353 015a 00D0 rcall .
|
||
|
354 015c 00D0 rcall .
|
||
|
355 015e CDB7 in r28,__SP_L__
|
||
|
356 0160 DEB7 in r29,__SP_H__
|
||
|
357 /* prologue: function */
|
||
|
358 /* frame size = 4 */
|
||
|
359 /* stack size = 22 */
|
||
|
360 .L__stack_usage = 22
|
||
|
25:color_hsv.c **** rgb_t res;
|
||
|
26:color_hsv.c ****
|
||
|
27:color_hsv.c **** if(hsv->sat == 0) {
|
||
|
362 .LM18:
|
||
|
363 0162 FC01 movw r30,r24
|
||
|
364 0164 B280 ldd r11,Z+2
|
||
|
365 0166 3380 ldd r3,Z+3
|
||
|
366 0168 B110 cpse r11,__zero_reg__
|
||
|
367 016a 00C0 rjmp .L8
|
||
|
28:color_hsv.c **** res.r = res.g = res.b = hsv->val;
|
||
|
369 .LM19:
|
||
|
370 016c 232C mov r2,r3
|
||
|
371 016e 3B82 std Y+3,r3
|
||
|
372 0170 3C82 std Y+4,r3
|
||
|
373 0172 00C0 rjmp .L9
|
||
|
374 .L8:
|
||
|
375 0174 FC01 movw r30,r24
|
||
|
376 .LBB6:
|
||
|
29:color_hsv.c **** } else {
|
||
|
30:color_hsv.c **** float hue = (float) (hsv->hue<360?hsv->hue:hsv->hue-360);
|
||
|
378 .LM20:
|
||
|
379 0176 0081 ld r16,Z
|
||
|
380 0178 1181 ldd r17,Z+1
|
||
|
381 017a B801 movw r22,r16
|
||
|
382 017c 0836 cpi r16,104
|
||
|
383 017e F1E0 ldi r31,1
|
||
|
384 0180 1F07 cpc r17,r31
|
||
|
385 0182 00F0 brlo .L20
|
||
|
387 .LM21:
|
||
|
388 0184 6856 subi r22,104
|
||
|
389 0186 7140 sbci r23,1
|
||
|
390 .L20:
|
||
|
391 0188 80E0 ldi r24,0
|
||
|
392 018a 90E0 ldi r25,0
|
||
|
393 018c 0E94 0000 call __floatunsisf
|
||
|
394 0190 2B01 movw r4,r22
|
||
|
395 0192 3C01 movw r6,r24
|
||
|
31:color_hsv.c **** float val = ((float) hsv->val ) / 100.0;
|
||
|
397 .LM22:
|
||
|
398 0194 632D mov r22,r3
|
||
|
399 0196 70E0 ldi r23,0
|
||
|
400 0198 80E0 ldi r24,0
|
||
|
401 019a 90E0 ldi r25,0
|
||
|
402 019c 0E94 0000 call __floatunsisf
|
||
|
403 01a0 20E0 ldi r18,0
|
||
|
404 01a2 30E0 ldi r19,0
|
||
|
405 01a4 48EC ldi r20,lo8(-56)
|
||
|
406 01a6 52E4 ldi r21,lo8(66)
|
||
|
407 01a8 0E94 0000 call __divsf3
|
||
|
408 01ac 6B01 movw r12,r22
|
||
|
409 01ae 7C01 movw r14,r24
|
||
|
32:color_hsv.c **** float sat = ((float) hsv->sat ) / 100.0;
|
||
|
411 .LM23:
|
||
|
412 01b0 6B2D mov r22,r11
|
||
|
413 01b2 70E0 ldi r23,0
|
||
|
414 01b4 80E0 ldi r24,0
|
||
|
415 01b6 90E0 ldi r25,0
|
||
|
416 01b8 0E94 0000 call __floatunsisf
|
||
|
417 01bc 20E0 ldi r18,0
|
||
|
418 01be 30E0 ldi r19,0
|
||
|
419 01c0 48EC ldi r20,lo8(-56)
|
||
|
420 01c2 52E4 ldi r21,lo8(66)
|
||
|
421 01c4 0E94 0000 call __divsf3
|
||
|
422 01c8 4B01 movw r8,r22
|
||
|
423 01ca 5C01 movw r10,r24
|
||
|
33:color_hsv.c ****
|
||
|
34:color_hsv.c **** uint8_t h = hue / 60;
|
||
|
425 .LM24:
|
||
|
426 01cc 20E0 ldi r18,0
|
||
|
427 01ce 30E0 ldi r19,0
|
||
|
428 01d0 40E7 ldi r20,lo8(112)
|
||
|
429 01d2 52E4 ldi r21,lo8(66)
|
||
|
430 01d4 C301 movw r24,r6
|
||
|
431 01d6 B201 movw r22,r4
|
||
|
432 01d8 0E94 0000 call __divsf3
|
||
|
433 01dc 2B01 movw r4,r22
|
||
|
434 01de 3C01 movw r6,r24
|
||
|
435 01e0 0E94 0000 call __fixunssfsi
|
||
|
436 01e4 6A83 std Y+2,r22
|
||
|
35:color_hsv.c **** float f = ( hue / 60 ) - h;
|
||
|
438 .LM25:
|
||
|
439 01e6 70E0 ldi r23,0
|
||
|
440 01e8 80E0 ldi r24,0
|
||
|
441 01ea 90E0 ldi r25,0
|
||
|
442 01ec 0E94 0000 call __floatsisf
|
||
|
443 01f0 9B01 movw r18,r22
|
||
|
444 01f2 AC01 movw r20,r24
|
||
|
445 01f4 C301 movw r24,r6
|
||
|
446 01f6 B201 movw r22,r4
|
||
|
447 01f8 0E94 0000 call __subsf3
|
||
|
448 01fc 2B01 movw r4,r22
|
||
|
449 01fe 3C01 movw r6,r24
|
||
|
36:color_hsv.c ****
|
||
|
37:color_hsv.c **** uint8_t p = RGB_MAX * ( val * ( 1 - sat ));
|
||
|
451 .LM26:
|
||
|
452 0200 A501 movw r20,r10
|
||
|
453 0202 9401 movw r18,r8
|
||
|
454 0204 60E0 ldi r22,0
|
||
|
455 0206 70E0 ldi r23,0
|
||
|
456 0208 80E8 ldi r24,lo8(-128)
|
||
|
457 020a 9FE3 ldi r25,lo8(63)
|
||
|
458 020c 0E94 0000 call __subsf3
|
||
|
459 0210 9B01 movw r18,r22
|
||
|
460 0212 AC01 movw r20,r24
|
||
|
461 0214 C701 movw r24,r14
|
||
|
462 0216 B601 movw r22,r12
|
||
|
463 0218 0E94 0000 call __mulsf3
|
||
|
464 021c 20E0 ldi r18,0
|
||
|
465 021e 30E0 ldi r19,0
|
||
|
466 0220 40E0 ldi r20,0
|
||
|
467 0222 53E4 ldi r21,lo8(67)
|
||
|
468 0224 0E94 0000 call __mulsf3
|
||
|
469 0228 0E94 0000 call __fixunssfsi
|
||
|
470 022c 262E mov r2,r22
|
||
|
38:color_hsv.c **** uint8_t q = RGB_MAX * ( val * ( 1 - sat * f ));
|
||
|
472 .LM27:
|
||
|
473 022e A301 movw r20,r6
|
||
|
474 0230 9201 movw r18,r4
|
||
|
475 0232 C501 movw r24,r10
|
||
|
476 0234 B401 movw r22,r8
|
||
|
477 0236 0E94 0000 call __mulsf3
|
||
|
478 023a 9B01 movw r18,r22
|
||
|
479 023c AC01 movw r20,r24
|
||
|
480 023e 60E0 ldi r22,0
|
||
|
481 0240 70E0 ldi r23,0
|
||
|
482 0242 80E8 ldi r24,lo8(-128)
|
||
|
483 0244 9FE3 ldi r25,lo8(63)
|
||
|
484 0246 0E94 0000 call __subsf3
|
||
|
485 024a 9B01 movw r18,r22
|
||
|
486 024c AC01 movw r20,r24
|
||
|
487 024e C701 movw r24,r14
|
||
|
488 0250 B601 movw r22,r12
|
||
|
489 0252 0E94 0000 call __mulsf3
|
||
|
490 0256 20E0 ldi r18,0
|
||
|
491 0258 30E0 ldi r19,0
|
||
|
492 025a 40E0 ldi r20,0
|
||
|
493 025c 53E4 ldi r21,lo8(67)
|
||
|
494 025e 0E94 0000 call __mulsf3
|
||
|
495 0262 0E94 0000 call __fixunssfsi
|
||
|
496 0266 6983 std Y+1,r22
|
||
|
39:color_hsv.c **** uint8_t t = RGB_MAX * ( val * ( 1 - sat * ( 1 - f )));
|
||
|
498 .LM28:
|
||
|
499 0268 A301 movw r20,r6
|
||
|
500 026a 9201 movw r18,r4
|
||
|
501 026c 60E0 ldi r22,0
|
||
|
502 026e 70E0 ldi r23,0
|
||
|
503 0270 80E8 ldi r24,lo8(-128)
|
||
|
504 0272 9FE3 ldi r25,lo8(63)
|
||
|
505 0274 0E94 0000 call __subsf3
|
||
|
506 0278 9B01 movw r18,r22
|
||
|
507 027a AC01 movw r20,r24
|
||
|
508 027c C501 movw r24,r10
|
||
|
509 027e B401 movw r22,r8
|
||
|
510 0280 0E94 0000 call __mulsf3
|
||
|
511 0284 9B01 movw r18,r22
|
||
|
512 0286 AC01 movw r20,r24
|
||
|
513 0288 60E0 ldi r22,0
|
||
|
514 028a 70E0 ldi r23,0
|
||
|
515 028c 80E8 ldi r24,lo8(-128)
|
||
|
516 028e 9FE3 ldi r25,lo8(63)
|
||
|
517 0290 0E94 0000 call __subsf3
|
||
|
518 0294 9B01 movw r18,r22
|
||
|
519 0296 AC01 movw r20,r24
|
||
|
520 0298 C701 movw r24,r14
|
||
|
521 029a B601 movw r22,r12
|
||
|
522 029c 0E94 0000 call __mulsf3
|
||
|
523 02a0 20E0 ldi r18,0
|
||
|
524 02a2 30E0 ldi r19,0
|
||
|
525 02a4 40E0 ldi r20,0
|
||
|
526 02a6 53E4 ldi r21,lo8(67)
|
||
|
527 02a8 0E94 0000 call __mulsf3
|
||
|
528 02ac 0E94 0000 call __fixunssfsi
|
||
|
40:color_hsv.c ****
|
||
|
41:color_hsv.c **** switch(h) {
|
||
|
530 .LM29:
|
||
|
531 02b0 2A81 ldd r18,Y+2
|
||
|
532 02b2 822F mov r24,r18
|
||
|
533 02b4 90E0 ldi r25,0
|
||
|
534 02b6 8730 cpi r24,7
|
||
|
535 02b8 9105 cpc r25,__zero_reg__
|
||
|
536 02ba 00F4 brsh .L19
|
||
|
538 .LM30:
|
||
|
539 02bc FC01 movw r30,r24
|
||
|
540 02be E050 subi r30,lo8(-(gs(.L13)))
|
||
|
541 02c0 F040 sbci r31,hi8(-(gs(.L13)))
|
||
|
542 02c2 0C94 0000 jmp __tablejump2__
|
||
|
543 .section .progmem.gcc_sw_table,"a",@progbits
|
||
|
544 .p2align 1
|
||
|
545 .L13:
|
||
|
546 0000 0000 .word gs(.L12)
|
||
|
547 0002 0000 .word gs(.L14)
|
||
|
548 0004 0000 .word gs(.L15)
|
||
|
549 0006 0000 .word gs(.L16)
|
||
|
550 0008 0000 .word gs(.L17)
|
||
|
551 000a 0000 .word gs(.L18)
|
||
|
552 000c 0000 .word gs(.L12)
|
||
|
553 .text
|
||
|
554 .L12:
|
||
|
42:color_hsv.c **** case 0:
|
||
|
43:color_hsv.c **** case 6: res.r = hsv->val; res.g = t; res.b = p; break;
|
||
|
556 .LM31:
|
||
|
557 02c6 2B82 std Y+3,r2
|
||
|
558 02c8 6C83 std Y+4,r22
|
||
|
559 02ca 232C mov r2,r3
|
||
|
560 02cc 00C0 rjmp .L9
|
||
|
561 .L14:
|
||
|
44:color_hsv.c **** case 1: res.r = q; res.g = hsv->val; res.b = p; break;
|
||
|
563 .LM32:
|
||
|
564 02ce 2B82 std Y+3,r2
|
||
|
565 02d0 3C82 std Y+4,r3
|
||
|
566 02d2 2980 ldd r2,Y+1
|
||
|
567 02d4 00C0 rjmp .L9
|
||
|
568 .L15:
|
||
|
45:color_hsv.c **** case 2: res.r = p; res.g = hsv->val; res.b = t; break;
|
||
|
570 .LM33:
|
||
|
571 02d6 6B83 std Y+3,r22
|
||
|
572 02d8 3C82 std Y+4,r3
|
||
|
573 02da 00C0 rjmp .L9
|
||
|
574 .L16:
|
||
|
46:color_hsv.c **** case 3: res.r = p; res.g = q; res.b = hsv->val; break;
|
||
|
576 .LM34:
|
||
|
577 02dc 3B82 std Y+3,r3
|
||
|
578 02de 8981 ldd r24,Y+1
|
||
|
579 02e0 8C83 std Y+4,r24
|
||
|
580 02e2 00C0 rjmp .L9
|
||
|
581 .L17:
|
||
|
47:color_hsv.c **** case 4: res.r = t; res.g = p; res.b = hsv->val; break;
|
||
|
583 .LM35:
|
||
|
584 02e4 3B82 std Y+3,r3
|
||
|
585 02e6 2C82 std Y+4,r2
|
||
|
586 02e8 262E mov r2,r22
|
||
|
587 02ea 00C0 rjmp .L9
|
||
|
588 .L18:
|
||
|
48:color_hsv.c **** case 5: res.r = hsv->hue; res.g = p; res.b = q; break;
|
||
|
590 .LM36:
|
||
|
591 02ec E981 ldd r30,Y+1
|
||
|
592 02ee EB83 std Y+3,r30
|
||
|
593 02f0 2C82 std Y+4,r2
|
||
|
594 02f2 202E mov r2,r16
|
||
|
595 02f4 00C0 rjmp .L9
|
||
|
596 .L19:
|
||
|
41:color_hsv.c **** case 0:
|
||
|
598 .LM37:
|
||
|
599 02f6 212C mov r2,__zero_reg__
|
||
|
600 .L9:
|
||
|
601 .LBE6:
|
||
|
49:color_hsv.c ****
|
||
|
50:color_hsv.c **** }
|
||
|
51:color_hsv.c **** }
|
||
|
52:color_hsv.c **** return res;
|
||
|
53:color_hsv.c **** }
|
||
|
603 .LM38:
|
||
|
604 02f8 622D mov r22,r2
|
||
|
605 02fa 7C81 ldd r23,Y+4
|
||
|
606 02fc 8B81 ldd r24,Y+3
|
||
|
607 /* epilogue start */
|
||
|
608 02fe 0F90 pop __tmp_reg__
|
||
|
609 0300 0F90 pop __tmp_reg__
|
||
|
610 0302 0F90 pop __tmp_reg__
|
||
|
611 0304 0F90 pop __tmp_reg__
|
||
|
612 0306 DF91 pop r29
|
||
|
613 0308 CF91 pop r28
|
||
|
614 030a 1F91 pop r17
|
||
|
615 030c 0F91 pop r16
|
||
|
616 030e FF90 pop r15
|
||
|
617 0310 EF90 pop r14
|
||
|
618 0312 DF90 pop r13
|
||
|
619 0314 CF90 pop r12
|
||
|
620 0316 BF90 pop r11
|
||
|
621 0318 AF90 pop r10
|
||
|
622 031a 9F90 pop r9
|
||
|
623 031c 8F90 pop r8
|
||
|
624 031e 7F90 pop r7
|
||
|
625 0320 6F90 pop r6
|
||
|
626 0322 5F90 pop r5
|
||
|
627 0324 4F90 pop r4
|
||
|
628 0326 3F90 pop r3
|
||
|
629 0328 2F90 pop r2
|
||
|
630 032a 0895 ret
|
||
|
635 .Lscope2:
|
||
|
637 .stabd 78,0,0
|
||
|
641 .global hsv2rgbList
|
||
|
643 hsv2rgbList:
|
||
|
644 .stabd 46,0,0
|
||
|
18:color_hsv.c **** for(size_t i = 0; i < count; ++i) {
|
||
|
646 .LM39:
|
||
|
647 .LFBB3:
|
||
|
648 032c CF92 push r12
|
||
|
649 032e DF92 push r13
|
||
|
650 0330 EF92 push r14
|
||
|
651 0332 FF92 push r15
|
||
|
652 0334 0F93 push r16
|
||
|
653 0336 1F93 push r17
|
||
|
654 0338 CF93 push r28
|
||
|
655 033a DF93 push r29
|
||
|
656 /* prologue: function */
|
||
|
657 /* frame size = 0 */
|
||
|
658 /* stack size = 8 */
|
||
|
659 .L__stack_usage = 8
|
||
|
660 033c 6A01 movw r12,r20
|
||
|
661 033e EB01 movw r28,r22
|
||
|
662 0340 7C01 movw r14,r24
|
||
|
663 .LBB7:
|
||
|
19:color_hsv.c **** rgbList[i] = hsv2rgb(&hsvList[i]);
|
||
|
665 .LM40:
|
||
|
666 0342 00E0 ldi r16,0
|
||
|
667 0344 10E0 ldi r17,0
|
||
|
668 .L22:
|
||
|
19:color_hsv.c **** rgbList[i] = hsv2rgb(&hsvList[i]);
|
||
|
670 .LM41:
|
||
|
671 0346 0C15 cp r16,r12
|
||
|
672 0348 1D05 cpc r17,r13
|
||
|
673 034a 01F0 breq .L24
|
||
|
20:color_hsv.c **** }
|
||
|
675 .LM42:
|
||
|
676 034c C701 movw r24,r14
|
||
|
677 034e 0E94 0000 call hsv2rgb
|
||
|
678 0352 6993 st Y+,r22
|
||
|
679 0354 7993 st Y+,r23
|
||
|
680 0356 8993 st Y+,r24
|
||
|
19:color_hsv.c **** rgbList[i] = hsv2rgb(&hsvList[i]);
|
||
|
682 .LM43:
|
||
|
683 0358 0F5F subi r16,-1
|
||
|
684 035a 1F4F sbci r17,-1
|
||
|
685 035c 84E0 ldi r24,4
|
||
|
686 035e E80E add r14,r24
|
||
|
687 0360 F11C adc r15,__zero_reg__
|
||
|
688 0362 00C0 rjmp .L22
|
||
|
689 .L24:
|
||
|
690 /* epilogue start */
|
||
|
691 .LBE7:
|
||
|
22:color_hsv.c ****
|
||
|
693 .LM44:
|
||
|
694 0364 DF91 pop r29
|
||
|
695 0366 CF91 pop r28
|
||
|
696 0368 1F91 pop r17
|
||
|
697 036a 0F91 pop r16
|
||
|
698 036c FF90 pop r15
|
||
|
699 036e EF90 pop r14
|
||
|
700 0370 DF90 pop r13
|
||
|
701 0372 CF90 pop r12
|
||
|
702 0374 0895 ret
|
||
|
707 .Lscope3:
|
||
|
709 .stabd 78,0,0
|
||
|
713 .global init_hsv_t
|
||
|
715 init_hsv_t:
|
||
|
716 .stabd 46,0,0
|
||
|
54:color_hsv.c ****
|
||
|
55:color_hsv.c **** hsv_t init_hsv_t(uint16_t hue, uint8_t sat, uint8_t val) {
|
||
|
718 .LM45:
|
||
|
719 .LFBB4:
|
||
|
720 /* prologue: function */
|
||
|
721 /* frame size = 0 */
|
||
|
722 /* stack size = 0 */
|
||
|
723 .L__stack_usage = 0
|
||
|
724 0376 282F mov r18,r24
|
||
|
725 0378 862F mov r24,r22
|
||
|
56:color_hsv.c **** hsv_t tmp;
|
||
|
57:color_hsv.c **** tmp.hue = hue;
|
||
|
58:color_hsv.c **** tmp.sat = sat;
|
||
|
59:color_hsv.c **** tmp.val = val;
|
||
|
60:color_hsv.c ****
|
||
|
61:color_hsv.c **** return tmp;
|
||
|
62:color_hsv.c **** }
|
||
|
727 .LM46:
|
||
|
728 037a 622F mov r22,r18
|
||
|
729 037c 792F mov r23,r25
|
||
|
730 037e 942F mov r25,r20
|
||
|
731 0380 0895 ret
|
||
|
733 .Lscope4:
|
||
|
735 .stabd 78,0,0
|
||
|
737 .Letext0:
|
||
|
738 .ident "GCC: (GNU) 4.9.2"
|
||
|
DEFINED SYMBOLS
|
||
|
*ABS*:0000000000000000 color_hsv.c
|
||
|
/tmp/cc9SIoOd.s:2 *ABS*:000000000000003e __SP_H__
|
||
|
/tmp/cc9SIoOd.s:3 *ABS*:000000000000003d __SP_L__
|
||
|
/tmp/cc9SIoOd.s:4 *ABS*:000000000000003f __SREG__
|
||
|
/tmp/cc9SIoOd.s:5 *ABS*:0000000000000000 __tmp_reg__
|
||
|
/tmp/cc9SIoOd.s:6 *ABS*:0000000000000001 __zero_reg__
|
||
|
/tmp/cc9SIoOd.s:105 .text:0000000000000000 interpolateLinearly
|
||
|
/tmp/cc9SIoOd.s:330 .text:0000000000000136 hsv2rgb
|
||
|
/tmp/cc9SIoOd.s:643 .text:000000000000032c hsv2rgbList
|
||
|
/tmp/cc9SIoOd.s:715 .text:0000000000000376 init_hsv_t
|
||
|
|
||
|
UNDEFINED SYMBOLS
|
||
|
__divmodhi4
|
||
|
__floatunsisf
|
||
|
__divsf3
|
||
|
__fixunssfsi
|
||
|
__floatsisf
|
||
|
__subsf3
|
||
|
__mulsf3
|
||
|
__tablejump2__
|