2 * Definitions for the FPU register names
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
8 * Copyright (C) 1995, 1999 Ralf Baechle
9 * Copyright (C) 1985 MIPS Computer Systems, Inc.
10 * Copyright (C) 1990 - 1992, 1999 Silicon Graphics, Inc.
12 #ifndef _ASM_FPREGDEF_H
13 #define _ASM_FPREGDEF_H
15 #include <asm/sgidefs.h>
18 * starting with binutils 2.24.51.20140729, MIPS binutils warn about mixing
19 * hardfloat and softfloat object files. The kernel build uses soft-float by
20 * default, so we also need to pass -msoft-float along to GAS if it supports it.
21 * But this in turn causes assembler errors in files which access hardfloat
22 * registers. We detect if GAS supports "-msoft-float" in the Makefile and
23 * explicitly put ".set hardfloat" where floating point registers are touched.
25 #ifdef GAS_HAS_SET_HARDFLOAT
26 #define SET_HARDFLOAT .set hardfloat
31 #if _MIPS_SIM == _MIPS_SIM_ABI32
34 * These definitions only cover the R3000-ish 16/32 register model.
35 * But we're trying to be R3000 friendly anyway ...
37 #define fv0 $f0 /* return value */
41 #define fa0 $f12 /* argument registers */
45 #define ft0 $f4 /* caller saved */
57 #define fs0 $f20 /* callee saved */
70 #define fcr31 $31 /* FPU status register */
72 #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
74 #if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32
76 #define fv0 $f0 /* return value */
78 #define fa0 $f12 /* argument registers */
86 #define ft0 $f4 /* caller saved */
100 #define fs0 $f24 /* callee saved */
111 #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 */
113 #endif /* _ASM_FPREGDEF_H */