Safe Cflags/AMD

K6
CHOST="i586-pc-linux-gnu" CFLAGS="-march=k6 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"

K6-2
vendor_id : AuthenticAMD cpu family : 5 model : 8

CHOST="i586-pc-linux-gnu" CFLAGS="-march=k6-2 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"

processor      : 0 vendor_id      : AuthenticAMD cpu family     : 5 model          : 8 model name     : AMD-K6(tm) 3D processor stepping       : 12 cpu MHz        : 451.031 cache size     : 64 KB fdiv_bug        : no hlt_bug         : no f00f_bug        : no coma_bug        : no fpu             : yes fpu_exception  : yes cpuid level    : 1 wp             : yes flags          : fpu vme de pse tsc msr mce cx8 pge mmx syscall 3dnow k6_mtrr up bogomips        : 902.84 clflush size   : 32

Geode LX
processor      : 0 vendor_id      : AuthenticAMD cpu family     : 5 model          : 10 model name     : Geode(TM) Integrated Processor by AMD PCS stepping       : 2 cpu MHz        : 498.044 cache size     : 128 KB fdiv_bug        : no hlt_bug         : no f00f_bug        : no coma_bug        : no fpu             : yes fpu_exception  : yes cpuid level    : 1 wp             : yes flags          : fpu de pse tsc msr cx8 sep pge cmov clflush mmx mmxext 3dnowext 3dnow bogomips       : 996.08 clflush size   : 32

CHOST="i486-pc-linux-gnu" CFLAGS="-march=k6-2 -Os -mmmx -m3dnow -fno-align-jumps -fno-align-functions -fno-align-labels -fno-align-loops -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"

GCC 4.3+: CHOST="i486-pc-linux-gnu" CFLAGS="-march=geode -Os -mmmx -m3dnow -fno-align-jumps -fno-align-functions -fno-align-labels -fno-align-loops -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"

Geode GX1
processor      : 0 vendor_id      : Geode by NSC cpu family     : 5 model          : 9 model name     : Geode(TM) Integrated Processor by National Semi stepping       : 2 cpu MHz        : 300.640 cache size     : 16 KB fdiv_bug        : no hlt_bug         : no f00f_bug        : no coma_bug        : no fpu             : yes fpu_exception  : yes cpuid level    : 2 wp             : yes flags          : fpu tsc msr cx8 cmov mmx cxmmx bogomips       : 601.28 clflush size   : 32 cache_alignment : 32 address sizes  : 32 bits physical, 32 bits virtual power management:

CHOST="i586-pc-linux-gnu" CFLAGS="-march=pentium-mmx -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"

K6-3
CHOST="i586-pc-linux-gnu" CFLAGS="-march=k6-3 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"

Duron
From 600 to 900 MHz. These models have a tbird-alike core model.

product: AMD Duron(tm) Processor version: 6.3.1 CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-tbird -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"

Mobile Duron
vendor_id : AuthenticAMD cpu family : 6 model : 3 model name : AMD Duron(tm) Processor

CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-tbird -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"

Duron Morgan
From 900 to 1300 MHz. The Morgan Durons are based on the Palomino core, and hence can be treated as Athlon XP's. vendor_id : AuthenticAMD cpu family : 6 model : 7 model name : AMD Duron(tm) Processor stepping : 1

CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"

Athlon
vendor_id : AuthenticAMD cpu family : 6 model : 8 or 4 or 2 or 1 model name : AMD Athlon(TM)Processor or AMD-K7(TM)Processor stepping : 4 or 2 or 1

processor      : 0 vendor_id      : AuthenticAMD cpu family     : 6 model          : 4 model name     : AMD Athlon(tm) Processor stepping       : 2 cpu MHz        : 850.068 cache size     : 256 KB fdiv_bug        : no hlt_bug         : no f00f_bug        : no coma_bug        : no fpu             : yes fpu_exception  : yes cpuid level    : 1 wp             : yes flags          : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr syscall mmxext 3dnowext 3dnow up bogomips        : 1702.02 clflush size   : 32

CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"

Athlon Thunderbird
vendor_id : AuthenticAMD cpu family : 6 model : 4 model name : AMD Athlon(tm) Processor

CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-tbird -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"

Athlon (Palomino) XP/Duron
vendor_id : AuthenticAMD cpu family : 6 model : 8 model name : AMD Athlon(tm)

CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"

Sempron 2400+ (2000MHz) is also identified as cpu family:6 model:8 model_name:AMD Sempron(TM) 2400+ (256kB cache). The Duron 1800+ is also included in this list.

processor      : 0 vendor_id      : AuthenticAMD cpu family     : 6 model          : 8 model name     : AMD Sempron(tm)   2400+ stepping       : 1 cpu MHz        : 1659.979 cache size     : 256 KB fdiv_bug        : no hlt_bug         : no f00f_bug        : no coma_bug        : no fpu             : yes fpu_exception  : yes cpuid level    : 1 wp             : yes flags          : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mp                  mmxext 3dnowext 3dnow up ts bogomips        : 3328.55 clflush size   : 32

Athlon 4
CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-4 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"

Athlon XP/Geode NX
vendor_id : AuthenticAMD cpu family : 6 model : 6 or 8 stepping : 2 Some CPUs have also been observed with the following: model : 10 model name : AMD Athlon(tm) XP 2500+ stepping : 0

CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-4 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"

processor      : 0 vendor_id      : AuthenticAMD cpu family     : 6 model          : 6 model name     : AMD Athlon(tm) XP 2000+ stepping       : 2 cpu MHz        : 1670.597 cache size     : 256 KB fdiv_bug        : no hlt_bug         : no f00f_bug        : no coma_bug        : no fpu             : yes fpu_exception  : yes cpuid level    : 1 wp             : yes flags          : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow up ts bogomips       : 3343.54

processor      : 0 vendor_id      : AuthenticAMD cpu family     : 6 model          : 8 model name     : AMD Geode NX 1750 stepping       : 1 cpu MHz        : 1400.115 cache size     : 256 KB fdiv_bug        : no hlt_bug         : no f00f_bug        : no coma_bug        : no fpu             : yes fpu_exception  : yes cpuid level    : 1 wp             : yes flags          : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mp                  mmxext 3dnowext 3dnow up ts fid vid bogomips       : 2801.55 clflush size   : 32

Athlon MP
vendor_id : AuthenticAMD cpu family : 6 model : 10 model name : AMD Sempron(tm) stepping : 0

CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-mp -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"

Athlon 64
32 bit: CHOST="i686-pc-linux-gnu" CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"

64 bit: CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -O2 -pipe" CXXFLAGS="${CFLAGS}"

cpu family :15 model :4 model name :AMD Athlon(tm) 64 Processor 3200+ stepping :8

processor      : 0 vendor_id      : AuthenticAMD cpu family     : 15 model          : 95 model name     : AMD Athlon(tm) 64 Processor 3200+ stepping       : 2 cpu MHz        : 1000.000 cache size     : 512 KB fpu             : yes fpu_exception  : yes cpuid level    : 1 wp             : yes 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 rdtscp lm 3dnowext 3dnow up extd_apicid pni cx16 lahf_lm svm extapic cr8_legacy bogomips       : 2009.51 TLB size       : 1024 4K pages clflush size   : 64 cache_alignment : 64 address sizes  : 40 bits physical, 48 bits virtual power management: ts fid vid ttp

Athlon 64 X2
vendor_id: AuthenticAMD cpu family: 15 model: 35, 43, 75 or 107 stepping: 1 or 2 model name: AMD Athlon(tm) 64 X2 Dual Core Processor

32 bit: CHOST="i686-pc-linux-gnu" CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"

64 bit: CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -O2 -pipe" CXXFLAGS="${CFLAGS}"

processor      : 0 vendor_id      : AuthenticAMD cpu family     : 15 model          : 43 model name     : AMD Athlon(tm)64 X2 Dual Core Processor  4200+ stepping       : 1 cpu MHz        : 2200.000 cache size     : 512 KB physical id     : 0 siblings       : 2 core id        : 0 cpu cores      : 2 fpu            : yes fpu_exception  : yes cpuid level    : 1 wp             : yes 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 lm 3dnowext 3dnow rep_good pni lahf_lm cmp_legacy bogomips       : 4424.71 TLB size       : 1024 4K pages clflush size   : 64 cache_alignment : 64 address sizes  : 40 bits physical, 48 bits virtual power management: ts fid vid ttp

processor      : 1 vendor_id      : AuthenticAMD cpu family     : 15 model          : 43 model name     : AMD Athlon(tm)64 X2 Dual Core Processor  4200+ stepping       : 1 cpu MHz        : 2200.000 cache size     : 512 KB physical id     : 0 siblings       : 2 core id        : 1 cpu cores      : 2 fpu            : yes fpu_exception  : yes cpuid level    : 1 wp             : yes 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 lm 3dnowext 3dnow rep_good pni lahf_lm cmp_legacy bogomips       : 4424.71 TLB size       : 1024 4K pages clflush size   : 64 cache_alignment : 64 address sizes  : 40 bits physical, 48 bits virtual power management: ts fid vid ttp

If you have a newer Athlon64("Venice" or "San Diego")/Athlon64-X2("Manchester", "Toledo", or "Windsor") (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.

If you're having gcc-4.3+ and "pni" in flags, you may want to use -march=k8-sse3 instead of -march=k8. You can take out the -msse3 by doing this.

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.

There are some socket AM2+ Athlon processors which are Phenom based (Athlon X2 7550, Athlon X2 7750, Athlon X2 7850). Look below.

1xx Opteron
vendor_id : AuthenticAMD cpu family : 15 model : 5 model name : AMD Opteron(tm) Processor 1xx stepping : 8

32-bit: CHOST="i686-pc-linux-gnu" CFLAGS="-O2 -march=opteron -msse3 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"

64-bit: CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=opteron -O2 -pipe" CXXFLAGS="${CFLAGS}"

socket 939, single core: processor      : 0 vendor_id      : AuthenticAMD cpu family     : 15 model          : 39 model name     : AMD Opteron(tm) Processor 144 stepping       : 1 cpu MHz        : 1800.000 cache size     : 1024 KB fpu             : yes fpu_exception  : yes cpuid level    : 1 wp             : yes 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 bogomips       : 3593.50 TLB size       : 1024 4K pages clflush size   : 64 cache_alignment : 64 address sizes  : 40 bits physical, 48 bits virtual power management: ts fid vid ttp

socket 939, dual core: processor      : [0 | 1] vendor_id      : AuthenticAMD cpu family     : 15 model          : 35 model name     : Dual Core AMD Opteron(tm) Processor 180 stepping       : 2 cpu MHz        : 1000.000 cache size     : 1024 KB physical id     : 0 siblings       : 2 core id        : [0 | 1] cpu cores      : 2 apicid         : [0 | 1] initial apicid : [0 | 1] fdiv_bug       : no hlt_bug         : no f00f_bug        : no coma_bug        : no fpu             : yes fpu_exception  : yes cpuid level    : 1 wp             : yes 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 lm 3dnowext 3dnow pni lahf_lm cmp_legacy bogomips       : 2006.23 clflush size   : 64 power management: ts fid vid ttp

2xx/8xx Opteron
vendor_id : AuthenticAMD cpu family : 15 model : 5 model name : AMD Opteron(tm) Processor xxx stepping : 8

CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=opteron -O2 -pipe" CXXFLAGS="${CFLAGS}"

22xx Dual-Core Opteron
vendor_id : AuthenticAMD cpu family : 15 model : 65 model name : Dual-Core AMD Opteron(tm) Processor 22xx stepping : 2

CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=opteron -O2 -pipe" CXXFLAGS="${CFLAGS}"

processor      : 0 vendor_id      : AuthenticAMD cpu family     : 15 model          : 65 model name     : Dual-Core AMD Opteron(tm) Processor 2212 HE stepping        : 3 cpu MHz        : 2010.298 cache size     : 1024 KB physical id     : 0 siblings       : 1 core id        : 0 cpu cores      : 1 fpu            : yes fpu_exception  : yes cpuid level    : 1 wp             : yes flags          : fpu tsc msr pae mce cx8 apic mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8_legacy bogomips       : 4022.18 TLB size       : 1024 4K pages clflush size   : 64 cache_alignment : 64 address sizes  : 40 bits physical, 48 bits virtual power management: ts fid vid ttp tm stc

23xx Quad-Core Barcelona
vendor_id : AuthenticAMD cpu family : 16 model : 2 model name : Quad-Core AMD Opteron(tm) Processor 23xx stepping : 10

CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -O2 -pipe" CXXFLAGS="${CFLAGS}"

processor      : 0 vendor_id      : AuthenticAMD cpu family     : 16 model          : 2 model name     : Quad-Core AMD Opteron(tm) Processor 2354 stepping       : 3 cpu MHz        : 2200.000 cache size     : 512 KB physical id     : 0 siblings       : 4 core id        : 0 cpu cores      : 4 fpu            : yes fpu_exception  : yes cpuid level    : 5 wp             : yes 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 3dnowext 3dnow constant_tsc rep_good pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs bogomips       : 4402.66 TLB size       : 1024 4K pages clflush size   : 64 cache_alignment : 64 address sizes  : 48 bits physical, 48 bits virtual power management: ts ttp tm stc 100mhzsteps hwpstate

61xx Eight-Core Magny-Cours
vendor_id : AuthenticAMD cpu family : 16 model     : 9 model name : AMD Opteron(tm) Processor 61xx stepping  : 5

CHOST="x86_64-pc-linux-gnu" CFLAGS="-mtune=amdfam10 -O2 -pipe" CXXFLAGS="${CFLAGS}"

processor	: 0 vendor_id	: AuthenticAMD cpu family	: 16 model		: 9 model name	: AMD Opteron(tm) Processor 6128 stepping	: 1 cpu MHz		: 800.000 cache size	: 512 KB physical id	: 0 siblings	: 8 core id		: 0 cpu cores	: 8 apicid		: 16 initial apicid	: 0 fpu		: yes fpu_exception	: yes cpuid level	: 5 wp		: yes 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 3dnowext 3dnow constant_tsc rep_good nonstop_tsc extd_apicid amd_dcm pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt nodeid_msr npt lbrv svm_lock nrip_save bogomips	: 3999.82 TLB size	: 1024 4K pages clflush size	: 64 cache_alignment	: 64 address sizes	: 48 bits physical, 48 bits virtual power management: ts ttp tm stc 100mhzsteps hwpstate

Athlon X2 7x50, Phenom X3/X4, Phenom II, Athlon II X2/X3/X4, Turion II
See also AMD GCC(>=4.3.0) full and aggressive flags

vendor_id : AuthenticAMD cpu family : 16 model : 2/4/5/6/10 model name : AMD Phenom(tm) xxxx Triple/Quad/Hexa-Core Processor stepping : 2/3/0

CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=amdfam10 -O2 -pipe" CXXFLAGS="${CFLAGS}"

processor      : 0 vendor_id      : AuthenticAMD cpu family     : 16 model          : 6 model name     : AMD Athlon(tm) II X2 240 Processor stepping       : 2 cpu MHz        : 2812.549 cache size     : 1024 KB physical id     : 0 siblings       : 2 core id        : 0 cpu cores      : 2 apicid         : 0 initial apicid : 0 fpu            : yes fpu_exception  : yes cpuid level    : 5 wp             : yes 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 3dnowext 3dnow constant_tsc rep_good nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt npt lbrv svm_lock nrip_save bogomips       : 5625.09 TLB size       : 1024 4K pages clflush size   : 64 cache_alignment : 64 address sizes  : 48 bits physical, 48 bits virtual power management: ts ttp tm stc 100mhzsteps hwpstate processor	: 0 vendor_id	: AuthenticAMD cpu family	: 16 model		: 4 model name	: AMD Phenom(tm) II X3 720 Processor stepping	: 2 cpu MHz		: 2812.378 cache size	: 512 KB physical id	: 0 siblings	: 3 core id		: 0 cpu cores	: 3 apicid		: 0 initial apicid	: 0 fdiv_bug	: no hlt_bug		: no f00f_bug	: no coma_bug	: no fpu		: yes fpu_exception	: yes cpuid level	: 5 wp		: yes 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 3dnowext 3dnow constant_tsc nonstop_tsc pni monitor cx16 lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt bogomips	: 5624.75 clflush size	: 64 power management: ts ttp tm stc 100mhzsteps hwpstate

processor		: 0 vendor_id		: AuthenticAMD cpu family		: 16 model			: 2 model name		: AMD Phenom(tm) 9950 Quad-Core Processor stepping		: 3 cpu MHz		: 2808.614 cache size		: 512 KB physical id		: 0 siblings		: 4 core id		: 0 cpu cores		: 4 apicid			: 0 initial apicid		: 0 fpu			: yes fpu_exception		: yes cpuid level		: 5 wp			: yes 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 3dnowext 3dnow constant_tsc rep_good pni monitor cx16 lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs bogomips		: 5617.22 TLB size		: 1024 4K pages clflush size		: 64 cache_alignment	: 64 address sizes		: 48 bits physical, 48 bits virtual power management	: ts ttp tm stc 100mhzsteps hwpstate

processor	: 0 vendor_id	: AuthenticAMD cpu family	: 16 model		: 5 model name	: AMD Athlon(tm) II X4 630 Processor stepping	: 2 cpu MHz		: 2800.000 cache size	: 512 KB physical id	: 0 siblings	: 4 core id		: 0 cpu cores	: 4 apicid		: 0 initial apicid	: 0 fpu		: yes fpu_exception	: yes cpuid level	: 5 wp		: yes 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 3dnowext 3dnow constant_tsc rep_good nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt bogomips	: 5624.67 TLB size	: 1024 4K pages clflush size	: 64 cache_alignment	: 64 address sizes	: 48 bits physical, 48 bits virtual power management: ts ttp tm stc 100mhzsteps hwpstate

processor      : 0 vendor_id      : AuthenticAMD cpu family     : 16 model          : 4 model name     : AMD Phenom(tm) II X4 945 Processor stepping       : 2 cpu MHz        : 800.000 cache size     : 512 KB physical id     : 0 siblings       : 4 core id        : 0 cpu cores      : 4 apicid         : 0 initial apicid : 0 fpu            : yes fpu_exception  : yes cpuid level    : 5 wp             : yes 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 3dnowext 3dnow constant_tsc rep_good nonstop_tsc extd_apicid pni monitor cx1 6 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowpr efetch osvw ibs skinit wdt npt lbrv svm_lock nrip_save bogomips       : 6026.46 TLB size       : 1024 4K pages clflush size   : 64 cache_alignment : 64 address sizes  : 48 bits physical, 48 bits virtual power management: ts ttp tm stc 100mhzsteps hwpstate

processor      : 0 vendor_id      : AuthenticAMD cpu family     : 16 model          : 10 model name     : AMD Phenom(tm) II X6 1090T Processor stepping       : 0 cpu MHz        : 800.000 cache size     : 512 KB physical id     : 0 siblings       : 6 core id        : 0 cpu cores      : 6 apicid         : 0 initial apicid : 0 fpu            : yes fpu_exception  : yes cpuid level    : 6 wp             : yes 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 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid aperfmperf pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt cpb npt lbrv svm_lock nrip_save pausefilter bogomips       : 6400.13 TLB size       : 1024 4K pages clflush size   : 64 cache_alignment : 64 address sizes  : 48 bits physical, 48 bits virtual power management: ts ttp tm stc 100mhzsteps hwpstate [9] processor	: 0 vendor_id	: AuthenticAMD cpu family	: 16 model		: 5 model name	: AMD Athlon(tm) II X4 640 Processor stepping	: 3 microcode	: 0x10000b6 cpu MHz		: 800.000 cache size	: 512 KB physical id	: 0 siblings	: 4 core id		: 0 cpu cores	: 4 apicid		: 0 initial apicid	: 0 fpu		: yes fpu_exception	: yes cpuid level	: 5 wp		: yes 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 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt npt lbrv svm_lock nrip_save bogomips	: 6026.95 TLB size	: 1024 4K pages clflush size	: 64 cache_alignment	: 64 address sizes	: 48 bits physical, 48 bits virtual power management: ts ttp tm stc 100mhzsteps hwpstate

Sempron / Sempron64 /Sempron Family WirNet

 * If it is a Socket A (Socket 462) Sempron you can be sure it is neither 64-bit capable nor SSE2/SSE3 capable as it based on the Athlon XP.
 * If it is a Socket 754 it depends on the stepping (part number):
 * Stepping: CG (Part No.: *AX) or D0 (Part No.: *BA) have neither SSE3 nor AMD64
 * Stepping: E3 (Part No.: *BO) has SSE3
 * Stepping: E6 (Part No.: *BX) has SSE3 and AMD64
 * For other steppings better check the flags.
 * Anyway you should check /proc/cpuinfo for pni (SSE3) string before using -msse3.
 * Since GCC 4.3.0 you can use -march=k8-sse3 instead -msse3. GCC 4.3.0 - Intel 386 and AMD x86-64 Options
 * Also check /proc/cpuinfo for lm (Long mode) to see if supports 64-bit.
 * If it is a Socket AM2 Sempron you can be sure it is both 64-bit and SSE3 capable.
 * If it is a Socket AM3 Sempron (e.g. Sempron 140), it is based on the AMD Phenom and is thus 64-bit capable and has SSE3 and SSE4a.

vendor_id : AuthenticAMD cpu family : 15 model : 44 model name : AMD Sempron(tm) Processor

32 bit (Socket A): CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"

64 bit (Socket 754): CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -O2 -pipe" CXXFLAGS="${CFLAGS}"

64 bit (Socket 754/AM2, SSE3 capable): CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -msse3 -O2 -pipe" CXXFLAGS="${CFLAGS}"

processor      : 0 vendor_id      : AuthenticAMD cpu family     : 16 model          : 6 model name     : AMD Sempron(tm) 140 Processor stepping       : 2 cpu MHz        : 800.000 cache size     : 1024 KB fdiv_bug        : no hlt_bug         : no f00f_bug        : no coma_bug        : no fpu             : yes fpu_exception  : yes cpuid level    : 5 wp             : yes flags          : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse 36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dno w constant_tsc up rep_good nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt bogomips       : 5399.21 TLB size       : 1024 4K pages clflush size   : 64 cache_alignment : 64 address sizes  : 48 bits physical, 48 bits virtual power management: ts ttp tm stc 100mhzsteps hwpstate

64-bit (Socket AM3): CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=amdfam10 -O2 -pipe" CXXFLAGS="${CFLAGS}"

Turion64 / X2 / Ultra /Sempron
32 bit: CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -msse3 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"

64 bit: CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -msse3 -O2 -pipe" CXXFLAGS="${CFLAGS}"

Mobile Sempron
vendor_id : AuthenticAMD cpu family : 15 model : 8 model name : Mobile AMD Sempron Processor 2800+

32 bit: CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -msse3 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"

64 bit: CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -msse3 -O2 -pipe" CXXFLAGS="${CFLAGS}"

If you have a Sempron without SSE3 (earlier chips), omit "-msse3". SSE3 is called pni (prescott new instuction) by cpuinfo (cat /proc/cpuinfo).

Check it out, there are many different sempron mobile CPUs on sale, those that work at 1.8GHz are K8 (i.e. AMD SM 3000+), some others, older, aren't yet k8 but they're still k7 so you must specify athlon-xp instead of athlon64, anyway AMD announced in 2006 there will be 64bit Sempron Mobile CPUs so be carefull and pay attention, run a cat /proc/cpuinfo and then ask on AMD forums if you don't know what to do.

processor      : 0 vendor_id      : AuthenticAMD cpu family     : 15 model          : 44 model name     : Mobile AMD Sempron(tm) Processor 3000+ stepping       : 2 cpu MHz        : 1800.000 cache size     : 128 KB fdiv_bug        : no hlt_bug         : no f00f_bug        : no coma_bug        : no fpu             : yes fpu_exception  : yes cpuid level    : 1 wp             : yes 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 3dnowext 3dnow pni lahf_lm ts fid vid ttp tm stc bogomips       : 3602.19 clflush size   : 64

C-30, C-50, C-60, E-350, E-450 series
vendor_id      : AuthenticAMD cpu family     : 20 model          : 1 model name     : AMD E-350 Processor

vendor_id      : AuthenticAMD cpu family     : 20 model          : 1 model name     : AMD E-350 Processor stepping       : 0 cpu MHz        : 1600.000 cache size     : 512 KB physical id     : 0 siblings       : 2 core id        : 0 cpu cores      : 2 apicid         : 0 initial apicid : 0 fdiv_bug       : no hlt_bug         : no f00f_bug        : no coma_bug        : no fpu             : yes fpu_exception  : yes cpuid level    : 6 wp             : yes 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 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 npt lbrv svm_lock nrip_save pausefilter bogomips       : 3199.94 clflush size   : 64 cache_alignment : 64 address sizes  : 36 bits physical, 48 bits virtual power management: ts ttp tm stc 100mhzsteps hwpstate

CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=btver1 -mtune=btver1" CXXFLAGS="${CFLAGS}"

CHOST="i686-pc-linux-gnu" CFLAGS="-march=btver1 -mtune=btver1" CXXFLAGS="${CFLAGS}"

A4/A6/A8-XXXX (Llano)
processor	: 1 vendor_id	: AuthenticAMD cpu family	: 18 model		: 1 model name	: AMD A4-3300M APU with Radeon(tm) HD Graphics stepping	: 0 cpu MHz		: 1896.622 cache size	: 1024 KB physical id	: 0 siblings	: 2 core id		: 1 cpu cores	: 2 apicid		: 1 initial apicid	: 1 fpu		: yes fpu_exception	: yes cpuid level	: 6 wp		: yes 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 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid aperfmperf pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt arat cpb npt lbrv svm_lock nrip_save pausefilter bogomips	: 3792.47 TLB size	: 1536 4K pages clflush size	: 64 cache_alignment	: 64 address sizes	: 40 bits physical, 48 bits virtual power management: ts ttp tm stc 100mhzsteps hwpstate [9]

CFLAGS="-O2 -march=amdfam10 -mcx16 -mpopcnt -pipe" CXXFLAGS="${CFLAGS}" CHOST="x86_64-pc-linux-gnu" USE="3dnow 3dnowext mmx mmxext sse sse2 sse3 sse4a"

FX-8xxx/6xxx/4xxx (Bulldozer)
vendor_id      : AuthenticAMD cpu family     : 21 model          : 1 model name     : AMD FX(tm)-8120 Eight-Core Processor

vendor_id      : AuthenticAMD cpu family     : 21 model          : 1 model name     : AMD FX(tm)-8120 Eight-Core Processor stepping       : 2 cpu MHz        : 3100.256 cache size     : 2048 KB physical id     : 0 siblings       : 8 core id        : 7 cpu cores      : 4 apicid         : 23 initial apicid : 7 fpu            : yes fpu_exception  : yes cpuid level    : 13 wp             : yes 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 pclmulqdq monitor ssse3 cx16 sse4_1 sse4_2 popcnt aes xsave avx lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 nodeid_msr topoext perfctr_core arat cpb npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold bogomips       : 6200.26 TLB size       : 1536 4K pages clflush size   : 64 cache_alignment : 64 address sizes  : 48 bits physical, 48 bits virtual power management: ts ttp tm 100mhzsteps hwpstate [9]

CFLAGS="-O2 -pipe -march=bdver1 -mno-movbe -mno-fma -mno-bmi -mno-tbm --param l1-cache-size=16 --param l1-cache-line-size=64 --param l2-cache-size=2048 -mtune=bdver1" CXXFLAGS="${CFLAGS}" CHOST="x86_64-pc-linux-gnu"

please note that march=bdver1 or mtune=bdver1 is only supported by gcc v.4.6.2 and up

Bezpečné Cflagy/AMD Cflags sûr/AMD Bezpieczne CFLAGS/AMD Güvenli Cflags Değerleri/AMD