Andreas,
* config/rs6000/driver-rs6000.c (detect_caches_freebsd): New
function.
(detect_processor_freebsd): Likewise.
(host_detect_local_cpu): Call newly added functions for FreeBSD.
+ l1_line = 32;
+ l1_sizekb = 32;
+ l1_assoc = 0;
+ l2_sizekb = 512;
+
+ return describe_cache (l1_sizekb / 1024, l1_line, l1_assoc,
+ l2_sizekb / 1024);
This patch is okay in concept, but the l1_size and l2_size values are in kb,
so they should not be divided by 1024 again.
You also might consider doing the same as detect_caches_linux(), which
computes a cache, but then clears the string after the call because no cache
information is returned:
#elif defined (__linux__)
cache = detect_caches_linux ();
/* PPC Linux does not provide any cache information yet. */
cache = "";