This is a discussion on Pentium-m gcc optimization. within the Gentoo Linux Support forums, part of the Unix Operating Systems category; --> Hi, just got a centrino laptop (for free) so have to use it whether I want it or not ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, just got a centrino laptop (for free) so have to use it whether I want it or not now when I actualy have the hardware and have gone through gcc man it seems like I was hallucinating and there is now such thing. I'd really appreciate some comments on pentium-m optimization. Has anybody tried it with "-march=pentium4"? Any weird behavior? AFAIK, pentium-m is just a P3 CPU with added ess2, SpeedStep gen.3, 3d predictor, "fixed up" pipe-lines and few other tweaks. So optimizing for P3 would definitely work but seems like loosing few things, at the same time optimizing for P4 seems a bit worrying since I'm not sure about the ABI of both CPUs. Comments ?? Thanks. |
| |||
| I believe the Pentium M arch is only in gcc 3.4. So I think you should use Pentium 3 for march, and also use flags to enable sse2, etc. --Geoff Mishkin <gmishkin@comcast.net> On Wed, 09 Jun 2004 19:24:40 +0100, hrv wrote: > Hi, > > just got a centrino laptop (for free) so have to use it whether I want it or > not > now when I actualy have the hardware and have gone through gcc man it seems > like I was hallucinating and there is now such thing. > I'd really appreciate some comments on pentium-m optimization. Has anybody > tried it with "-march=pentium4"? Any weird behavior? > AFAIK, pentium-m is just a P3 CPU with added ess2, SpeedStep gen.3, 3d > predictor, "fixed up" pipe-lines and few other tweaks. So optimizing for P3 > would definitely work but seems like loosing few things, at the same time > optimizing for P4 seems a bit worrying since I'm not sure about the ABI of > both CPUs. > Comments ?? > > Thanks. |
| |||
| Geoff Mishkin wrote: > I believe the Pentium M arch is only in gcc 3.4. So I think you should > use Pentium 3 for march, and also use flags to enable sse2, etc. > > --Geoff Mishkin <gmishkin@comcast.net> That's an option, thanks, I forgot I can add sse2 with "-msse2". That's what I thought, gcc 3.4 should have "pentium-m" but just looked at gcc 3.4 man and it's not to be found anywhere. Hmm! Has anyone tried gcc 3.4? Is it usable? |
| |||
| hrv wrote: > Hi, > > I'd really appreciate some comments on pentium-m optimization. Has anybody > tried it with "-march=pentium4"? Any weird behavior? I saw a page somewhere on intel.com where it is said that the gcc flag to use for a pentium-M is 'pentium4'. My settings : gcc (GCC) 3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7) Linux wok 2.6.5-gentoo-r1 #7 Sun May 16 00:53:38 CEST 2004 i686 Intel(R) Pentium(R) M processor 1700MHz GenuineIntel GNU/Linux CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer" I had -march=pentium4 since the begining, more than 6 months now, and never had any problem with it. |
| |||
| On Wed, 09 Jun 2004 21:32:29 +0200, sarylo wrote: > hrv wrote: >> Hi, >> >> I'd really appreciate some comments on pentium-m optimization. Has anybody >> tried it with "-march=pentium4"? Any weird behavior? > > I saw a page somewhere on intel.com where it is said that the gcc flag > to use for a pentium-M is 'pentium4'. > > > I had -march=pentium4 since the begining, more than 6 months now, and > never had any problem with it. I have been installing on a P-M over the last couple days. Why I decided to go with -march=pentium3 is the following post I found on the Kernel list: (quote): P-M is not a P4 core, it's an enhanced PIII core. SSE2 was added, but compiler support for SSE2 f.p. math shouldn't matter for the kernel. Using P4 optimisations on a P-M may actually reduce performance, due to the different micro-architectures. (P4 made shifts and some leas more expensive, and simple add/and/sub/etc less expensive.) IOW, don't lie to the compiler and pretend P-M == P4 with that -march=pentium4. |
| |||
| |
| |||
| hrv wrote: > Hi, > > just got a centrino laptop (for free) so have to use it whether I want it or > not > now when I actualy have the hardware and have gone through gcc man it seems > like I was hallucinating and there is now such thing. > I'd really appreciate some comments on pentium-m optimization. Has anybody > tried it with "-march=pentium4"? Any weird behavior? > AFAIK, pentium-m is just a P3 CPU with added ess2, SpeedStep gen.3, 3d > predictor, "fixed up" pipe-lines and few other tweaks. So optimizing for P3 > would definitely work but seems like loosing few things, at the same time > optimizing for P4 seems a bit worrying since I'm not sure about the ABI of > both CPUs. > Comments ?? > > Thanks. > Hi, Here are the combination of flags which work the best (for me): CFLAGS="-pipe -O3 -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse,387 -maccumulate-outgoing-args -mno-align-stringops -fomit-frame-pointer -ffast-math -funroll-all-loops -fsched-spec-load -fprefetch-loop-arrays -ftracer -fmove-all-movables --param max-gcse-passes=4" With gcc 3.3 It yielded the fastest code for my projects (intensive integer calculations) and I haven't had any problems with any ebuilds at all :-) Regards, numlock |
| |||
| Użytkownik numlock napisał: > hrv wrote: > >> Hi, >> >> just got a centrino laptop (for free) so have to use it whether I want >> it or >> not >> now when I actualy have the hardware and have gone through gcc man it >> seems >> like I was hallucinating and there is now such thing. >> I'd really appreciate some comments on pentium-m optimization. Has >> anybody >> tried it with "-march=pentium4"? Any weird behavior? >> AFAIK, pentium-m is just a P3 CPU with added ess2, SpeedStep gen.3, 3d >> predictor, "fixed up" pipe-lines and few other tweaks. So optimizing >> for P3 >> would definitely work but seems like loosing few things, at the same time >> optimizing for P4 seems a bit worrying since I'm not sure about the >> ABI of >> both CPUs. >> Comments ?? >> Just installed 2004.2 from stage1 with CFLAGS="-pipe -O2 -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse -fomit-frame-pointer" \ running kde now and all is ok |
| |||
| On Thu, 26 Aug 2004 14:46:49 +0200, numlock wrote: > hrv wrote: >> Hi, >> >> just got a centrino laptop (for free) so have to use it whether I want it or >> not >> now when I actualy have the hardware and have gone through gcc man it seems >> like I was hallucinating and there is now such thing. >> I'd really appreciate some comments on pentium-m optimization. Has anybody >> tried it with "-march=pentium4"? Any weird behavior? >> AFAIK, pentium-m is just a P3 CPU with added ess2, SpeedStep gen.3, 3d >> predictor, "fixed up" pipe-lines and few other tweaks. So optimizing for P3 >> would definitely work but seems like loosing few things, at the same time >> optimizing for P4 seems a bit worrying since I'm not sure about the ABI of >> both CPUs. >> Comments ?? >> >> Thanks. >> > > Hi, > > Here are the combination of flags which work the best (for me): > > CFLAGS="-pipe -O3 -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse,387 > -maccumulate-outgoing-args -mno-align-stringops -fomit-frame-pointer > -ffast-math -funroll-all-loops -fsched-spec-load -fprefetch-loop-arrays > -ftracer -fmove-all-movables --param max-gcse-passes=4" > > With gcc 3.3 It yielded the fastest code for my projects (intensive > integer calculations) and I haven't had any problems with any ebuilds at > all :-) > > Regards, > numlock Should be "-march=pentium3" According to the kernel developers. But as always, do whatever you want to do |
| ||||
| Hi! > "-march=pentium3" IIRC there's a -march=pentium-m in gcc 3.4.x -- http://tam.belchenstuermer.de/ |