Bug 67627 - fails to compile xine >= 0.9.11
fails to compile xine >= 0.9.11
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: distribution (Show other bugs)
8.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks: 67218 79579
  Show dependency treegraph
 
Reported: 2002-06-28 10:56 EDT by Bernhard Rosenkraenzer
Modified: 2014-03-16 22:28 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-01-13 14:59:30 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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

  None (edit)
Description Bernhard Rosenkraenzer 2002-06-28 10:56:40 EDT
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 11:19:22 EDT
Created attachment 63047 [details]
Source file causing this
Comment 2 Bernhard Rosenkraenzer 2002-06-28 11:20:23 EDT
Created attachment 63048 [details]
preprocessed source (-O0)
Comment 3 Bernhard Rosenkraenzer 2002-06-28 11:21:33 EDT
Created attachment 63049 [details]
preprocessed source (-O2)
Comment 4 Jakub Jelinek 2002-06-30 07:33:47 EDT
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 15:53:45 EDT
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 14:29:02 EDT
Created attachment 71344 [details]
patch to enable -fpic compilation from xine cvs
Comment 7 Jeremy Katz 2003-01-11 02:01:08 EST
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.