aboutsummaryrefslogtreecommitdiff
path: root/soft-fp/soft-fp.h
diff options
context:
space:
mode:
Diffstat (limited to 'soft-fp/soft-fp.h')
-rw-r--r--soft-fp/soft-fp.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/soft-fp/soft-fp.h b/soft-fp/soft-fp.h
index 1eafcb433d..f93a94182b 100644
--- a/soft-fp/soft-fp.h
+++ b/soft-fp/soft-fp.h
@@ -51,6 +51,17 @@
# endif
#endif
+/* In the Linux kernel, some architectures have a single function that
+ uses different kinds of unpacking and packing depending on the
+ instruction being emulated, meaning it is not readily visible to
+ the compiler that variables from _FP_DECL and _FP_FRAC_DECL_*
+ macros are only used in cases where they were initialized. */
+#ifdef __KERNEL__
+# define _FP_ZERO_INIT = 0
+#else
+# define _FP_ZERO_INIT
+#endif
+
#define _FP_WORKBITS 3
#define _FP_WORK_LSB ((_FP_W_TYPE) 1 << 3)
#define _FP_WORK_ROUND ((_FP_W_TYPE) 1 << 2)