On Tue, 2005-05-10 at 11:02 -0400, Jakub Jelinek wrote: > On Tue, May 10, 2005 at 04:53:55PM +0200, Nils Philippsen wrote: > > > c) if you use -msse2 in CFLAGS for all files, you can't run the latest > > > GIMP on e.g. Pentium2, or pre-x86_64 AMD chips. > > > -msse2 should be ONLY used on sources that have SSE/SSE2 stuff in it, > > > and GIMP should make sure that no routine from those sources will be > > > ever called on pre-SSE2 chips > > > > According to the gcc man page, you need to use "-mfpmath=sse" if you > > want to get SSE/SSE2 instructions generated from FP code. As I > > No. -msse resp. -msse2 says that SSE resp. SSE2 instructions are available > and can be used. So, with -msse2 you can use SSE2 builtins, you can > use those regs in __asm statement clobbers/regs and GCC if it decides > it is worthwhile can use the SSE2 registers/instructions (say with > autovectorization, or with high register preasure to move data around, > etc.). > -mfpmath=sse uses the SSE2 unit for float/double arithmetics. > > If the only place that you want to enable -msse2 for are the clobber > lists of __asm statements, then perhaps best would be to conditionalize > them: > __asm ("something" : ... : ... : > #ifdef __SSE2__ > "xmm0", "xmm1" > #endif > ); > etc., because without -msse2 (resp. -msse (__SSE__ macro)), the registers > are not known to the compiler, so there is no point to tell the compiler > about them. Ahh. If I understand you correctly, given that the various asm optimized functions are in separate source files, it should be ensured that -mmmx/sse/sse2/3dnow are used only for the relevant source files? Nils -- Nils Philippsen / Red Hat / nphilipp@xxxxxxxxxx "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -- B. Franklin, 1759 PGP fingerprint: C4A8 9474 5C4C ADE3 2B8F 656D 47D8 9B65 6951 3011 -- fedora-devel-list mailing list fedora-devel-list@xxxxxxxxxx http://www.redhat.com/mailman/listinfo/fedora-devel-list