Base compiler and amdfam10 - anybody/anything? (fwd)

Vladimir Kushnir vkushnir at
Mon Nov 21 07:23:08 UTC 2011

Sorry for crossposting but since no one on hackers@ seems to be 

---------- Forwarded message ----------
Date: Wed, 16 Nov 2011 12:30:35 +0200 (EET)
From: Vladimir Kushnir <vkushnir at>
To: hackers at
Subject: Base compiler and amdfam10 - anybody/anything?

Are there any attempts to bring to -CURRENT newer AMD chips support? 
Personally, I've just tried to apply the patches from openSUSE's gcc-4.2.1 
SRPM. With slight adaptation they've applied and gave rather significant boost 
in resulting code speed. At least, testfcpy by Alexander Konovalenko 
( gave me ~20% (!) speedup with 
-march=amdfam10 compared to our -march=athlon64-sse3 on Phenom II 970.
Unfortunately, the patched compiler with -march=amdfam10 fails in buildworld 
("internal compiler error"'s while compiling clang). The buildworld was 
successful with patched compiler and -march=athlon64-sse3 but since this is my 
main working system... Well, I had to come back to our unpatched compiler :-(
If anyone is interested, the patches were taken from 
gcc42-4.2.1_20070724-17.src.rpm (actually, I applied all the patches marked as 
AMD stuff), the resulting patches towards our src/contrib/gcc and 
share/mk/ are attached (or I can send them by email), and I am quite 
ready to test what comes out of it.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-amdfam10.diff.gz
Type: application/octet-stream
Size: 25179 bytes
Url :
-------------- next part --------------
A non-text attachment was scrubbed...
Type: application/octet-stream
Size: 480 bytes
Url :

More information about the freebsd-questions mailing list