From owner-freebsd-x11@FreeBSD.ORG Fri Sep 17 15:26:52 2004 Return-Path: Delivered-To: freebsd-x11@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2711B16A4CF; Fri, 17 Sep 2004 15:26:52 +0000 (GMT) Received: from zardoz.rd.imagescape.com (zardoz.rd.imagescape.com [66.100.151.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A20F43D49; Fri, 17 Sep 2004 15:26:50 +0000 (GMT) (envelope-from puna@imagescape.com) Received: from [192.168.0.59] (nikko.rd.imagescape.com [192.168.0.59]) (authenticated bits=0)i8HFQifh025271; Fri, 17 Sep 2004 10:26:44 -0500 (CDT) (envelope-from puna@imagescape.com) Message-ID: <414B0303.5080307@imagescape.com> Date: Fri, 17 Sep 2004 10:30:11 -0500 From: Puna Tannehill User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: James Green References: <4145C5BB.1060507@imagescape.com> <1095360933.631.19.camel@aenea> <414A0A75.6010309@imagescape.com> In-Reply-To: <414A0A75.6010309@imagescape.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on zardoz.rd.imagescape.com cc: questions@freebsd.org cc: x11@freebsd.org cc: mobile@freebsd.org Subject: Re: 3dnow, mmx, k6-2 optimizing? X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2004 15:26:52 -0000 Interesting. I just tried the settings you suggested, and it seems that -mcpu is depreciated for -mtune. ALWAYS check the documentation first. :-) Here's the details: http://gcc.gnu.org/onlinedocs/gcc-3.4.2/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options Puna Puna Tannehill wrote: > James Green wrote: > >> Hi Puna, >> >> I had a k6-2 a few years back (before discovering BSD :) and did a lot >> of Linux From Scratch work on it. I found that passing -march=i586 >> -mcpu=i686 produced by far the best results for pretty much any C/C++ >> code. Of course the code produced will not run on anything but a k6-2, >> which as I understand it is a 686 core with 586 interface/timings, and >> likewise if memory serves specifying only -march=i586 or -march=i686 >> (implying -mcpu=i586 or -mcpu=i686 respectively) won't run on the k6-2 >> either. Definitely a trade off between speed and (total lack of) >> portablility. Again that was gcc-2.9x days... > > > Interesting. Was there an option for -march=k6-2 at that time? Were > the results based on a comparison of that setting and the ones you > mention above? > > Do you happen to know if there is a particular benchmarking program that > might be useful to testing different compiles in FreeBSD? > > I've also seen recommendations using '586/mmx' and 'k7', but it seems > interesting that someone would create a 'k6-2' flag if there were not > significant and benefitial optimizations that would be applied. Of > course, whether anyone coded for that particular processor is probably > extemely rare, so I can see how the -march -mcpu combination you > suggested would probably be a better choice. > > Here are the relavent bits from dmesg (Compaq Presario 1692): > > CPU: AMD-K6(tm) 3D processor (432.98-MHz 586-class CPU) > Origin = "AuthenticAMD" Id = 0x58c Stepping = 12 > Features=0x8021bf > AMD Features=0x80000800 > K6-family MTRR support enabled (2 registers) > >> As far as ports such as Xorg/Xfree86, I am not entirely clear on CFLAGS >> inheritance, but AFAIK Xorg/Xfree don't gain much/anything from >> optimisation over than your usual -O2 and friends. I understand that >> this is down to whether they have been written to make use of these cpu >> functions/optimisations. >> On the other hand though, it is the specific applications that run under >> X, such as mplayer that tend to be written to make use of mmx, sse, >> 3dnow etc. because for graphics it makes a _big_ difference. Generally >> you find toggles in the Makefile to enable/force certain optimisation. >> Definitely worth looking at. > > > According to the latest GCC, you can use -m3dnow -mmmx and it is of > some benefit when comiling XF86 (and hopefully Xorg). I can't find the > page offhand, but it was in the GCC Documentation, and I posted it in > other responses of this same thread. I haven't been > able to test it yet, as I'm still compiling Xorg as we speak. > > Puna > >> >> >> On Mon, 2004-09-13 at 17:07, Puna Tannehill wrote: >> >>> I've been looking for possible flags, optimizations, really anything >>> that would help me setup my laptop to use mmx and 3dnow. I've >>> updated /etc/make.conf to -march to the drum of a k6-2, but I'm not >>> even sure if mmx and 3dnow are being taken into consideration for >>> compiling and such, especially for Xorg. >>> >>> I did some googling and found people who used CFLAGS like -mmmx and >>> -m3dnow, but when I run with those options, they fail and said to be >>> invalid. they don't appear in 'man gcc' which should have been the >>> first place i looked. I'm not finding anything in terms of compiling >>> or configuring Xorg to use 3dnow or mmx, or even how to check to see >>> if they are automatically detected and used. >>> >>> Any thoughts? >>> >>> Puna >>> _______________________________________________ >>> freebsd-mobile@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-mobile >>> To unsubscribe, send any mail to >>> "freebsd-mobile-unsubscribe@freebsd.org" >> >> >> > >