This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] restore bootstrap powerpc-unknown-freebsd on trunk


Hi David,

David Edelsohn wrote:
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.

Thank you, c&p error. Fixed.


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 = "";

Hm, I already do this:


   cache = detect_caches_darwin ();
+#elif defined (__FreeBSD__)
+  cache = detect_caches_freebsd ();
+  /* FreeBSD PPC does not provide any cache information yet.  */
+  cache = "";
 #elif defined (__linux__)

This looks okay with that correction.

Thank you again.


Will retest and commit to both, 4.3 and trunk.

Andreas


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]