kvm_fpu.h 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. * This program is free software; you can redistribute it and/or modify
  3. * it under the terms of the GNU General Public License, version 2, as
  4. * published by the Free Software Foundation.
  5. *
  6. * This program is distributed in the hope that it will be useful,
  7. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. * GNU General Public License for more details.
  10. *
  11. * You should have received a copy of the GNU General Public License
  12. * along with this program; if not, write to the Free Software
  13. * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  14. *
  15. * Copyright Novell Inc. 2010
  16. *
  17. * Authors: Alexander Graf <agraf@suse.de>
  18. */
  19. #ifndef __ASM_KVM_FPU_H__
  20. #define __ASM_KVM_FPU_H__
  21. #include <linux/types.h>
  22. extern void fps_fres(u64 *fpscr, u32 *dst, u32 *src1);
  23. extern void fps_frsqrte(u64 *fpscr, u32 *dst, u32 *src1);
  24. extern void fps_fsqrts(u64 *fpscr, u32 *dst, u32 *src1);
  25. extern void fps_fadds(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2);
  26. extern void fps_fdivs(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2);
  27. extern void fps_fmuls(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2);
  28. extern void fps_fsubs(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2);
  29. extern void fps_fmadds(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2,
  30. u32 *src3);
  31. extern void fps_fmsubs(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2,
  32. u32 *src3);
  33. extern void fps_fnmadds(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2,
  34. u32 *src3);
  35. extern void fps_fnmsubs(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2,
  36. u32 *src3);
  37. extern void fps_fsel(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2,
  38. u32 *src3);
  39. #define FPD_ONE_IN(name) extern void fpd_ ## name(u64 *fpscr, u32 *cr, \
  40. u64 *dst, u64 *src1);
  41. #define FPD_TWO_IN(name) extern void fpd_ ## name(u64 *fpscr, u32 *cr, \
  42. u64 *dst, u64 *src1, u64 *src2);
  43. #define FPD_THREE_IN(name) extern void fpd_ ## name(u64 *fpscr, u32 *cr, \
  44. u64 *dst, u64 *src1, u64 *src2, u64 *src3);
  45. extern void fpd_fcmpu(u64 *fpscr, u32 *cr, u64 *src1, u64 *src2);
  46. extern void fpd_fcmpo(u64 *fpscr, u32 *cr, u64 *src1, u64 *src2);
  47. FPD_ONE_IN(fsqrts)
  48. FPD_ONE_IN(frsqrtes)
  49. FPD_ONE_IN(fres)
  50. FPD_ONE_IN(frsp)
  51. FPD_ONE_IN(fctiw)
  52. FPD_ONE_IN(fctiwz)
  53. FPD_ONE_IN(fsqrt)
  54. FPD_ONE_IN(fre)
  55. FPD_ONE_IN(frsqrte)
  56. FPD_ONE_IN(fneg)
  57. FPD_ONE_IN(fabs)
  58. FPD_TWO_IN(fadds)
  59. FPD_TWO_IN(fsubs)
  60. FPD_TWO_IN(fdivs)
  61. FPD_TWO_IN(fmuls)
  62. FPD_TWO_IN(fcpsgn)
  63. FPD_TWO_IN(fdiv)
  64. FPD_TWO_IN(fadd)
  65. FPD_TWO_IN(fmul)
  66. FPD_TWO_IN(fsub)
  67. FPD_THREE_IN(fmsubs)
  68. FPD_THREE_IN(fmadds)
  69. FPD_THREE_IN(fnmsubs)
  70. FPD_THREE_IN(fnmadds)
  71. FPD_THREE_IN(fsel)
  72. FPD_THREE_IN(fmsub)
  73. FPD_THREE_IN(fmadd)
  74. FPD_THREE_IN(fnmsub)
  75. FPD_THREE_IN(fnmadd)
  76. extern void kvm_cvt_fd(u32 *from, u64 *to);
  77. extern void kvm_cvt_df(u64 *from, u32 *to);
  78. #endif