[FFmpeg-devel] [PATCH] Explicit addl in snowdsp_mmx.c
Michael Niedermayer
michaelni
Mon Oct 4 13:27:02 CEST 2010
On Mon, Oct 04, 2010 at 02:17:27PM +0300, ?smail D?nmez wrote:
> On Mon, Oct 4, 2010 at 2:10 PM, Michael Niedermayer <michaelni at gmx.at>wrote:
>
> > On Mon, Oct 04, 2010 at 01:50:30PM +0300, ?smail D?nmez wrote:
> > > On Mon, Oct 4, 2010 at 1:42 PM, Michael Niedermayer <michaelni at gmx.at
> > >wrote:
> > >
> > > > On Mon, Oct 04, 2010 at 08:18:56AM +0300, ?smail D?nmez wrote:
> > > > > On Mon, Oct 4, 2010 at 12:23 AM, Michael Niedermayer <
> > michaelni at gmx.at
> > > > >wrote:
> > > > >
> > > > > > On Sun, Oct 03, 2010 at 11:55:23PM +0300, ?smail D?nmez wrote:
> > > > > > > On Sun, Oct 3, 2010 at 11:54 PM, ?smail D?nmez <
> > ismail at namtrac.org>
> > > > > > wrote:
> > > > > > > > On Sun, Oct 3, 2010 at 11:53 PM, Michael Niedermayer <
> > > > michaelni at gmx.at>
> > > > > > wrote:
> > > > > > > >> On Sun, Oct 03, 2010 at 10:35:20PM +0300, ?smail D?nmez wrote:
> > > > > > > >>> Hi;
> > > > > > > >>>
> > > > > > > >>> Another ambiguous asm. Use addl to use a specific width.
> > > > > > > >>>
> > > > > > > >>> OK?
> > > > > > > >>
> > > > > > > >> no the size is different on 64 and 32bit if iam not mistaken
> > > > > > > >
> > > > > > > > Oh, is there a way to make it work on both using another
> > variant?
> > > > > > >
> > > > > > > I tested FATE on x86-64 btw.
> > > > > >
> > > > > > passing fate isnt helping, little endian is "forgiving" with such
> > > > errors
> > > > > > you need a bit of bad luck to see a failure
> > > > > >
> > > > >
> > > > > What would be the correct solution?
> > > >
> > > > 2 lines in libavutil/x86_cpu.h
> > > >
> > >
> > > It should be addl for 64bit, but what about 32bit ? Also for define name
> > > what do you suggest?
> >
> > q on 64, l on 32
> >
>
> How about this?
>
> Thanks,
> ismail
> libavcodec/x86/snowdsp_mmx.c | 2 +-
> libavutil/x86_cpu.h | 2 ++
> 2 files changed, 3 insertions(+), 1 deletion(-)
> 25ca7702706ace8d004c92a176c207d974f5d53b snowdsp-clang2.patch
> diff --git a/libavcodec/x86/snowdsp_mmx.c b/libavcodec/x86/snowdsp_mmx.c
> index d9d589e..dd37557 100644
> --- a/libavcodec/x86/snowdsp_mmx.c
> +++ b/libavcodec/x86/snowdsp_mmx.c
> @@ -812,7 +812,7 @@ snow_inner_add_yblock_sse2_end_16
> "add %%"REG_c", "PTR_SIZE"*2(%%"REG_a");\n\t"\
> "add %%"REG_c", "PTR_SIZE"*1(%%"REG_a");\n\t"\
> "add %%"REG_c", (%%"REG_a") \n\t"\
> - "add $"PTR_SIZE"*1, %1 \n\t"\
> + ADD " $"PTR_SIZE"*1, %1 \n\t"\
> "add %%"REG_c", %0 \n\t"\
> "dec %2 \n\t"\
> "jnz 1b \n\t"\
> diff --git a/libavutil/x86_cpu.h b/libavutil/x86_cpu.h
> index 08d3146..7c7557a 100644
> --- a/libavutil/x86_cpu.h
> +++ b/libavutil/x86_cpu.h
> @@ -25,6 +25,7 @@
> #include "config.h"
>
> #if ARCH_X86_64
> +# define ADD "addq"
> # define REG_a "rax"
> # define REG_b "rbx"
> # define REG_c "rcx"
> @@ -45,6 +46,7 @@ typedef int64_t x86_reg;
>
> #elif ARCH_X86_32
>
> +# define ADD "addl"
> # define REG_a "eax"
> # define REG_b "ebx"
> # define REG_c "ecx"
q and l
not addq and addl
thats more flexible
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Those who are best at talking, realize last or never when they are wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101004/97e8255d/attachment.pgp>
More information about the ffmpeg-devel
mailing list