You are not logged in.

#1 2006-11-21 11:00:32

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,641

x86_64: poll for optional CFLAGS

I think about adding SSE3 support to the default and developers CFLAGS/CXXFLAGS. I have found -mtune=nocona to get optional SSE3 support. But I don't know exactly how to test if it would become activ and if it would really speed up things - help is wanted.

If all our arch64 users have SSE3 capable processors I don't see a big problem to add it by default. Most new arch64 user will get a new cpu that will support it. Maybe we can even set -mtune=core2 to get even SSSE3 (aka SSE4) support.

I think about changing from CFLAGS="-march=x86-64 -O2 -pipe" to CFLAGS="-march=x86-64 -O2 -msse3 -pipe" or CFLAGS="-march=x86-64 -O2 -mtune=core2 -pipe" .

So tell me if your cpu supports pni (prescott new instructions) by a "cat /proc/cpuinfo | grep pni".

for further reading: http://gcc.gnu.org/onlinedocs/gcc/i386- … tions.html and http://gentoo-wiki.com/Safe_Cflags

possible gain: http://www.anandtech.com/cpuchipsets/sh … spx?i=2350

Offline

#2 2006-11-21 11:08:04

Neverth
Member
From: Finland - Land of taxes
Registered: 2006-05-16
Posts: 45
Website

Re: x86_64: poll for optional CFLAGS

Nope


Flying is Trying is Dying

Offline

#3 2006-11-21 12:46:21

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: x86_64: poll for optional CFLAGS

Mine does.

Offline

#4 2006-11-21 15:02:38

multitronic
Member
Registered: 2004-03-05
Posts: 11

Re: x86_64: poll for optional CFLAGS

I don't think it is a good idea. All pre-venice cpu owners will be locked out from Arch64. I also think SSE3 will not give much (if any) speedup. SSE2 is ok.

Offline

#5 2006-11-21 15:23:57

Pierre
Developer
From: Bonn
Registered: 2004-07-05
Posts: 1,964
Website

Re: x86_64: poll for optional CFLAGS

We are still using sse2 by default, don`t we? Do you know any application which would benefit from sse3 that much? If it could be enabled as "optional" it would be OK; otherwise I do not see any reason to include this flag.

I played a bit with nexuiz and compiled it with different flags. I did not notice any difference between "-march=nocona" and just leaving it blank.

Another point: Wouldn`t it be better to replace the chost "86_64-unknown-linux-gnu" with "86_64-pc-linux-gnu"?

Offline

#6 2006-11-21 18:13:35

ganja_guru
Member
Registered: 2005-02-14
Posts: 464

Re: x86_64: poll for optional CFLAGS

pni not supported on mine. neither is sse3. I have an Athlon FX-55 and that is fairly recent. Correct me if im wrong, but I presume only newer intel dual cores do these things, so im definitely voting this down.

Offline

#7 2006-11-21 18:35:37

Pierre
Developer
From: Bonn
Registered: 2004-07-05
Posts: 1,964
Website

Re: x86_64: poll for optional CFLAGS

Strange; my Athlon 64 4000+ supports SSE3/PNI. Should be equivalent to a FX 53.

Offline

#8 2006-11-21 19:00:27

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,641

Re: x86_64: poll for optional CFLAGS

I can already see that we have more user running old athlon64 cpus than I expected. So we really need to keep compatibility.

But I still want to play with -mtune=xxx to get optional SSE3 support. Only old 130µm athlon64 and sempron miss that feature. I think a good test will be to transcode(mencoder, lxdvdrip,...) some dvd movies. Somebody wants to do that? A Core2Duo would be nice but also athlon64 or PIV would be good.

Offline

#9 2006-11-21 19:10:09

javajunky
Member
Registered: 2006-11-13
Posts: 39

Re: x86_64: poll for optional CFLAGS

Hmm, I'm confused.  I just bought a Laptop with a Turion64x2 cpu, I *thought* this was quite a modern 64bit chip, but it seems I don't have sse3 either sad

edit: Ignore me just been on a whirlwind tour of extended instructions, I guess pni superceeds/equivalences sse3 (CPU-Z under windows at least informs me my chip *does* support SSE3) I'm adding this note in case it confuses anyone else who's brain is as tiny as mine <g> Sorry!

Offline

#10 2006-11-21 19:58:06

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,641

Re: x86_64: poll for optional CFLAGS

pni = prescott new instrucions = SSE3 :!:

Offline

#11 2006-11-21 22:23:07

ckristi
Member
From: Bucharest, Romania
Registered: 2006-11-21
Posts: 225

Re: x86_64: poll for optional CFLAGS

I voted pro. I have a Pentium D 915 and my guess is that every 64bit user has a processor that supports SSE3/PNI.


In love I believe and in Linux I trust

Offline

#12 2006-11-22 00:52:53

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 671
Website

Re: x86_64: poll for optional CFLAGS

AndyRTR wrote:

pni = prescott new instrucions = SSE3 :!:

1st I thought my amd 3200 Venice didn't have sse3, but since it shows pni I guess it has.
grep sse /proc/cpuinfo

flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt lm 3dnowext 3dnow up pni lahf_lm

I do transcode from time to time with compiled mencoder (also use  avidemux2, mmg (Matroska), ogg & (too)lame) so it definitively would be worth give optimized flags... as an option if that would break  arch64 for 130mm athlon users.

Also I remember read than amd sse3 instructions is partial (more marketing than practical optimization), at least up to Venice core.
That beeing said, from Gentoo Linux wiki "Safe Flags":

If you have a newer Athlon64("Venice" or "San Diego")/Athlon64-X2("Manchester" or "Toledo") (check for pni in cat /proc/cpuinfo) you can also add -msse3 to your CFLAGS to enable SSE3 support. Any chip using the 90nm process except for the "Winchester" class Athlon64 supports SSE3.

Also bear in mind that all Athlon64 X2 and Opteron 165, 170, 175, 180, and 185 processors are dual-core CPUs so make sure that you use MAKEOPTS="-j3" in your make.conf. This doesn't affect the code but might reduce compile times.

All socket AM2 processors are SSE3 capable as well.


Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

#13 2006-11-23 07:12:35

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,641

Re: x86_64: poll for optional CFLAGS

sad -mtune/march=core2 is planned for gcc-4.3.x release http://gcc.gnu.org/gcc-4.3/changes.html

so for now we can only use -mtune=nocona to get SSE3/pni support. it would be nice if somebody can make some benchmarks for us.

Offline

#14 2006-11-23 08:10:41

javajunky
Member
Registered: 2006-11-13
Posts: 39

Re: x86_64: poll for optional CFLAGS

I would be happy to, but I don't think theres any point since I still can't boot Arch64 without 'noapic' so I'm only using one of my cpu cores so I doubt my benchmarks would be worth anything sad Sorry.

If there is point, let me know what you want, and I'll fire it off.. My laptop sits next to me at work so I can leave it doing stuff smile

Offline

#15 2006-11-23 09:01:25

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,641

Re: x86_64: poll for optional CFLAGS

javajunky wrote:

I would be happy to, but I don't think theres any point since I still can't boot Arch64 without 'noapic' so I'm only using one of my cpu cores so I doubt my benchmarks would be worth anything sad Sorry.

If there is point, let me know what you want, and I'll fire it off.. My laptop sits next to me at work so I can leave it doing stuff smile

You can try to benchmark even with only one core. let's meet in IRC freenode.net #archlinux64 ;-)

Offline

#16 2006-11-25 04:47:05

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: x86_64: poll for optional CFLAGS

pentium D 820 has pni.

James

Offline

#17 2006-12-08 16:52:45

rbl
Member
Registered: 2005-08-29
Posts: 64

Re: x86_64: poll for optional CFLAGS

Well.. pni is there, but no sse3, so I did not vote.
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8_legacy
model name      : AMD Athlon(tm) 64 X2 Dual Core Processor 4200+

Offline

#18 2006-12-08 16:58:19

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,641

Re: x86_64: poll for optional CFLAGS

PNI = SSE3 :!:

Offline

#19 2006-12-08 17:06:31

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: x86_64: poll for optional CFLAGS

My Palermo E6 stepping Sempron has PNI but it's my understanding that the prior core did not.

Offline

#20 2006-12-08 19:44:23

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,641

Re: x86_64: poll for optional CFLAGS

ok, we need some benchmarks to decide if it's worth to add any mtune option. who's going to do it?

Offline

#21 2006-12-12 16:26:44

chrismortimore
Member
From: Edinburgh, UK
Registered: 2006-07-15
Posts: 655

Re: x86_64: poll for optional CFLAGS

AndyRTR wrote:

ok, we need some benchmarks to decide if it's worth to add any mtune option. who's going to do it?

I'm up for it.  I'm in the process of migrating my desktop from Arch to Arch64 (although I do plan to run both for a while).  Spec in the sig if it meets with your satisfaction.


Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 2x160GB Maxtor DiamondMax 10, 2x320GB WD Caviar RE, Nvidia 6600GT 256MB
Laptop: Intel Pentium M, 512MB PC2700, 60GB IBM TravelStar, Nvidia 5200Go 64MB

Offline

#22 2007-03-27 21:18:49

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,641

Re: x86_64: poll for optional CFLAGS

OK, wanna see some really fast stuff?

# $Id: PKGBUILD,v 1.5 2007/02/24 19:07:58 jgc Exp $
# Maintainer: Dale Blount <dale@archlinux.org>
# Contributer: Nick Penwarden <toth64@yahoo.com>

pkgname=firefox
pkgver=2.0.0.3
pkgrel=1
pkgdesc="Standalone web browser from mozilla.org"
arch=(i686 x86_64)
depends=('gtk2>=2.10.11' 'pango>=1.16.1' 'gcc' 'libxt' 'libidl2' 'mozilla-common' 'nss>=3.11.5' 'desktop-file-utils')
makedepends=('zip' 'imagemagick' 'pkgconfig')
replaces=('mozilla-firebird' 'phoenix' 'mozilla-firefox')
conflicts=('mozilla-firefox')
provides=('mozilla-firefox')
install=firefox.install
url="http://www.mozilla.org/projects/firefox"
source=(ftp://ftp.mozilla.org/pub/mozilla.org/${pkgname}/releases/${pkgver}/source/${pkgname}-${pkgver}-source.tar.bz2
    http://getswiftfox.com/source/swiftfox-$pkgver.patch
        mozconfig
           launcher.patch
        firefox-1.1-uriloader.patch
    mozilla-firefox-1.0-lang.patch
        moz310924.patch
    moz325644.patch
    firefox-nopangoxft.patch
    firefox-visibility.patch
    firefox-1.5-new-gtkim.patch
    firefox-1.5-pango-cursor-position.patch
    firefox-2.0-add-ldflags.patch
    firefox-2.0-buildversion.patch
        firefox.desktop
    firefox-safe.desktop)
md5sums=('24398e3d98673a2a92a01a8f771ca12a'
          'f42869b09cb23ae5c487213c2b126923'
          'b6b9a0977d33f79b79d58f0b501578e7'
          '224962b5f2446cab7727fdf07fd526de'
          '2bd0dd9035dcb875b8340be358347e8d'
          'bd5db57c23c72a02a489592644f18995'
          '29194973e2a535b460c6b7f92c635eaf'
          '2082c2a2d1cedd08e83179271aacf337'
          'f975d9aa6ec232da0dfa8f27398d2af3'
          '362f9e0b0f25b964f7120b68fb629ee0'
          '60b4bbe73d2e919ee4a6476dca6705b6'
          '288fb7db871700ff5cf7286db6192b45'
          '25f355113cdee6800380c6e1a4cd38f0'
          '11b221ff41078d97c131e17361072e47'
          '74ea70c9e935f0e7f7b75436fe33efd5'
          '5e68cabfcf3c021806b326f664ac505e')

build() {
  cd ${startdir}/src/mozilla
  patch -Np0 -i ${startdir}/src/firefox-1.1-uriloader.patch || return 1
  patch -Np0 -i ${startdir}/src/moz310924.patch || return 1
  patch -Np0 -i ${startdir}/src/moz325644.patch || return 1
  patch -Np0 -i ${startdir}/src/launcher.patch || return 1
  patch -Np1 -i ${startdir}/src/mozilla-firefox-1.0-lang.patch || return 1
  patch -Np1 -i ${startdir}/src/firefox-nopangoxft.patch || return 1
  patch -Np1 -i ${startdir}/src/firefox-1.5-new-gtkim.patch || return 1
  patch -Np1 -i ${startdir}/src/firefox-1.5-pango-cursor-position.patch || return 1
  patch -Np0 -i ${startdir}/src/firefox-2.0-add-ldflags.patch || return 1
  patch -Np0 -i ${startdir}/src/firefox-2.0-buildversion.patch || return 1
  patch -Np0 -i ${startdir}/src/swiftfox-2.0.0.3.patch || return 1

  if [ "$CARCH" = "x86_64" ]; then
    patch -Np0 -i ../firefox-visibility.patch || return 1
  fi
  # this time we need -j1
#  export MAKEFLAGS="-j1"

#  sed "s/#CFLAGS#/${CFLAGS} -msse3/g" ${startdir}/src/mozconfig >.mozconfig
  sed "s/#CFLAGS#/-march=x86-64 -O3 -pipe -msse3/g" ${startdir}/src/mozconfig >.mozconfig

  export MOZ_PROJECT=browser

  make -f client.mk build || return 1
  make DESTDIR=${startdir}/pkg install || return 1

  cd ${startdir}/pkg/opt/mozilla/lib/firefox-${pkgver}
  export MOZ_DISABLE_GNOME=1
  export MOZTMP=`mktemp -d -p ${startdir}/src`
  LD_LIBRARY_PATH=`pwd` HOME=${MOZTMP} ./firefox-bin -register
  rm -rf ${MOZTMP}
  cd chrome
  find . -maxdepth 1 -type d -exec rm -rf {} \;

  #Remove mozilla devel stuff, this is in XULRunner now
  rm -rf ${startdir}/pkg/opt/mozilla/share
  rm -rf ${startdir}/pkg/opt/mozilla/include
  rm -rf ${startdir}/pkg/opt/mozilla/lib/pkgconfig


  cd ${startdir}/pkg/opt/mozilla/lib && ln -sf firefox-${pkgver} firefox

  rm -rf ${startdir}/pkg/opt/mozilla/bin/defaults

  mkdir -p ${startdir}/pkg/usr/share/applications
  mkdir -p ${startdir}/pkg/usr/share/pixmaps
  convert ${startdir}/src/mozilla/browser/app/default.xpm ${startdir}/pkg/usr/share/pixmaps/firefox.png
  install -m644 ${startdir}/src/firefox.desktop ${startdir}/pkg/usr/share/applications/
  install -m644 ${startdir}/src/firefox-safe.desktop ${startdir}/pkg/usr/share/applications/

  mkdir -p ${startdir}/pkg/opt/mozilla/lib/firefox/chrome/icons/default
  install -m644 ${startdir}/src/mozilla/browser/app/default.xpm ${startdir}/pkg/opt/mozilla/lib/firefox/chrome/icons/default/
  install -m644 ${startdir}/src/mozilla/browser/app/default.xpm ${startdir}/pkg/opt/mozilla/lib/firefox/icons/
}

It's based on Swiftfox patches and adds CLFAGS that i call really "nice" big_smile - there's really a difference in rendering speed.

But I'm still waiting for benchmarks for -msse3....

Offline

#23 2007-03-28 00:50:37

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: x86_64: poll for optional CFLAGS

javajunky wrote:

Hmm, I'm confused.  I just bought a Laptop with a Turion64x2 cpu, I *thought* this was quite a modern 64bit chip, but it seems I don't have sse3 either sad

edit: Ignore me just been on a whirlwind tour of extended instructions, I guess pni superceeds/equivalences sse3 (CPU-Z under windows at least informs me my chip *does* support SSE3) I'm adding this note in case it confuses anyone else who's brain is as tiny as mine <g> Sorry!

When you check /proc/cpuinfo you'll see pni, and if you google around for how to find out if your CPU has sse3 support using the proc interface, you'd find out that's what pni refers to wink.

I got a Turion ML-32 that supports SSE3 too, btw.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#24 2007-03-28 05:23:48

jb
Member
From: Florida
Registered: 2006-06-22
Posts: 466

Re: x86_64: poll for optional CFLAGS

I too, have a Sempron3100 with SSE3.  However, as long as SSE3 or SSE4 aren't made a requirement for the x86_64 platform, since one doesn't imply the other, I'm all for it.


...

Offline

#25 2007-03-28 10:09:50

[vEX]
Member
From: Sweden
Registered: 2006-11-23
Posts: 450

Re: x86_64: poll for optional CFLAGS

AndyRTR wrote:

OK, wanna see some really fast stuff?

It's based on Swiftfox patches and adds CLFAGS that i call really "nice" :D - there's really a difference in rendering speed.

But I'm still waiting for benchmarks for -msse3....

I was trying to compile this but dies pretty much right away:

==> Starting build()...
patching file uriloader/exthandler/Makefile.in
Hunk #1 succeeded at 103 (offset 1 line).
patching file uriloader/exthandler/unix/nsGNOMERegistry.cpp
patching file uriloader/exthandler/unix/nsGNOMERegistry.h
The next patch would create the file uriloader/exthandler/unix/nsMIMEInfoUnix.cpp,
which already exists!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file uriloader/exthandler/unix/nsMIMEInfoUnix.cpp.rej
The next patch would create the file uriloader/exthandler/unix/nsMIMEInfoUnix.h,
which already exists!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file uriloader/exthandler/unix/nsMIMEInfoUnix.h.rej
patching file uriloader/exthandler/unix/nsOSHelperAppService.cpp
==> ERROR: Build Failed.  Aborting...


PC: Antec P182B | Asus P8Z77-V PRO | Intel i5 3570k | 16GB DDR3 | GeForce 450GTS | 4TB HDD | Pioneer BDR-207D | Asus Xonar DX | Altec Lansing CS21 | Eizo EV2736W-BK | Arch Linux x86_64
HTPC: Antec NSK2480 | ASUS M3A78-EM (AMD 780G) | AMD Athlon X3 425 | 8GB DDR2 | GeForce G210 | 2TB HDD | Arch Linux x86_64
Server: Raspberry Pi (model B) | 512MB RAM | 750GB HDD | Arch Linux ARM

Offline

Board footer

Powered by FluxBB