[FFmpeg-devel] r9017 breaks WMA decoding on Intel Macs

Graham Booker gbooker
Sun Jun 3 16:37:37 CEST 2007

On Jun 2, 2007, at 11:13 PM, Loren Merritt wrote:

> On Sat, 2 Jun 2007, Augie Fackler wrote:
>> My solution is to do offset+0%number which translates to 345+0(% 
>> ebx,%ecx) or
>> 345+0123(%eax).  In the first case, we add 0 which OS X's gas has  
>> no issue
>> with and assembles correctly, and the second case, the number is  
>> given a
>> leading 0, which is still the same number.  I may be completely  
>> off my rocker
>> here, but I expect this is the real solution for use.  Attached is  
>> my patch
>> to fix it.
> 123 != 0123
> A leading 0 means octal.

Arg!!  Forgot about that.  Well, I have another idea now, although it  
is a bit more hack like, but it seems to work.

I noticed that the linux gas (newer gas really), upon seeing a (value  
operator "missing value"), assumes the "missing value" evaluates to  
0.  So, 123+(..)  is changed to 123+0(...).   The Mactel gas (older  
one) seems to assume that the evaluation of the operator is 0 (not  
the whole expression btw) meaning it evaluates to 0(..).  So, what  
about offest+1*%number.  The newer gas assumes offset+1*0(...) in the  
case of no offset in the %number, and the older gas assumes offset+0 
(...) in the same case.  For both, if the %number contains an offset,  
then these evaluate to offset1+1*offset2(%register).

More ugly, yes, but from what I can tell, this seems to work everywhere.

P.S.  Does anyone know a way to force gcc to give me a %number that  
evaluates to offset(%register)?  I can't seem to get it to test that  
case.  Gcc seems to like to evaluate the memory address and stuff the  
final address in a register rather than give an offset/address combo.

> --Loren Merritt

- Graham

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mactelBrokenGas.patch
Type: application/octet-stream
Size: 2860 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070603/16c57e1a/attachment.obj>
-------------- next part --------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1601 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070603/16c57e1a/attachment.bin>

More information about the ffmpeg-devel mailing list