Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
AMD E-450 APU with march=native
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Lirion
n00b
n00b


Joined: 28 May 2013
Posts: 6

PostPosted: Tue May 28, 2013 9:21 am    Post subject: AMD E-450 APU with march=native Reply with quote

Hey there!

this is my first post (for years I read silently some hints and advices from this board [with the help of google finding the right posts]), but today I have my first own questions and hope that someone can help me out.

I have a Gentoo amd64 installation with a AMD E-450 APU and gcc 4.7.3. Like in the installation manual mentioned I and configured march=native in the cflags. Today after some playing with the command gcc -march=native -Q --help=target I find out that all sse flags are disabled?

I think thats a bug - or not?

Code:
 
gcc -march=native -Q --help=target | grep sse
  -mno-sse4                         [enabled]
  -msse                             [disabled]
  -msse2                            [disabled]
  -msse2avx                         [disabled]
  -msse3                            [disabled]
  -msse4                            [disabled]
  -msse4.1                          [disabled]
  -msse4.2                          [disabled]
  -msse4a                           [disabled]
  -msse5                            
  -msseregparm                      [disabled]
  -mssse3                           [disabled]

Complete output on pastebin http://pastebin.com/mpUGjjQz


Code:
cat /proc/cpuinfo | grep sse

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 pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc extd_apicid aperfmperf pni monitor ssse3 cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch ibs skinit wdt arat hw_pstate npt lbrv svm_lock nrip_save pausefilter


My flags in make.conf
Code:
CFLAGS="-march=native -O2 -pipe"
CXXFLAGS="${CFLAGS}"
Back to top
View user's profile Send private message
Veldrin
Veteran
Veteran


Joined: 27 Jul 2004
Posts: 1945
Location: Zurich, Switzerland

PostPosted: Tue May 28, 2013 10:39 am    Post subject: Reply with quote

have a look at the -march line: btver1

which according to the gcc man page superseed all those sse flags - which are therefore disabled.
Code:
           btver1
               AMD Family 14h core based CPUs with x86-64 instruction set support.  (This supersets MMX, SSE, SSE2, SSE3, SSSE3,
               SSE4A, CX16, ABM and 64-bit instruction set extensions.)

_________________
read the portage output!
If my answer is too concise, ask for an explanation.
Back to top
View user's profile Send private message
Lirion
n00b
n00b


Joined: 28 May 2013
Posts: 6

PostPosted: Tue May 28, 2013 10:49 am    Post subject: Reply with quote

So the options are set internally and were never shown?

edit: found a solution

compile a test source with the flags
Code:
gcc -fverbose-asm -S test.c


now i can see all options:

Code:
# GNU C (Gentoo 4.7.3 p1.0, pie-0.5.5) version 4.7.3 (x86_64-pc-linux-gnu)
#   compiled by GNU C version 4.7.3, GMP version 5.1.1, MPFR version 3.1.2, MPC version 1.0.1
# warning: GMP header version 5.1.1 differs from library version 5.1.2.
# GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
# angegebene Optionen:  code.c -march=btver1 -mcx16 -msahf -mno-movbe
# -mno-aes -mno-pclmul -mpopcnt -mabm -mno-lwp -mno-fma -mno-fma4 -mno-xop
# -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1
# -mlzcnt -mno-rdrnd -mno-f16c -mno-fsgsbase --param l1-cache-size=32
# --param l1-cache-line-size=64 --param l2-cache-size=512 -mtune=btver1
# -fverbose-asm
# angeschaltete Optionen:  -fasynchronous-unwind-tables -fauto-inc-dec
# -fbranch-count-reg -fcommon -fdebug-types-section
# -fdelete-null-pointer-checks -fdwarf2-cfi-asm -fearly-inlining
# -feliminate-unused-debug-types -ffunction-cse -fgcse-lm -fgnu-runtime
# -fident -finline-atomics -fira-share-save-slots -fira-share-spill-slots
# -fivopts -fkeep-static-consts -fleading-underscore -fmath-errno
# -fmerge-debug-strings -fmove-loop-invariants -fpeephole
# -fprefetch-loop-arrays -freg-struct-return
# -fsched-critical-path-heuristic -fsched-dep-count-heuristic
# -fsched-group-heuristic -fsched-interblock -fsched-last-insn-heuristic
# -fsched-rank-heuristic -fsched-spec -fsched-spec-insn-heuristic
# -fsched-stalled-insns-dep -fshow-column -fsigned-zeros
# -fsplit-ivs-in-unroller -fstrict-volatile-bitfields -ftrapping-math
# -ftree-cselim -ftree-forwprop -ftree-loop-if-convert -ftree-loop-im
# -ftree-loop-ivcanon -ftree-loop-optimize -ftree-parallelize-loops=
# -ftree-phiprop -ftree-pta -ftree-reassoc -ftree-scev-cprop
# -ftree-slp-vectorize -ftree-vect-loop-version -funit-at-a-time
# -funwind-tables -fvect-cost-model -fverbose-asm -fzero-initialized-in-bss
# -m128bit-long-double -m64 -m80387 -mabm -maccumulate-outgoing-args
# -malign-stringops -mcx16 -mfancy-math-387 -mfp-ret-in-387 -mglibc
# -mieee-fp -mlzcnt -mmmx -mno-sse4 -mpopcnt -mpush-args -mred-zone -msahf
# -msse -msse2 -msse3 -msse4a -mssse3 -mtls-direct-seg-refs

   .section   .rodata
.LC0:
   .string   "Test"
   .text
   .globl   main
   .type   main, @function
main:
.LFB0:
   .cfi_startproc
   pushq   %rbp   #
   .cfi_def_cfa_offset 16
   .cfi_offset 6, -16
   movq   %rsp, %rbp   #,
   .cfi_def_cfa_register 6
   movl   $.LC0, %edi   #,
   movl   $0, %eax   #,
   call   printf   #
   movl   $0, %eax   #, D.2211
   popq   %rbp   #
   .cfi_def_cfa 7, 8
   ret
   .cfi_endproc
.LFE0:
   .size   main, .-main
   .ident   "GCC: (Gentoo 4.7.3 p1.0, pie-0.5.5) 4.7.3"
   .section   .note.GNU-stack,"",@progbits
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5769

PostPosted: Tue May 28, 2013 6:22 pm    Post subject: Reply with quote

I use this line for figuring out what -march=native does:
Code:
echo $(gcc -v -march=native -x c /dev/null 2>&1 | grep /dev/null | egrep -o -- '-+(m|param )\S+')

On my E450 that gives:
Code:
-march=btver1 -mcx16 -msahf -mno-movbe -mno-aes -mno-pclmul -mpopcnt -mabm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mlzcnt -mno-rdrnd -mno-f16c -mno-fsgsbase --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=512 -mtune=btver1
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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