2 * mono-hwcap.c: Hardware feature detection
5 * Alex Rønne Petersen (alexrp@xamarin.com)
6 * Elijah Taylor (elijahtaylor@google.com)
7 * Miguel de Icaza (miguel@xamarin.com)
8 * Neale Ferguson (Neale.Ferguson@SoftwareAG-usa.com)
9 * Paolo Molaro (lupus@xamarin.com)
10 * Rodrigo Kumpera (kumpera@gmail.com)
11 * Sebastien Pouliot (sebastien@xamarin.com)
12 * Zoltan Varga (vargaz@xamarin.com)
14 * Copyright 2003 Ximian, Inc.
15 * Copyright 2003-2011 Novell, Inc
16 * Copyright 2006 Broadcom
17 * Copyright 2007-2008 Andreas Faerber
18 * Copyright 2011-2013 Xamarin Inc
24 #include "mono/utils/mono-hwcap.h"
26 static gboolean hwcap_inited = FALSE;
29 mono_hwcap_init (void)
31 const char *verbose = g_getenv ("MONO_VERBOSE_HWCAP");
32 const char *conservative = g_getenv ("MONO_CONSERVATIVE_HWCAP");
37 #ifdef MONO_CROSS_COMPILE
39 * If we're cross-compiling, we want to be as
40 * conservative as possible so that we produce
41 * code that's portable. Default to that.
47 if (!conservative || strncmp (conservative, "1", 1))
48 mono_hwcap_arch_init ();
50 if (verbose && !strncmp (verbose, "1", 1))
51 mono_hwcap_print (stdout);