[mythtv] Myth doesn't compile under FC3

Daniel Thor Kristjansson danielk at mrl.nyu.edu
Wed Nov 10 14:23:19 UTC 2004

On Tue, 9 Nov 2004, Chris Petersen wrote:
]Trying to compile myth under fc3, and I get the following error:
]i386/dsputil_mmx.c: In function `h263_h_loop_filter_mmx':
]i386/dsputil_mmx.c:634: error: can't find a register in class `GENERAL_REGS'
]while reloading `asm'

This is due to a bug in gcc's new register allocator. The old one was 
buggy too but we've all already worked around it's bugs. There are two 
work arounds. One is to break assembler blocks into smaller pieces so 
that the compiler can spill more variables onto the stack. The other is 
to remove the assembler blocks from the C files and place them in gas 
files and link them in. The problem with the first solution is that it 
makes the code less efficient, and the problem with the second solution 
is that it makes the code more complex. 

In some of my non-myth coding I've been using a mix of the two 
solutions, hopefully the first won't be terribly inefficient once the 
register allocator is fixed.

BTW another work around is to just use different compiler options, 
changing the optimization flags can sometimes free some registers.
There is some code in gcc 4.0 that will make debugging work better
with -fomit-frame-pointer 

-- Daniel

More information about the mythtv-dev mailing list