projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed a few bugs that were found by Visual Studio's static code analysis.
[mono.git]
/
mono
/
utils
/
mono-hwcap-s390x.c
diff --git
a/mono/utils/mono-hwcap-s390x.c
b/mono/utils/mono-hwcap-s390x.c
index baf70bc9295a5e2c713a4f4b4af7be01d61648a2..889df8aebf6816896ef5592ed86f2b5ea8d5c768 100644
(file)
--- a/
mono/utils/mono-hwcap-s390x.c
+++ b/
mono/utils/mono-hwcap-s390x.c
@@
-24,6
+24,12
@@
gboolean mono_hwcap_s390x_has_ld = FALSE;
gboolean mono_hwcap_s390x_has_ld = FALSE;
+#if defined(MONO_CROSS_COMPILE)
+void
+mono_hwcap_arch_init (void)
+{
+}
+#else
static void
catch_sigill (int sig_no, siginfo_t *info, gpointer act)
{
static void
catch_sigill (int sig_no, siginfo_t *info, gpointer act)
{
@@
-31,7
+37,7
@@
catch_sigill (int sig_no, siginfo_t *info, gpointer act)
}
void
}
void
-mono_hwcap_init (void)
+mono_hwcap_
arch_
init (void)
{
mono_hwcap_s390x_has_ld = TRUE;
{
mono_hwcap_s390x_has_ld = TRUE;
@@
-47,7
+53,7
@@
mono_hwcap_init (void)
sigaction (SIGILL, &sa, old_sa);
sigaction (SIGILL, &sa, old_sa);
- __asm__ (
+ __asm__
__volatile__
(
"LGHI\t0,1\n\t"
"LA\t1,%0\n\t"
".byte\t0xe3,0x00,0x10,0x00,0x00,0x50\n\t"
"LGHI\t0,1\n\t"
"LA\t1,%0\n\t"
".byte\t0xe3,0x00,0x10,0x00,0x00,0x50\n\t"
@@
-58,3
+64,10
@@
mono_hwcap_init (void)
sigaction (SIGILL, old_sa, NULL);
}
sigaction (SIGILL, old_sa, NULL);
}
+#endif
+
+void
+mono_hwcap_print (FILE *f)
+{
+ g_fprintf (f, "mono_hwcap_s390x_has_ld = %i\n", mono_hwcap_s390x_has_ld);
+}