about summary refs log tree commit diff
path: root/sysdeps/loongarch/fpu_control.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/loongarch/fpu_control.h')
-rw-r--r--sysdeps/loongarch/fpu_control.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/sysdeps/loongarch/fpu_control.h b/sysdeps/loongarch/fpu_control.h
index 1cccc933a5..f482395dba 100644
--- a/sysdeps/loongarch/fpu_control.h
+++ b/sysdeps/loongarch/fpu_control.h
@@ -51,6 +51,17 @@
 
 #include <features.h>
 
+#ifdef __loongarch_soft_float
+
+#define _FPU_RESERVED 0xffffffff
+#define _FPU_DEFAULT 0x00000000
+typedef unsigned int fpu_control_t;
+#define _FPU_GETCW(cw) (cw) = 0
+#define _FPU_SETCW(cw) (void) (cw)
+extern fpu_control_t __fpu_control;
+
+#else /* __loongarch_soft_float */
+
 /* Masks for interrupts.  */
 #define _FPU_MASK_V 0x10 /* Invalid operation */
 #define _FPU_MASK_Z 0x08 /* Division by zero  */
@@ -86,4 +97,6 @@ extern void __loongarch_fpu_setcw (fpu_control_t) __THROW;
 /* Default control word set at startup.  */
 extern fpu_control_t __fpu_control;
 
+#endif /* __loongarch_soft_float */
+
 #endif /* fpu_control.h */