After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 345473 - MMX burn function doesn't compile under gcc 4.1.1
MMX burn function doesn't compile under gcc 4.1.1
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
2.2.x
Other Linux
: Urgent normal
: 2.2
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2006-06-20 21:11 UTC by Ari Pollak
Modified: 2008-01-15 13:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch against 2.2.11 (25.26 KB, patch)
2006-06-20 21:12 UTC, Ari Pollak
committed Details | Review

Description Ari Pollak 2006-06-20 21:11:00 UTC
With gcc 4.1.1-5 on Debian, gimp 2.2.11 stopped being able to build on i386 with MMX code enabled:

cc -DHAVE_CONFIG_H -I. -I/build/buildd/gimp-2.2.11/./app/composite -I../.. -I/build/buildd/gimp-2.2.11/. -I/build/buildd/gimp-2.2.11/./app -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I/usr/include -DG_LOG_DOMAIN=\"Gimp-Composite\"  -DGIMP_DISABLE_DEPRECATED -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE -mmmx -g -Wall -O2 -c -o libcompositemmx_a-gimp-composite-mmx.o `test -f 'gimp-composite-mmx.c' || echo '/build/buildd/gimp-2.2.11/./app/composite/'`gimp-composite-mmx.c
/build/buildd/gimp-2.2.11/./app/composite/gimp-composite-mmx.c:927: warning: 'mmx_op_overlay' defined but not used
/build/buildd/gimp-2.2.11/./app/composite/gimp-composite-mmx.c: In function 'gimp_composite_burn_rgba8_rgba8_rgba8_mmx':
/build/buildd/gimp-2.2.11/./app/composite/gimp-composite-mmx.c:157: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
make[4]: *** [libcompositemmx_a-gimp-composite-mmx.o] Error 1
make[4]: Leaving directory `/build/buildd/gimp-2.2.11/build/app/composite'
make[3]: *** [all-recursive] Error 1

The fix, which seems to work for me, is to remove the MMX/SSE burn functions and backport the more efficient generic version from CVS HEAD. I'm attaching the patch I'm currently using in the Debian gimp 2.2.11 packages, but I doubt this is totally correct since it's patching generated code.
Comment 1 Ari Pollak 2006-06-20 21:12:39 UTC
Created attachment 67737 [details] [review]
patch against 2.2.11
Comment 2 Sven Neumann 2006-06-22 11:25:08 UTC
Ok, I've applied your patch and ran 'make regenerate' in the app/composite directory in order to regenerate the generated code.

2006-06-22  Sven Neumann  <sven@gimp.org>

	* app/composite/gimp-composite-generic.c
	* app/composite/gimp-composite-mmx-installer.c
	* app/composite/gimp-composite-mmx-test.c
	* app/composite/gimp-composite-mmx.[ch]
	* app/composite/gimp-composite-sse-installer.c
	* app/composite/gimp-composite-sse-test.c
	* app/composite/gimp-composite-sse.[ch]: backported changes to burn
	compositing function from the HEAD branch because the MMX/SSE code
	broke compilation on GCC 4.1 (bug #345473).