From: Matthew Dillon Date: Sun, 25 Dec 2011 22:02:24 +0000 (-0800) Subject: gcc-4.4: Add workaround for probable AMD cpu bug X-Git-Tag: v3.0.0~276 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/b14414d0dc0d39da553e7e5c16576218f2815f23 gcc-4.4: Add workaround for probable AMD cpu bug * Add a workaround to add a nop to the end of gcc-4.4's fill_sons_in_loop() function just prior to its return (to its multi-register pop and ret sequence). This works around what appears to be a aMD cpu bug in contemporary AMD cpus. --- diff --git a/contrib/gcc-4.4/gcc/cfgloop.c b/contrib/gcc-4.4/gcc/cfgloop.c index e74284e898..48f0c71112 100644 --- a/contrib/gcc-4.4/gcc/cfgloop.c +++ b/contrib/gcc-4.4/gcc/cfgloop.c @@ -35,6 +35,9 @@ along with GCC; see the file COPYING3. If not see #include "pointer-set.h" #include "output.h" #include "ggc.h" +#ifdef __DragonFly__ +#include +#endif static void flow_loops_cfg_dump (FILE *); @@ -861,6 +864,9 @@ fill_sons_in_loop (const struct loop *loop, basic_block bb, if (postpone) fill_sons_in_loop (loop, postpone, tovisit, tv); +#ifdef __AMDCPUBUG_DFLY01_AVAILABLE__ + cpu_amdcpubug_dfly01(); +#endif } /* Gets body of a LOOP (that must be different from the outermost loop)