fpregdef.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /*
  2. * Definitions for the FPU register names
  3. *
  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
  6. * for more details.
  7. *
  8. * Copyright (C) 1995, 1999 Ralf Baechle
  9. * Copyright (C) 1985 MIPS Computer Systems, Inc.
  10. * Copyright (C) 1990 - 1992, 1999 Silicon Graphics, Inc.
  11. */
  12. #ifndef _ASM_FPREGDEF_H
  13. #define _ASM_FPREGDEF_H
  14. #include <asm/sgidefs.h>
  15. /*
  16. * starting with binutils 2.24.51.20140729, MIPS binutils warn about mixing
  17. * hardfloat and softfloat object files. The kernel build uses soft-float by
  18. * default, so we also need to pass -msoft-float along to GAS if it supports it.
  19. * But this in turn causes assembler errors in files which access hardfloat
  20. * registers. We detect if GAS supports "-msoft-float" in the Makefile and
  21. * explicitly put ".set hardfloat" where floating point registers are touched.
  22. */
  23. #ifdef GAS_HAS_SET_HARDFLOAT
  24. #define SET_HARDFLOAT .set hardfloat
  25. #else
  26. #define SET_HARDFLOAT
  27. #endif
  28. #if _MIPS_SIM == _MIPS_SIM_ABI32
  29. /*
  30. * These definitions only cover the R3000-ish 16/32 register model.
  31. * But we're trying to be R3000 friendly anyway ...
  32. */
  33. #define fv0 $f0 /* return value */
  34. #define fv0f $f1
  35. #define fv1 $f2
  36. #define fv1f $f3
  37. #define fa0 $f12 /* argument registers */
  38. #define fa0f $f13
  39. #define fa1 $f14
  40. #define fa1f $f15
  41. #define ft0 $f4 /* caller saved */
  42. #define ft0f $f5
  43. #define ft1 $f6
  44. #define ft1f $f7
  45. #define ft2 $f8
  46. #define ft2f $f9
  47. #define ft3 $f10
  48. #define ft3f $f11
  49. #define ft4 $f16
  50. #define ft4f $f17
  51. #define ft5 $f18
  52. #define ft5f $f19
  53. #define fs0 $f20 /* callee saved */
  54. #define fs0f $f21
  55. #define fs1 $f22
  56. #define fs1f $f23
  57. #define fs2 $f24
  58. #define fs2f $f25
  59. #define fs3 $f26
  60. #define fs3f $f27
  61. #define fs4 $f28
  62. #define fs4f $f29
  63. #define fs5 $f30
  64. #define fs5f $f31
  65. #define fcr31 $31 /* FPU status register */
  66. #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
  67. #if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32
  68. #define fv0 $f0 /* return value */
  69. #define fv1 $f2
  70. #define fa0 $f12 /* argument registers */
  71. #define fa1 $f13
  72. #define fa2 $f14
  73. #define fa3 $f15
  74. #define fa4 $f16
  75. #define fa5 $f17
  76. #define fa6 $f18
  77. #define fa7 $f19
  78. #define ft0 $f4 /* caller saved */
  79. #define ft1 $f5
  80. #define ft2 $f6
  81. #define ft3 $f7
  82. #define ft4 $f8
  83. #define ft5 $f9
  84. #define ft6 $f10
  85. #define ft7 $f11
  86. #define ft8 $f20
  87. #define ft9 $f21
  88. #define ft10 $f22
  89. #define ft11 $f23
  90. #define ft12 $f1
  91. #define ft13 $f3
  92. #define fs0 $f24 /* callee saved */
  93. #define fs1 $f25
  94. #define fs2 $f26
  95. #define fs3 $f27
  96. #define fs4 $f28
  97. #define fs5 $f29
  98. #define fs6 $f30
  99. #define fs7 $f31
  100. #define fcr31 $31
  101. #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 */
  102. #endif /* _ASM_FPREGDEF_H */