View previous topic :: View next topic |
Author |
Message |
farrenheit n00b
Joined: 20 Jun 2010 Posts: 29
|
Posted: Sat Jun 25, 2011 11:47 pm Post subject: -march=native not enabling SSE instructions...when CPU suppo |
|
|
I have the Q6600 Intel Core2 Quad processor, which from various websites including wikipedia, should include instruction sets like SSE, SSE2, SSE3, etc.
But when I run the gcc code to display what -march=native does, it shows these instruction sets disabled. Anyone know why?
Code: | 103904lksd etc # gcc -v -Q -march=native --help=target
Using built-in specs.
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.4.5 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.5 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.5/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.5/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --without-cloog --enable-nls --without-included-gettext --with-system-zlib --disable-werror --enable-secureplt --enable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.4.5/python --enable-checking=release --disable-libgcj --enable-languages=c,c++ --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.4.5 p1.2, pie-0.4.5'
Thread model: posix
gcc version 4.4.5 (Gentoo 4.4.5 p1.2, pie-0.4.5)
COLLECT_GCC_OPTIONS='-v' '-Q' '-fhelp=target'
/usr/libexec/gcc/x86_64-pc-linux-gnu/4.4.5/cc1 -v help-dummy -D_FORTIFY_SOURCE=2 -march=core2 -mcx16 -msahf --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=core2 -dumpbase help-dummy -auxbase help-dummy -version -fhelp=target -o /tmp/ccbUC7gd.s
The following options are target specific:
-m128bit-long-double [disabled]
-m32 [disabled]
-m3dnow [disabled]
-m3dnowa [disabled]
-m64 [enabled]
-m80387 [enabled]
-m96bit-long-double [enabled]
-mabm [disabled]
-maccumulate-outgoing-args [disabled]
-maes [disabled]
-malign-double [disabled]
-malign-functions=
-malign-jumps=
-malign-loops=
-malign-stringops [enabled]
-march= core2
-masm=
-mavx [disabled]
-mbranch-cost=
-mcld [disabled]
-mcmodel=
-mcx16 [enabled]
-mfancy-math-387 [enabled]
-mfma [disabled]
-mforce-drap [disabled]
-mfp-ret-in-387 [enabled]
-mfpmath=
-mfused-madd [enabled]
-mglibc [enabled]
-mhard-float [enabled]
-mieee-fp [enabled]
-mincoming-stack-boundary=
-minline-all-stringops [disabled]
-minline-stringops-dynamically [disabled]
-mintel-syntax [disabled]
-mlarge-data-threshold=
-mmmx [disabled]
-mms-bitfields [disabled]
-mno-align-stringops [disabled]
-mno-fancy-math-387 [disabled]
-mno-fused-madd [disabled]
-mno-push-args [disabled]
-mno-red-zone [disabled]
-mno-sse4 [enabled]
-momit-leaf-frame-pointer [disabled]
-mpc
-mpclmul [disabled]
-mpopcnt [disabled]
-mpreferred-stack-boundary=
-mpush-args [enabled]
-mrecip [disabled]
-mred-zone [enabled]
-mregparm=
-mrtd [disabled]
-msahf [enabled]
-msoft-float [disabled]
-msse [disabled]
-msse2 [disabled]
-msse2avx [disabled]
-msse3 [disabled]
-msse4 [disabled]
-msse4.1 [disabled]
-msse4.2 [disabled]
-msse4a [disabled]
-msse5 [disabled]
-msseregparm [disabled]
-mssse3 [disabled]
-mstack-arg-probe [disabled]
-mstackrealign [enabled]
-mstringop-strategy=
-mtls-dialect=
-mtls-direct-seg-refs [enabled]
-mtune= core2
-muclibc [disabled]
-mveclibabi=
COLLECT_GCC_OPTIONS='-v' '-Q' '-fhelp=target'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../x86_64-pc-linux-gnu/bin/as -V -Qy -o /tmp/ccDvaYrJ.o /tmp/ccbUC7gd.s
GNU assembler version 2.20.1 (x86_64-pc-linux-gnu) using BFD version (GNU Binutils) 2.20.1.20100303
103904lksd etc # |
...I feel like I'm being cheated if this processor supports all of these things and they are not being used. I like to compile everything optimized to my hardware to the extent possible. |
|
Back to top |
|
|
farrenheit n00b
Joined: 20 Jun 2010 Posts: 29
|
Posted: Sun Jun 26, 2011 12:33 am Post subject: |
|
|
Well I looked around more and found someone mention the flag
to check for detailed compile options when generating assembly code (using -S).
It does look like SSE and MMX are being used:
Code: | .file "CODE.c"
# GNU C (Gentoo 4.4.5 p1.2, pie-0.4.5) version 4.4.5 (x86_64-pc-linux-gnu)
# compiled by GNU C version 4.4.5, GMP version 4.3.2, MPFR version 3.0.0-p3.
# GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
# options passed: CODE.c -D_FORTIFY_SOURCE=2 -march=core2 -mcx16 -msahf
# --param l1-cache-size=32 --param l1-cache-line-size=64 --param
# l2-cache-size=4096 -mtune=core2 -auxbase-strip OUTG3 -O3 -fverbose-asm
# options enabled: -falign-loops -fargument-alias
# -fasynchronous-unwind-tables -fauto-inc-dec -fbranch-count-reg
# -fcaller-saves -fcommon -fcprop-registers -fcrossjumping
# -fcse-follow-jumps -fdefer-pop -fdelete-null-pointer-checks
# -fdwarf2-cfi-asm -fearly-inlining -feliminate-unused-debug-types
# -fexpensive-optimizations -fforward-propagate -ffunction-cse -fgcse
# -fgcse-after-reload -fgcse-lm -fguess-branch-probability -fident
# -fif-conversion -fif-conversion2 -findirect-inlining -finline
# -finline-functions -finline-functions-called-once
# -finline-small-functions -fipa-cp -fipa-cp-clone -fipa-pure-const
# -fipa-reference -fira-share-save-slots -fira-share-spill-slots -fivopts
# -fkeep-static-consts -fleading-underscore -fmath-errno -fmerge-constants
# -fmerge-debug-strings -fmove-loop-invariants -fomit-frame-pointer
# -foptimize-register-move -foptimize-sibling-calls -fpeephole -fpeephole2
# -fpredictive-commoning -freg-struct-return -fregmove -freorder-blocks
# -freorder-functions -frerun-cse-after-loop -fsched-interblock
# -fsched-spec -fsched-stalled-insns-dep -fschedule-insns2 -fsigned-zeros
# -fsplit-ivs-in-unroller -fsplit-wide-types -fstrict-aliasing
# -fstrict-overflow -fthread-jumps -ftoplevel-reorder -ftrapping-math
# -ftree-builtin-call-dce -ftree-ccp -ftree-ch -ftree-copy-prop
# -ftree-copyrename -ftree-cselim -ftree-dce -ftree-dominator-opts
# -ftree-dse -ftree-fre -ftree-loop-im -ftree-loop-ivcanon
# -ftree-loop-optimize -ftree-parallelize-loops= -ftree-pre -ftree-reassoc
# -ftree-scev-cprop -ftree-sink -ftree-sra -ftree-switch-conversion
# -ftree-ter -ftree-vect-loop-version -ftree-vectorize -ftree-vrp
# -funit-at-a-time -funswitch-loops -funwind-tables -fvect-cost-model
# -fverbose-asm -fzero-initialized-in-bss -m128bit-long-double -m64 -m80387
# -maccumulate-outgoing-args -malign-stringops -mcx16 -mfancy-math-387
# -mfp-ret-in-387 -mfused-madd -mglibc -mieee-fp -mmmx -mno-sse4
# -mpush-args -mred-zone -msahf -msse -msse2 -msse3 -mssse3
# -mtls-direct-seg-refs
|
The second-to-last line shows those options being used. Not sure why the --help=target method listed these as disabled. Anyone know? |
|
Back to top |
|
|
Etal Veteran
Joined: 15 Jul 2005 Posts: 1931
|
Posted: Sun Jun 26, 2011 12:45 am Post subject: |
|
|
I remember reading about it somewhere that the help is misleading, but I can't remember the explanation or where I read it.
The only thing I could find was this wiki page saying that, as well as this one with a better way to see what gets enabled. _________________ “And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010 |
|
Back to top |
|
|
farrenheit n00b
Joined: 20 Jun 2010 Posts: 29
|
Posted: Sun Jun 26, 2011 12:59 am Post subject: |
|
|
Thanks Etal. Very informative links. |
|
Back to top |
|
|
Etal Veteran
Joined: 15 Jul 2005 Posts: 1931
|
|
Back to top |
|
|
cach0rr0 Bodhisattva
Joined: 13 Nov 2008 Posts: 4123 Location: Houston, Republic of Texas
|
Posted: Thu Sep 22, 2011 4:27 pm Post subject: |
|
|
That's what I, apparently badly, tried to explain here: https://forums.gentoo.org/viewtopic-t-895104.html#6820104
namely, this bit:
Quote: |
from there, time to lookup what that specific march value supports
|
explained a bit better by the fella in that thread you posted:
Quote: |
I assume you are asking whether the code will use SSE instructions if
appropriate. Yes, it will, because you specified -march with a
processor that supports SSE.
|
_________________ Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash |
|
Back to top |
|
|
|