[FFmpeg-devel] [PATCH]Drop local label from ppc asm timer
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Sat Jun 29 19:16:57 CEST 2013
On Sat, Jun 29, 2013 at 06:58:44PM +0200, Carl Eugen Hoyos wrote:
> Hi!
>
> Attached patch allows compilation of ppc asm timer on aix, the aix assembler
> does not support local labels.
> I am not sure how to "test" the patch, but I compared disassembly on the
> following platforms (identical with and without the patch):
> ppc32 Linux
> ppc64 Linux
> ppc32 OSX
> ppc64 OSX
>
> Please review, Carl Eugen
> diff --git a/libavutil/ppc/timer.h b/libavutil/ppc/timer.h
> index 155fc01..9ade7f5 100644
> --- a/libavutil/ppc/timer.h
> +++ b/libavutil/ppc/timer.h
> @@ -31,12 +31,11 @@ static inline uint64_t read_time(void)
>
> /* from section 2.2.1 of the 32-bit PowerPC PEM */
> __asm__ volatile(
> - "1:\n"
> "mftbu %2\n"
> "mftb %0\n"
> "mftbu %1\n"
> "cmpw %2,%1\n"
> - "bne 1b\n"
> + "bne $-0x10\n"
> : "=r"(tbl), "=r"(tbu), "=r"(temp)
> :
> : "cc");
Looking at this:
http://www.ibm.com/developerworks/aix/library/au-inline_assembly/
I wonder if the lack of support for local labels isn't just a myth and
we are just using them incorrectly.
Does the AIX assembler really not accept it even if 0 is used instead of
1 and the
bne 1b
is changed to
bne- 0b
?
More information about the ffmpeg-devel
mailing list