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
19 * Licensed under the MIT license. See LICENSE file in the project root for full license information.
25 #include "mono/utils/mono-hwcap.h"
27 static gboolean hwcap_inited = FALSE;
30 mono_hwcap_init (void)
32 const char *verbose = g_getenv ("MONO_VERBOSE_HWCAP");
33 const char *conservative = g_getenv ("MONO_CONSERVATIVE_HWCAP");
38 #ifdef MONO_CROSS_COMPILE
40 * If we're cross-compiling, we want to be as
41 * conservative as possible so that we produce
42 * code that's portable. Default to that.
48 if (!conservative || strncmp (conservative, "1", 1))
49 mono_hwcap_arch_init ();
51 if (verbose && !strncmp (verbose, "1", 1))
52 mono_hwcap_print (stdout);