Revision 00c5727d libavcodec/arm/dsputil_arm_s.S

View differences:

libavcodec/arm/dsputil_arm_s.S
90 90
        add \Rd1, \Rn1, \Rd1, lsr #1
91 91
.endm
92 92

  
93
.macro  JMP_ALIGN tmp, reg, label1, label2, label3
94
        ands \tmp, \reg, #3
95
        bic  \reg, \reg, #3
96
        beq  1f
97
        subs \tmp, \tmp, #1
98
        beq  2f
99
        subs \tmp, \tmp, #1
100
        beq  3f
101
        b    4f
102
.endm
103

  
93 104
@ ----------------------------------------------------------------
94 105
        .align 5
95 106
function put_pixels16_arm, export=1
......
97 108
        @ block = word aligned, pixles = unaligned
98 109
        pld [r1]
99 110
        stmfd sp!, {r4-r11, lr} @ R14 is also called LR
100
        adr r5, 5f
101
        ands r4, r1, #3
102
        bic r1, r1, #3
103
        add r5, r5, r4, lsl #2
104
        ldrne pc, [r5]
111
        JMP_ALIGN r5, r1, 2f, 3f, 4f
105 112
1:
106 113
        ldmia r1, {r4-r7}
107 114
        add r1, r1, r2
......
144 151
        add r0, r0, r2
145 152
        bne 4b
146 153
        ldmfd sp!, {r4-r11,pc}
147
5:
148
        .word 1b
149
        .word 2b
150
        .word 3b
151
        .word 4b
152 154
        .endfunc
153 155

  
154 156
@ ----------------------------------------------------------------
......
158 160
        @ block = word aligned, pixles = unaligned
159 161
        pld [r1]
160 162
        stmfd sp!, {r4-r5,lr} @ R14 is also called LR
161
        adr r5, 5f
162
        ands r4, r1, #3
163
        bic r1, r1, #3
164
        add r5, r5, r4, lsl #2
165
        ldrne pc, [r5]
163
        JMP_ALIGN r5, r1, 2f, 3f, 4f
166 164
1:
167 165
        ldmia r1, {r4-r5}
168 166
        add r1, r1, r2
......
205 203
        add r0, r0, r2
206 204
        bne 4b
207 205
        ldmfd sp!, {r4-r5,pc}
208
5:
209
        .word 1b
210
        .word 2b
211
        .word 3b
212
        .word 4b
213 206
        .endfunc
214 207

  
215 208
@ ----------------------------------------------------------------
......
219 212
        @ block = word aligned, pixles = unaligned
220 213
        pld [r1]
221 214
        stmfd sp!, {r4-r10,lr} @ R14 is also called LR
222
        adr r5, 5f
223
        ands r4, r1, #3
224 215
        ldr r12, =0xfefefefe
225
        add r5, r5, r4, lsl #2
226
        bic r1, r1, #3
227
        ldrne pc, [r5]
216
        JMP_ALIGN r5, r1, 2f, 3f, 4f
228 217
1:
229 218
        ldmia r1, {r4-r5, r10}
230 219
        add r1, r1, r2
......
274 263
        add r0, r0, r2
275 264
        bne 4b
276 265
        ldmfd sp!, {r4-r10,pc} @@ update PC with LR content.
277
5:
278
        .word 1b
279
        .word 2b
280
        .word 3b
281
        .word 4b
282 266
        .endfunc
283 267

  
284 268
        .align 5
......
287 271
        @ block = word aligned, pixles = unaligned
288 272
        pld [r1]
289 273
        stmfd sp!, {r4-r10,lr} @ R14 is also called LR
290
        adr r5, 5f
291
        ands r4, r1, #3
292 274
        ldr r12, =0xfefefefe
293
        add r5, r5, r4, lsl #2
294
        bic r1, r1, #3
295
        ldrne pc, [r5]
275
        JMP_ALIGN r5, r1, 2f, 3f, 4f
296 276
1:
297 277
        ldmia r1, {r4-r5, r10}
298 278
        add r1, r1, r2
......
342 322
        add r0, r0, r2
343 323
        bne 4b
344 324
        ldmfd sp!, {r4-r10,pc} @@ update PC with LR content.
345
5:
346
        .word 1b
347
        .word 2b
348
        .word 3b
349
        .word 4b
350 325
        .endfunc
351 326

  
352 327

  
......
357 332
        @ block = word aligned, pixles = unaligned
358 333
        pld [r1]
359 334
        stmfd sp!, {r4-r11,lr} @ R14 is also called LR
360
        adr r5, 5f
361
        ands r4, r1, #3
362 335
        mov r3, r3, lsr #1
363 336
        ldr r12, =0xfefefefe
364
        add r5, r5, r4, lsl #2
365
        bic r1, r1, #3
366
        ldrne pc, [r5]
337
        JMP_ALIGN r5, r1, 2f, 3f, 4f
367 338
1:
368 339
        ldmia r1, {r4-r5}
369 340
        add r1, r1, r2
......
451 422
        add r0, r0, r2
452 423
        bne 6b
453 424
        ldmfd sp!, {r4-r11,pc}
454

  
455
5:
456
        .word 1b
457
        .word 2b
458
        .word 3b
459
        .word 4b
460 425
        .endfunc
461 426

  
462 427
        .align 5
......
465 430
        @ block = word aligned, pixles = unaligned
466 431
        pld [r1]
467 432
        stmfd sp!, {r4-r11,lr} @ R14 is also called LR
468
        adr r5, 5f
469
        ands r4, r1, #3
470 433
        mov r3, r3, lsr #1
471 434
        ldr r12, =0xfefefefe
472
        add r5, r5, r4, lsl #2
473
        bic r1, r1, #3
474
        ldrne pc, [r5]
435
        JMP_ALIGN r5, r1, 2f, 3f, 4f
475 436
1:
476 437
        ldmia r1, {r4-r5}
477 438
        add r1, r1, r2
......
559 520
        add r0, r0, r2
560 521
        bne 6b
561 522
        ldmfd sp!, {r4-r11,pc}
562
5:
563
        .word 1b
564
        .word 2b
565
        .word 3b
566
        .word 4b
567 523
        .endfunc
568 524

  
569 525
        .ltorg
......
639 595
        @ block = word aligned, pixles = unaligned
640 596
        pld [r1]
641 597
        stmfd sp!, {r4-r11,lr} @ R14 is also called LR
642
        adrl r12, 5f
643
        ands r4, r1, #3
644
        add r5, r12, r4, lsl #2
645
        bic r1, r1, #3
646
        ldrne pc, [r5]
598
        JMP_ALIGN r5, r1, 2f, 3f, 4f
647 599
1:
648 600
        RND_XY2_EXPAND 0, lsl
649 601

  
......
658 610
        .align 5
659 611
4:
660 612
        RND_XY2_EXPAND 3, lsl
661
5:
662
        .word 1b
663
        .word 2b
664
        .word 3b
665
        .word 4b
666 613
        .endfunc
667 614

  
668 615
        .align 5
......
671 618
        @ block = word aligned, pixles = unaligned
672 619
        pld [r1]
673 620
        stmfd sp!, {r4-r11,lr} @ R14 is also called LR
674
        adrl r12, 5f
675
        ands r4, r1, #3
676
        add r5, r12, r4, lsl #2
677
        bic r1, r1, #3
678
        ldrne pc, [r5]
621
        JMP_ALIGN r5, r1, 2f, 3f, 4f
679 622
1:
680 623
        RND_XY2_EXPAND 0, lsr
681 624

  
......
690 633
        .align 5
691 634
4:
692 635
        RND_XY2_EXPAND 3, lsr
693
5:
694
        .word 1b
695
        .word 2b
696
        .word 3b
697
        .word 4b
698 636
        .endfunc
699 637

  
700 638
        .align 5

Also available in: Unified diff