[Theora-dev] patch to build theora-mmx on AMD64

Dan Lenski dlenski at gmail.com
Wed May 3 18:09:05 PDT 2006


Okay, here it is: a patch to build a shared lib on x86_64.  Applies to
svn rev 11339.  Please test!

Dan

On 5/3/06, Dan Lenski <dlenski at gmail.com> wrote:
> On 5/3/06, Michael Smith <msmith at xiph.org> wrote:
> > >
> > > I had the exact same problem.  I found this on Usenet:
> > > http://groups.google.com/group/linux.debian.bugs.dist/browse_thread/thread/bbef7633760b5472/a28c7c5bfb46c85f%23a28c7c5bfb46c85f
> > > It seems that the deal is that PIC and non-PIC code don't play nice on
> > > x86_64, but you can get away w/it on x86_32 (I need easier
> > > abbreviations!!!) so lots of libs have this problem.
> >
> > The problem is the global variables in a few files (e.g. V128 in
> > recon_mmx.c), I'm pretty sure.
> >
> > Unfortunately, I don't know what the solution is. Possibly loading the
> > constants into local variables (in the surrounding C code) and only
> > using the locals would be a workable solution; there might be better
> > ones.
>
> Thanks for explaining that.  Fortunately there's a pretty easy fix: we
> can load 64-bit immediates into general purpose registers on x86_64,
> so I'm just going to clobber %rax and use it to transfer immediates
> into the %mm regs.
>
> Dan
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: theora-mmx_64bit_shared.patch.gz
Type: application/x-gzip
Size: 1623 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/theora-dev/attachments/20060503/5a4fc83b/theora-mmx_64bit_shared.patch-0001.bin


More information about the Theora-dev mailing list