Commit c130bedc authored by Måns Rullgård's avatar Måns Rullgård

ARM: use new macros for assembler function labels

Originally committed as revision 15725 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent c72ab301
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
@ @
#include "config.h" #include "config.h"
#include "asm.S"
#ifndef HAVE_PLD #ifndef HAVE_PLD
.macro pld reg .macro pld reg
...@@ -79,8 +80,7 @@ ...@@ -79,8 +80,7 @@
@ ---------------------------------------------------------------- @ ----------------------------------------------------------------
.align 8 .align 8
.global put_pixels16_arm function put_pixels16_arm, export=1
put_pixels16_arm:
@ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h) @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
@ block = word aligned, pixles = unaligned @ block = word aligned, pixles = unaligned
pld [r1] pld [r1]
...@@ -138,11 +138,11 @@ put_pixels16_arm: ...@@ -138,11 +138,11 @@ put_pixels16_arm:
.word 2b .word 2b
.word 3b .word 3b
.word 4b .word 4b
.endfunc
@ ---------------------------------------------------------------- @ ----------------------------------------------------------------
.align 8 .align 8
.global put_pixels8_arm function put_pixels8_arm, export=1
put_pixels8_arm:
@ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h) @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
@ block = word aligned, pixles = unaligned @ block = word aligned, pixles = unaligned
pld [r1] pld [r1]
...@@ -200,11 +200,11 @@ put_pixels8_arm: ...@@ -200,11 +200,11 @@ put_pixels8_arm:
.word 2b .word 2b
.word 3b .word 3b
.word 4b .word 4b
.endfunc
@ ---------------------------------------------------------------- @ ----------------------------------------------------------------
.align 8 .align 8
.global put_pixels8_x2_arm function put_pixels8_x2_arm, export=1
put_pixels8_x2_arm:
@ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h) @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
@ block = word aligned, pixles = unaligned @ block = word aligned, pixles = unaligned
pld [r1] pld [r1]
...@@ -270,10 +270,10 @@ put_pixels8_x2_arm: ...@@ -270,10 +270,10 @@ put_pixels8_x2_arm:
.word 2b .word 2b
.word 3b .word 3b
.word 4b .word 4b
.endfunc
.align 8 .align 8
.global put_no_rnd_pixels8_x2_arm function put_no_rnd_pixels8_x2_arm, export=1
put_no_rnd_pixels8_x2_arm:
@ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h) @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
@ block = word aligned, pixles = unaligned @ block = word aligned, pixles = unaligned
pld [r1] pld [r1]
...@@ -339,12 +339,12 @@ put_no_rnd_pixels8_x2_arm: ...@@ -339,12 +339,12 @@ put_no_rnd_pixels8_x2_arm:
.word 2b .word 2b
.word 3b .word 3b
.word 4b .word 4b
.endfunc
@ ---------------------------------------------------------------- @ ----------------------------------------------------------------
.align 8 .align 8
.global put_pixels8_y2_arm function put_pixels8_y2_arm, export=1
put_pixels8_y2_arm:
@ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h) @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
@ block = word aligned, pixles = unaligned @ block = word aligned, pixles = unaligned
pld [r1] pld [r1]
...@@ -450,10 +450,10 @@ put_pixels8_y2_arm: ...@@ -450,10 +450,10 @@ put_pixels8_y2_arm:
.word 2b .word 2b
.word 3b .word 3b
.word 4b .word 4b
.endfunc
.align 8 .align 8
.global put_no_rnd_pixels8_y2_arm function put_no_rnd_pixels8_y2_arm, export=1
put_no_rnd_pixels8_y2_arm:
@ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h) @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
@ block = word aligned, pixles = unaligned @ block = word aligned, pixles = unaligned
pld [r1] pld [r1]
...@@ -558,6 +558,7 @@ put_no_rnd_pixels8_y2_arm: ...@@ -558,6 +558,7 @@ put_no_rnd_pixels8_y2_arm:
.word 2b .word 2b
.word 3b .word 3b
.word 4b .word 4b
.endfunc
@ ---------------------------------------------------------------- @ ----------------------------------------------------------------
.macro RND_XY2_IT align .macro RND_XY2_IT align
...@@ -625,8 +626,7 @@ put_no_rnd_pixels8_y2_arm: ...@@ -625,8 +626,7 @@ put_no_rnd_pixels8_y2_arm:
.endm .endm
.align 8 .align 8
.global put_pixels8_xy2_arm function put_pixels8_xy2_arm, export=1
put_pixels8_xy2_arm:
@ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h) @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
@ block = word aligned, pixles = unaligned @ block = word aligned, pixles = unaligned
pld [r1] pld [r1]
...@@ -659,10 +659,10 @@ put_pixels8_xy2_arm: ...@@ -659,10 +659,10 @@ put_pixels8_xy2_arm:
.word 0x02020202 .word 0x02020202
.word 0xFCFCFCFC >> 2 .word 0xFCFCFCFC >> 2
.word 0x0F0F0F0F .word 0x0F0F0F0F
.endfunc
.align 8 .align 8
.global put_no_rnd_pixels8_xy2_arm function put_no_rnd_pixels8_xy2_arm, export=1
put_no_rnd_pixels8_xy2_arm:
@ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h) @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
@ block = word aligned, pixles = unaligned @ block = word aligned, pixles = unaligned
pld [r1] pld [r1]
...@@ -695,3 +695,4 @@ put_no_rnd_pixels8_xy2_arm: ...@@ -695,3 +695,4 @@ put_no_rnd_pixels8_xy2_arm:
.word 0x01010101 .word 0x01010101
.word 0xFCFCFCFC >> 2 .word 0xFCFCFCFC >> 2
.word 0x0F0F0F0F .word 0x0F0F0F0F
.endfunc
...@@ -24,6 +24,9 @@ ...@@ -24,6 +24,9 @@
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include "asm.S"
#define FIX_0_298631336 2446 #define FIX_0_298631336 2446
#define FIX_0_541196100 4433 #define FIX_0_541196100 4433
#define FIX_0_765366865 6270 #define FIX_0_765366865 6270
...@@ -54,8 +57,7 @@ ...@@ -54,8 +57,7 @@
.text .text
.align .align
.global j_rev_dct_ARM function j_rev_dct_ARM, export=1
j_rev_dct_ARM:
stmdb sp!, { r4 - r12, lr } @ all callee saved regs stmdb sp!, { r4 - r12, lr } @ all callee saved regs
sub sp, sp, #4 @ reserve some space on the stack sub sp, sp, #4 @ reserve some space on the stack
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#include "asm.S"
/* useful constants for the algorithm, they are save in __constant_ptr__ at */ /* useful constants for the algorithm, they are save in __constant_ptr__ at */
/* the end of the source code.*/ /* the end of the source code.*/
#define W1 22725 #define W1 22725
...@@ -53,10 +55,8 @@ ...@@ -53,10 +55,8 @@
.text .text
.align
.global simple_idct_ARM
simple_idct_ARM: function simple_idct_ARM, export=1
@@ void simple_idct_ARM(int16_t *block) @@ void simple_idct_ARM(int16_t *block)
@@ save stack for reg needed (take all of them), @@ save stack for reg needed (take all of them),
@@ R0-R3 are scratch regs, so no need to save them, but R0 contains the pointer to block @@ R0-R3 are scratch regs, so no need to save them, but R0 contains the pointer to block
......
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#include "asm.S"
#define W1 22725 /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */ #define W1 22725 /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */
#define W2 21407 /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */ #define W2 21407 /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */
#define W3 19266 /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */ #define W3 19266 /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */
...@@ -41,10 +43,7 @@ w13: .long W13 ...@@ -41,10 +43,7 @@ w13: .long W13
w26: .long W26 w26: .long W26
w57: .long W57 w57: .long W57
.align function idct_row_armv5te
.type idct_row_armv5te, %function
.func idct_row_armv5te
idct_row_armv5te:
str lr, [sp, #-4]! str lr, [sp, #-4]!
ldrd v1, [a1, #8] ldrd v1, [a1, #8]
...@@ -262,10 +261,7 @@ row_dc_only: ...@@ -262,10 +261,7 @@ row_dc_only:
sub fp, fp, a4 sub fp, fp, a4
.endm .endm
.align function idct_col_armv5te
.type idct_col_armv5te, %function
.func idct_col_armv5te
idct_col_armv5te:
str lr, [sp, #-4]! str lr, [sp, #-4]!
idct_col idct_col
...@@ -337,10 +333,7 @@ idct_col_armv5te: ...@@ -337,10 +333,7 @@ idct_col_armv5te:
ldr pc, [sp], #4 ldr pc, [sp], #4
.endfunc .endfunc
.align function idct_col_put_armv5te
.type idct_col_put_armv5te, %function
.func idct_col_put_armv5te
idct_col_put_armv5te:
str lr, [sp, #-4]! str lr, [sp, #-4]!
idct_col idct_col
...@@ -457,10 +450,7 @@ idct_col_put_armv5te: ...@@ -457,10 +450,7 @@ idct_col_put_armv5te:
ldr pc, [sp], #4 ldr pc, [sp], #4
.endfunc .endfunc
.align function idct_col_add_armv5te
.type idct_col_add_armv5te, %function
.func idct_col_add_armv5te
idct_col_add_armv5te:
str lr, [sp, #-4]! str lr, [sp, #-4]!
idct_col idct_col
...@@ -610,11 +600,7 @@ idct_col_add_armv5te: ...@@ -610,11 +600,7 @@ idct_col_add_armv5te:
ldr pc, [sp], #4 ldr pc, [sp], #4
.endfunc .endfunc
.align function simple_idct_armv5te, export=1
.global simple_idct_armv5te
.type simple_idct_armv5te, %function
.func simple_idct_armv5te
simple_idct_armv5te:
stmfd sp!, {v1, v2, v3, v4, v5, v6, v7, fp, lr} stmfd sp!, {v1, v2, v3, v4, v5, v6, v7, fp, lr}
bl idct_row_armv5te bl idct_row_armv5te
...@@ -646,11 +632,7 @@ simple_idct_armv5te: ...@@ -646,11 +632,7 @@ simple_idct_armv5te:
ldmfd sp!, {v1, v2, v3, v4, v5, v6, v7, fp, pc} ldmfd sp!, {v1, v2, v3, v4, v5, v6, v7, fp, pc}
.endfunc .endfunc
.align function simple_idct_add_armv5te, export=1
.global simple_idct_add_armv5te
.type simple_idct_add_armv5te, %function
.func simple_idct_add_armv5te
simple_idct_add_armv5te:
stmfd sp!, {a1, a2, v1, v2, v3, v4, v5, v6, v7, fp, lr} stmfd sp!, {a1, a2, v1, v2, v3, v4, v5, v6, v7, fp, lr}
mov a1, a3 mov a1, a3
...@@ -685,11 +667,7 @@ simple_idct_add_armv5te: ...@@ -685,11 +667,7 @@ simple_idct_add_armv5te:
ldmfd sp!, {v1, v2, v3, v4, v5, v6, v7, fp, pc} ldmfd sp!, {v1, v2, v3, v4, v5, v6, v7, fp, pc}
.endfunc .endfunc
.align function simple_idct_put_armv5te, export=1
.global simple_idct_put_armv5te
.type simple_idct_put_armv5te, %function
.func simple_idct_put_armv5te
simple_idct_put_armv5te:
stmfd sp!, {a1, a2, v1, v2, v3, v4, v5, v6, v7, fp, lr} stmfd sp!, {a1, a2, v1, v2, v3, v4, v5, v6, v7, fp, lr}
mov a1, a3 mov a1, a3
......
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#include "asm.S"
#define W1 22725 /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */ #define W1 22725 /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */
#define W2 21407 /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */ #define W2 21407 /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */
#define W3 19266 /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */ #define W3 19266 /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */
...@@ -190,10 +192,7 @@ w57: .long W57 ...@@ -190,10 +192,7 @@ w57: .long W57
a1 = source a1 = source
a2 = dest a2 = dest
*/ */
.align function idct_row_armv6
.type idct_row_armv6, %function
.func idct_row_armv6
idct_row_armv6:
str lr, [sp, #-4]! str lr, [sp, #-4]!
ldr lr, [a1, #12] /* lr = row[7,5] */ ldr lr, [a1, #12] /* lr = row[7,5] */
...@@ -245,10 +244,7 @@ idct_row_armv6: ...@@ -245,10 +244,7 @@ idct_row_armv6:
a1 = source a1 = source
a2 = dest a2 = dest
*/ */
.align function idct_col_armv6
.type idct_col_armv6, %function
.func idct_col_armv6
idct_col_armv6:
stmfd sp!, {a2, lr} stmfd sp!, {a2, lr}
ldr a3, [a1] /* a3 = row[2,0] */ ldr a3, [a1] /* a3 = row[2,0] */
...@@ -276,10 +272,7 @@ idct_col_armv6: ...@@ -276,10 +272,7 @@ idct_col_armv6:
a2 = dest a2 = dest
a3 = line size a3 = line size
*/ */
.align function idct_col_put_armv6
.type idct_col_put_armv6, %function
.func idct_col_put_armv6
idct_col_put_armv6:
stmfd sp!, {a2, a3, lr} stmfd sp!, {a2, a3, lr}
ldr a3, [a1] /* a3 = row[2,0] */ ldr a3, [a1] /* a3 = row[2,0] */
...@@ -309,10 +302,7 @@ idct_col_put_armv6: ...@@ -309,10 +302,7 @@ idct_col_put_armv6:
a2 = dest a2 = dest
a3 = line size a3 = line size
*/ */
.align function idct_col_add_armv6
.type idct_col_add_armv6, %function
.func idct_col_add_armv6
idct_col_add_armv6:
stmfd sp!, {a2, a3, lr} stmfd sp!, {a2, a3, lr}
ldr a3, [a1] /* a3 = row[2,0] */ ldr a3, [a1] /* a3 = row[2,0] */
...@@ -393,12 +383,8 @@ idct_col_add_armv6: ...@@ -393,12 +383,8 @@ idct_col_add_armv6:
sub a1, a1, #(16*7) sub a1, a1, #(16*7)
.endm .endm
.align
.global ff_simple_idct_armv6
.type ff_simple_idct_armv6, %function
.func ff_simple_idct_armv6
/* void ff_simple_idct_armv6(DCTELEM *data); */ /* void ff_simple_idct_armv6(DCTELEM *data); */
ff_simple_idct_armv6: function ff_simple_idct_armv6, export=1
stmfd sp!, {v1, v2, v3, v4, v5, v6, v7, fp, lr} stmfd sp!, {v1, v2, v3, v4, v5, v6, v7, fp, lr}
sub sp, sp, #128 sub sp, sp, #128
...@@ -412,12 +398,8 @@ ff_simple_idct_armv6: ...@@ -412,12 +398,8 @@ ff_simple_idct_armv6:
ldmfd sp!, {v1, v2, v3, v4, v5, v6, v7, fp, pc} ldmfd sp!, {v1, v2, v3, v4, v5, v6, v7, fp, pc}
.endfunc .endfunc
.align
.global ff_simple_idct_add_armv6
.type ff_simple_idct_add_armv6, %function
.func ff_simple_idct_add_armv6
/* ff_simple_idct_add_armv6(uint8_t *dest, int line_size, DCTELEM *data); */ /* ff_simple_idct_add_armv6(uint8_t *dest, int line_size, DCTELEM *data); */
ff_simple_idct_add_armv6: function ff_simple_idct_add_armv6, export=1
stmfd sp!, {a1, a2, v1, v2, v3, v4, v5, v6, v7, fp, lr} stmfd sp!, {a1, a2, v1, v2, v3, v4, v5, v6, v7, fp, lr}
sub sp, sp, #128 sub sp, sp, #128
...@@ -433,12 +415,8 @@ ff_simple_idct_add_armv6: ...@@ -433,12 +415,8 @@ ff_simple_idct_add_armv6:
ldmfd sp!, {v1, v2, v3, v4, v5, v6, v7, fp, pc} ldmfd sp!, {v1, v2, v3, v4, v5, v6, v7, fp, pc}
.endfunc .endfunc
.align
.global ff_simple_idct_put_armv6
.type ff_simple_idct_put_armv6, %function
.func ff_simple_idct_put_armv6
/* ff_simple_idct_put_armv6(uint8_t *dest, int line_size, DCTELEM *data); */ /* ff_simple_idct_put_armv6(uint8_t *dest, int line_size, DCTELEM *data); */
ff_simple_idct_put_armv6: function ff_simple_idct_put_armv6, export=1
stmfd sp!, {a1, a2, v1, v2, v3, v4, v5, v6, v7, fp, lr} stmfd sp!, {a1, a2, v1, v2, v3, v4, v5, v6, v7, fp, lr}
sub sp, sp, #128 sub sp, sp, #128
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment