18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci * Definitions for the FPU register names
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public
58c2ecf20Sopenharmony_ci * License.  See the file "COPYING" in the main directory of this archive
68c2ecf20Sopenharmony_ci * for more details.
78c2ecf20Sopenharmony_ci *
88c2ecf20Sopenharmony_ci * Copyright (C) 1995, 1999 Ralf Baechle
98c2ecf20Sopenharmony_ci * Copyright (C) 1985 MIPS Computer Systems, Inc.
108c2ecf20Sopenharmony_ci * Copyright (C) 1990 - 1992, 1999 Silicon Graphics, Inc.
118c2ecf20Sopenharmony_ci */
128c2ecf20Sopenharmony_ci#ifndef _ASM_FPREGDEF_H
138c2ecf20Sopenharmony_ci#define _ASM_FPREGDEF_H
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci#include <asm/sgidefs.h>
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci/*
188c2ecf20Sopenharmony_ci * starting with binutils 2.24.51.20140729, MIPS binutils warn about mixing
198c2ecf20Sopenharmony_ci * hardfloat and softfloat object files.  The kernel build uses soft-float by
208c2ecf20Sopenharmony_ci * default, so we also need to pass -msoft-float along to GAS if it supports it.
218c2ecf20Sopenharmony_ci * But this in turn causes assembler errors in files which access hardfloat
228c2ecf20Sopenharmony_ci * registers.  We detect if GAS supports "-msoft-float" in the Makefile and
238c2ecf20Sopenharmony_ci * explicitly put ".set hardfloat" where floating point registers are touched.
248c2ecf20Sopenharmony_ci */
258c2ecf20Sopenharmony_ci#ifdef GAS_HAS_SET_HARDFLOAT
268c2ecf20Sopenharmony_ci#define SET_HARDFLOAT .set hardfloat
278c2ecf20Sopenharmony_ci#else
288c2ecf20Sopenharmony_ci#define SET_HARDFLOAT
298c2ecf20Sopenharmony_ci#endif
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci#if _MIPS_SIM == _MIPS_SIM_ABI32
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci/*
348c2ecf20Sopenharmony_ci * These definitions only cover the R3000-ish 16/32 register model.
358c2ecf20Sopenharmony_ci * But we're trying to be R3000 friendly anyway ...
368c2ecf20Sopenharmony_ci */
378c2ecf20Sopenharmony_ci#define fv0	$f0	 /* return value */
388c2ecf20Sopenharmony_ci#define fv0f	$f1
398c2ecf20Sopenharmony_ci#define fv1	$f2
408c2ecf20Sopenharmony_ci#define fv1f	$f3
418c2ecf20Sopenharmony_ci#define fa0	$f12	 /* argument registers */
428c2ecf20Sopenharmony_ci#define fa0f	$f13
438c2ecf20Sopenharmony_ci#define fa1	$f14
448c2ecf20Sopenharmony_ci#define fa1f	$f15
458c2ecf20Sopenharmony_ci#define ft0	$f4	 /* caller saved */
468c2ecf20Sopenharmony_ci#define ft0f	$f5
478c2ecf20Sopenharmony_ci#define ft1	$f6
488c2ecf20Sopenharmony_ci#define ft1f	$f7
498c2ecf20Sopenharmony_ci#define ft2	$f8
508c2ecf20Sopenharmony_ci#define ft2f	$f9
518c2ecf20Sopenharmony_ci#define ft3	$f10
528c2ecf20Sopenharmony_ci#define ft3f	$f11
538c2ecf20Sopenharmony_ci#define ft4	$f16
548c2ecf20Sopenharmony_ci#define ft4f	$f17
558c2ecf20Sopenharmony_ci#define ft5	$f18
568c2ecf20Sopenharmony_ci#define ft5f	$f19
578c2ecf20Sopenharmony_ci#define fs0	$f20	 /* callee saved */
588c2ecf20Sopenharmony_ci#define fs0f	$f21
598c2ecf20Sopenharmony_ci#define fs1	$f22
608c2ecf20Sopenharmony_ci#define fs1f	$f23
618c2ecf20Sopenharmony_ci#define fs2	$f24
628c2ecf20Sopenharmony_ci#define fs2f	$f25
638c2ecf20Sopenharmony_ci#define fs3	$f26
648c2ecf20Sopenharmony_ci#define fs3f	$f27
658c2ecf20Sopenharmony_ci#define fs4	$f28
668c2ecf20Sopenharmony_ci#define fs4f	$f29
678c2ecf20Sopenharmony_ci#define fs5	$f30
688c2ecf20Sopenharmony_ci#define fs5f	$f31
698c2ecf20Sopenharmony_ci
708c2ecf20Sopenharmony_ci#define fcr31	$31	 /* FPU status register */
718c2ecf20Sopenharmony_ci
728c2ecf20Sopenharmony_ci#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
738c2ecf20Sopenharmony_ci
748c2ecf20Sopenharmony_ci#if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32
758c2ecf20Sopenharmony_ci
768c2ecf20Sopenharmony_ci#define fv0	$f0	/* return value */
778c2ecf20Sopenharmony_ci#define fv1	$f2
788c2ecf20Sopenharmony_ci#define fa0	$f12	/* argument registers */
798c2ecf20Sopenharmony_ci#define fa1	$f13
808c2ecf20Sopenharmony_ci#define fa2	$f14
818c2ecf20Sopenharmony_ci#define fa3	$f15
828c2ecf20Sopenharmony_ci#define fa4	$f16
838c2ecf20Sopenharmony_ci#define fa5	$f17
848c2ecf20Sopenharmony_ci#define fa6	$f18
858c2ecf20Sopenharmony_ci#define fa7	$f19
868c2ecf20Sopenharmony_ci#define ft0	$f4	/* caller saved */
878c2ecf20Sopenharmony_ci#define ft1	$f5
888c2ecf20Sopenharmony_ci#define ft2	$f6
898c2ecf20Sopenharmony_ci#define ft3	$f7
908c2ecf20Sopenharmony_ci#define ft4	$f8
918c2ecf20Sopenharmony_ci#define ft5	$f9
928c2ecf20Sopenharmony_ci#define ft6	$f10
938c2ecf20Sopenharmony_ci#define ft7	$f11
948c2ecf20Sopenharmony_ci#define ft8	$f20
958c2ecf20Sopenharmony_ci#define ft9	$f21
968c2ecf20Sopenharmony_ci#define ft10	$f22
978c2ecf20Sopenharmony_ci#define ft11	$f23
988c2ecf20Sopenharmony_ci#define ft12	$f1
998c2ecf20Sopenharmony_ci#define ft13	$f3
1008c2ecf20Sopenharmony_ci#define fs0	$f24	/* callee saved */
1018c2ecf20Sopenharmony_ci#define fs1	$f25
1028c2ecf20Sopenharmony_ci#define fs2	$f26
1038c2ecf20Sopenharmony_ci#define fs3	$f27
1048c2ecf20Sopenharmony_ci#define fs4	$f28
1058c2ecf20Sopenharmony_ci#define fs5	$f29
1068c2ecf20Sopenharmony_ci#define fs6	$f30
1078c2ecf20Sopenharmony_ci#define fs7	$f31
1088c2ecf20Sopenharmony_ci
1098c2ecf20Sopenharmony_ci#define fcr31	$31
1108c2ecf20Sopenharmony_ci
1118c2ecf20Sopenharmony_ci#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 */
1128c2ecf20Sopenharmony_ci
1138c2ecf20Sopenharmony_ci#endif /* _ASM_FPREGDEF_H */
114