Bug 67627 - fails to compile xine >= 0.9.11
Summary: fails to compile xine >= 0.9.11
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: distribution
Version: 8.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks: 67218 79579
TreeView+ depends on / blocked
 
Reported: 2002-06-28 14:56 UTC by Bernhard Rosenkraenzer
Modified: 2014-03-17 02:28 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-01-13 19:59:30 UTC
Embargoed:


Attachments (Terms of Use)
Source file causing this (16.88 KB, text/plain)
2002-06-28 15:19 UTC, Bernhard Rosenkraenzer
no flags Details
preprocessed source (-O0) (142.55 KB, text/plain)
2002-06-28 15:20 UTC, Bernhard Rosenkraenzer
no flags Details
preprocessed source (-O2) (163.89 KB, text/plain)
2002-06-28 15:21 UTC, Bernhard Rosenkraenzer
no flags Details
patch to enable -fpic compilation from xine cvs (6.80 KB, patch)
2002-08-18 18:29 UTC, Miguel Freitas
no flags Details | Diff

Description Bernhard Rosenkraenzer 2002-06-28 14:56:40 UTC
Description of Problem: 
gcc fails to compile xine-libs >= 0.9.10 because it can't find enough 
registers. 
 
gcc -fPIC -DHAVE_CONFIG_H -I. -I. -I../../../.. -I../../../.. -I../../../.. 
-I../../../../src -I../../../../src -I../../../../src/xine-engine 
-I../../../../src/xine-engine -I../../../../src/xine-utils 
-I../../../../src/xine-utils -O2 -DCONFIG_DECODERS -DHAVE_AV_CONFIG_H -c 
mpegvideo_mmx.c  -DPIC -o mpegvideo_mmx.lo 
In file included from mpegvideo_mmx.c:545: 
mpegvideo_mmx_template.c: In function `dct_quantize_MMX': 
mpegvideo_mmx_template.c:87: can't find a register in class `GENERAL_REGS' 
while reloading `asm' 
 
Using -O0 makes it worse: 
gcc -fPIC -DHAVE_CONFIG_H -I. -I. -I../../../.. -I../../../.. -I../../../.. 
-I../../../../src -I../../../../src -I../../../../src/xine-engine 
-I../../../../src/xine-engine -I../../../../src/xine-utils 
-I../../../../src/xine-utils -O0 -DCONFIG_DECODERS -DHAVE_AV_CONFIG_H -c 
mpegvideo_mmx.c  -DPIC -o mpegvideo_mmx.lo 
In file included from mpegvideo_mmx.c:545: 
mpegvideo_mmx_template.c: In function `dct_quantize_MMX': 
mpegvideo_mmx_template.c:87: can't find a register in class `GENERAL_REGS' 
while reloading `asm' 
mpegvideo_mmx_template.c:139: can't find a register in class `GENERAL_REGS' 
while reloading `asm' 
 
 
Version-Release number of selected component (if applicable): 
3.1-7

Comment 1 Bernhard Rosenkraenzer 2002-06-28 15:19:22 UTC
Created attachment 63047 [details]
Source file causing this

Comment 2 Bernhard Rosenkraenzer 2002-06-28 15:20:23 UTC
Created attachment 63048 [details]
preprocessed source (-O0)

Comment 3 Bernhard Rosenkraenzer 2002-06-28 15:21:33 UTC
Created attachment 63049 [details]
preprocessed source (-O2)

Comment 4 Jakub Jelinek 2002-06-30 11:33:47 UTC
I'd say fix xine then. with -fpic and with frame pointer IA-32 really doesn't have
6 spare registers for inline assembly, but 5.
I've tried egcs 1.1.2 and gcc-2.96-110 on your testcase (after sedding it a little
so that egcs would accept it) and it failed in those compilers similarly too.

In dct_quantize_MMX function, I think the fix could be to kill one of qmat
and bias variables which is doable because:
(offsetof(MpegEncContext, q_intra_matrix16_bias) - offsetof(MpegEncContext, q_intra_matrix16)) ==
(offsetof(MpegEncContext, q_inter_matrix16_bias) - offsetof(MpegEncContext, q_inter_matrix16))

and thus you could replace movq (%2), %%mm5 with movq %3(%2), %%mm5 or something
(where %2 would be say qmat and %3 would be "i" (difference between the 2 arrays) or something.
The code would be even faster...

Comment 5 Miguel Freitas 2002-08-07 19:53:45 UTC
Just synced xine with ffmpeg cvs and added a fix from avifile sources to enable
-fpic compilation. let me know if it works for you.


Comment 6 Miguel Freitas 2002-08-18 18:29:02 UTC
Created attachment 71344 [details]
patch to enable -fpic compilation from xine cvs

Comment 7 Jeremy Katz 2003-01-11 07:01:08 UTC
We no longer ship xine in Red Hat Linux.


Note You need to log in before you can comment on or make changes to this bug.