diff options
author | caiyinyu <caiyinyu@loongson.cn> | 2022-08-22 16:00:51 +0800 |
---|---|---|
committer | caiyinyu <caiyinyu@loongson.cn> | 2022-09-01 09:10:08 +0800 |
commit | 930993921f2f381b545ea1b1f2d9c534b2b72b08 (patch) | |
tree | 1015c0f98c4232af277f7dc56286c5dbc1b652b6 /sysdeps/loongarch/fpu_control.h | |
parent | 1e903124cec4492463d075c6c061a2a772db77bf (diff) | |
download | glibc-930993921f2f381b545ea1b1f2d9c534b2b72b08.tar.gz glibc-930993921f2f381b545ea1b1f2d9c534b2b72b08.tar.xz glibc-930993921f2f381b545ea1b1f2d9c534b2b72b08.zip |
LoongArch: Add soft float support.
Diffstat (limited to 'sysdeps/loongarch/fpu_control.h')
-rw-r--r-- | sysdeps/loongarch/fpu_control.h | 13 |
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 */ |