Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Sep 2004 16:12:59 -0500
From:      Puna Tannehill <puna@imagescape.com>
To:        "Conrad J. Sabatier" <conrads@cox.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: 3dnow, mmx, k6-2 optimizing?
Message-ID:  <41460D5B.3030100@imagescape.com>
In-Reply-To: <20040913141026.6d572ae2@dolphin.local.net>
References:  <4145D786.4080807@imagescape.com> <20040913141026.6d572ae2@dolphin.local.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Conrad J. Sabatier wrote:

> On Mon, 13 Sep 2004 12:23:18 -0500, Puna Tannehill <puna@imagescape.com>
> 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
> 
> 
> I don't know why those flags would not be working for you; I've been
> using them for quite some time now on my Athlon (32-bit) box.  One
> oddity I just noticed very recently is that, with the recent patches to
> "make", the CPUTYPE variable seems to be ignored now, which is why I
> explicitly added the "-march" flag to CFLAGS.  Also, note that I don't
> use "-mmmx -m3dnow" for kernel builds; you don't want to be doing this,
> as it can easily break things in the kernel, but for general builds
> and port builds, it's fine:
> 
> CPUTYPE?=athlon

I had that problem too.  The '?=' should be just '='.  I see in the 
notes that '?=' is for compiling for different machine, but I don't do 
that so I just left is as 'CPUTYPE=' and it added the -march accordingly.

> CFLAGS= -O3 -pipe -march=athlon -mmmx -m3dnow
> 
> # buildkernel variables settings
> 
> KERNCONF=CUSTOM
> COPTFLAGS= -O3 -pipe -march=athlon

I see many people using a -O3, but I've never been able to use any 
optimization levels above -O without compile errors, or having 
problems with SSH.  Just out of curiosity, do you see a significant 
different in performance with that level of optimization?

Puna

It's working for me now, I'm not sure why it was failing before.

Puna



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41460D5B.3030100>