diff options
author | Maciej W. Rozycki <macro@codesourcery.com> | 2013-02-27 23:45:07 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@codesourcery.com> | 2013-02-27 23:45:07 +0000 |
commit | 43301bd3c281036ba97eef384c9340cc7b6130d3 (patch) | |
tree | 263f0cc7e01c33c72e626480a52b2bfc1dce78f0 /ports/sysdeps/mips/fpu_control.h | |
parent | 85bd816a603a437aedeb688a60a3e0dba4439c50 (diff) | |
download | glibc-43301bd3c281036ba97eef384c9340cc7b6130d3.tar glibc-43301bd3c281036ba97eef384c9340cc7b6130d3.tar.gz glibc-43301bd3c281036ba97eef384c9340cc7b6130d3.tar.bz2 glibc-43301bd3c281036ba97eef384c9340cc7b6130d3.zip |
Add support for building as MIPS16 code.
Diffstat (limited to 'ports/sysdeps/mips/fpu_control.h')
-rw-r--r-- | ports/sysdeps/mips/fpu_control.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ports/sysdeps/mips/fpu_control.h b/ports/sysdeps/mips/fpu_control.h index 30e54f9c3a..6aecb3bc8b 100644 --- a/ports/sysdeps/mips/fpu_control.h +++ b/ports/sysdeps/mips/fpu_control.h @@ -99,8 +99,15 @@ extern fpu_control_t __fpu_control; typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__))); /* Macros for accessing the hardware control word. */ -#define _FPU_GETCW(cw) __asm__ volatile ("cfc1 %0,$31" : "=r" (cw)) -#define _FPU_SETCW(cw) __asm__ volatile ("ctc1 %0,$31" : : "r" (cw)) +extern fpu_control_t __mips_fpu_getcw (void) __THROW; +extern void __mips_fpu_setcw (fpu_control_t) __THROW; +#ifdef __mips16 +# define _FPU_GETCW(cw) do { (cw) = __mips_fpu_getcw (); } while (0) +# define _FPU_SETCW(cw) __mips_fpu_setcw (cw) +#else +# define _FPU_GETCW(cw) __asm__ volatile ("cfc1 %0,$31" : "=r" (cw)) +# define _FPU_SETCW(cw) __asm__ volatile ("ctc1 %0,$31" : : "r" (cw)) +#endif /* Default control word set at startup. */ extern fpu_control_t __fpu_control; |