[FFmpeg-devel] [PATCH]Drop local label from ppc asm timer
Carl Eugen Hoyos
cehoyos at ag.or.at
Sun Jun 30 02:17:35 CEST 2013
Michael Niedermayer <michaelni <at> gmx.at> writes:
> > > > Attached patch allows compilation of ppc asm
> > > > timer on aix, the aix assembler does not
> > > > support local labels.
> > >
> > > how does the compiler do if() if it has no
> > > (local) labels ?
> >
> > Hm, isn't PPC a fixed-size instruction architecture?
> > Then it can calculate the offset based on the number
> > of instructions.
>
> > But yes, seeing an if() compiled with -S to
> > assembler code would be interesting.
>
> does make ffmpeg.s or (some smalelr source file) not work ?
> It would show the used syntax for branches and labels
Labels are no problem for the assembler, but I
don't think it supports local labels (that may
be used multiple times).
f(int x)
{
if (x > 0)
return 0;
else
return 1;
}
.file "test.c"
.csect .text[PR]
.toc
.csect .text[PR]
.align 2
.globl f
.globl .f
.csect f[DS]
f:
.long .f, TOC[tc0], 0
.csect .text[PR]
.f:
stw 31,-4(1)
stwu 1,-32(1)
mr 31,1
stw 3,56(31)
lwz 9,56(31)
cmpwi 7,9,0
ble 7,L..2
li 9,0
b L..3
L..2:
li 9,1
L..3:
mr 3,9
addi 1,31,32
lwz 31,-4(1)
blr
LT..f:
.long 0
.byte 0,0,32,96,128,1,1,1
.long 0
.long LT..f-.f
.short 1
.byte "f"
.byte 31
.align 2
_section_.text:
.csect .data[RW],4
.long _section_.text
More information about the ffmpeg-devel
mailing list