Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Experimental CFLAGS: G3, 750FX
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1563
Location: Germany

PostPosted: Thu Oct 13, 2005 6:57 pm    Post subject: Experimental CFLAGS: G3, 750FX Reply with quote

Hello.
Maybe this is going to start a thread about experiences with CFLAGS optimization on the G3-CPU .

freehackers.org gives good information about x86, but only a few for ppc.
Has anyone tried these flags used there?

My experiences so far, these flags are running stable on this machine:
    cpu : 750FX
    revision : 1.2 (pvr 7000 0102)
    Code:
    CHOST="powerpc-unknown-linux-gnu"
    CFLAGS="-mcpu=750 -O2 -pipe -fomit-frame-pointer -mpowerpc-gfxopt -mmultiple -mstring"
    CXXFLAGS="${CFLAGS}"

_________________
ppc:PowerBook5,8 15"(1440)-G4/1.67,2G|amd64:HP EliteBook 8560w,i7-2620M,16G|Acer Z5610 (Core2QuadQ8200),8G|amd64-prefix:OpenSuse|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Lila-Theme
Back to top
View user's profile Send private message
ttuegel
Apprentice
Apprentice


Joined: 18 Jan 2005
Posts: 176
Location: Illinois, USA

PostPosted: Fri Oct 14, 2005 2:40 am    Post subject: Reply with quote

I've been looking for something like this for my G3 iBook :). Currently I'm running something like this:

Code:
CPU: 750FX
clock: 900MHz
revision: 2.3 (pvr 7000 0203)

CFLAGS="-pipe -mtune=powerpc -Os"
CXXFLAGS="${CFLAGS}"


Rather unimpressive, I know, but like I said I'd been unable to find any PPC CFLAGS, so I stuck in the old standby "-pipe" and figured I'd give "-Os" a try. I'll have give your nifty looking flags a try :twisted:.

So far, all my CFLAGS decisions have been subjective, so what I'd really like to know is if anyone has good methods of objectively testing performance specifically related to their CFLAGS. Are there any reliable, pertinent Linux benchmarking programs out there?
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1563
Location: Germany

PostPosted: Fri Oct 14, 2005 8:14 am    Post subject: Reply with quote

So I have even more done than you.
ttuegel wrote:
but like I said I'd been unable to find any PPC CFLAGS
There are a lot at gcc.gnu.org. I would like to hear your experiences.
  • Why just -mtune=, and not -mcpu=?
  • I think your 750FX should also support -mpowerpc-gfxopt -mmultiple -mstring according to gcc's docs.

_________________
ppc:PowerBook5,8 15"(1440)-G4/1.67,2G|amd64:HP EliteBook 8560w,i7-2620M,16G|Acer Z5610 (Core2QuadQ8200),8G|amd64-prefix:OpenSuse|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Lila-Theme
Back to top
View user's profile Send private message
zeekec
n00b
n00b


Joined: 24 Feb 2004
Posts: 56
Location: Athens, GA, USA

PostPosted: Fri Oct 14, 2005 1:39 pm    Post subject: Reply with quote

Check out Gentoo Wiki:

Safe CFLAGS

CFLAGS Matrix

CFLAGS

Erik
_________________
Against stupidity the very gods
Themselves contend in vain.
-Johann Christoph Friedrich von Schiller (1801)
Back to top
View user's profile Send private message
ttuegel
Apprentice
Apprentice


Joined: 18 Jan 2005
Posts: 176
Location: Illinois, USA

PostPosted: Fri Oct 14, 2005 1:54 pm    Post subject: Reply with quote

paoleela wrote:

I think your 750FX should also support -mpowerpc-gfxopt -mmultiple -mstring according to gcc's docs.[/list]


Yeah, that's how I read the gcc docs. I have some extra (unpartitioned) hard drive space, so I think I'll try partitioning it off and doing a couple fresh installs with different CFLAGS to benchmark them. I noticed we have a whole section of portage for benchmark apps (:twisted:), and I'm thinking of throwing lmbench and iozone at these fresh installs, see what I can determine from and objective stand point.
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1563
Location: Germany

PostPosted: Sat Oct 15, 2005 11:31 pm    Post subject: Reply with quote

paoleela wrote:
gcc.gnu.org
  • I think your 750FX should also support -mpowerpc-gfxopt -mmultiple -mstring according to gcc's docs.
They say..
Quote:
The exceptions are PPC740 and PPC750 which permit the instructions usage in little endian mode.
Does that mean, I have to set it to -mlittle-endian also?
What is little-endian? Just the method how to use memory? Which mode does the linux run with the ppc usually?
What about this option on a single G3?
  • -pthread

_________________
ppc:PowerBook5,8 15"(1440)-G4/1.67,2G|amd64:HP EliteBook 8560w,i7-2620M,16G|Acer Z5610 (Core2QuadQ8200),8G|amd64-prefix:OpenSuse|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Lila-Theme
Back to top
View user's profile Send private message
ttuegel
Apprentice
Apprentice


Joined: 18 Jan 2005
Posts: 176
Location: Illinois, USA

PostPosted: Sat Oct 15, 2005 11:45 pm    Post subject: Reply with quote

paoleela wrote:
What is little-endian? Just the method how to use memory? Which mode does the linux run with the ppc usually?


Wikipedia has a nice article about endian-ness. As for which mode a G3 usually runs in, the article lists PPC chips as being bi-endian. On Mac OS X, it defaults to big endian, I believe. I ported some code to load PC game data a few years ago, and I had to byte swap to the data to load it on Mac OS X. PCs are little-endian, so I'm assuming Mac OS X is big-endian. (YMMV.)
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Sun Oct 16, 2005 12:10 am    Post subject: Reply with quote

Linux doesn't really support PPC in little endian mode. Please leave it in big endian. :)
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1563
Location: Germany

PostPosted: Sun Oct 16, 2005 12:26 am    Post subject: Reply with quote

Does it mean that -mpowerpc-gfxopt -mmultiple -mstring will be ignored?
_________________
ppc:PowerBook5,8 15"(1440)-G4/1.67,2G|amd64:HP EliteBook 8560w,i7-2620M,16G|Acer Z5610 (Core2QuadQ8200),8G|amd64-prefix:OpenSuse|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Lila-Theme
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Sun Oct 16, 2005 3:01 am    Post subject: Reply with quote

According to man gcc (which is worth reading if you want to know what certain cflags do and what the defaults are), -mpowerpc-gfxopt, -mmultiple and -mstring is implied by the mcpu setting, there is no need to have this in your cflags if you set mcpu. You can try setting these if you're using mtune instead.

Honestly, if you use -pipe -mcpu=<cputype> -Os you're going to be fine. :) The potential difference in speed usually isn't worth the trouble (recompiling your whole system with new flags). :p
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1563
Location: Germany

PostPosted: Tue Oct 18, 2005 8:04 pm    Post subject: Reply with quote

According to How to fly with gentoo I am using now also
Code:
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common -s"

And because all the -mpowerpc are implied by -mcpu=750:
Code:
CFLAGS="-mcpu=750 -mtune=750 -O2 -pipe -fomit-frame-pointer -ftracer"
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"

_________________
ppc:PowerBook5,8 15"(1440)-G4/1.67,2G|amd64:HP EliteBook 8560w,i7-2620M,16G|Acer Z5610 (Core2QuadQ8200),8G|amd64-prefix:OpenSuse|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Lila-Theme
Back to top
View user's profile Send private message
btlee
Apprentice
Apprentice


Joined: 03 Sep 2004
Posts: 168
Location: San Francisco

PostPosted: Wed Oct 19, 2005 8:32 am    Post subject: Reply with quote

Although you set the CFLAGS and/or LDFLAGS to your favorite,
several main packages such as mozilla, evolution, gaim, kernel and so on, filter out the FLAGS.
So, I think that you had better not spend so much time. :)

Cheers
_________________
AMD64 3200+, 2G/160G+250G
DELL 700m, 1.8GHz, 2G/80G
iBook G3-500Mhz, 640M/100G
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum