api.h 505 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * In-kernel FPU support functions
  3. *
  4. * Copyright IBM Corp. 2015
  5. * Author(s): Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
  6. */
  7. #ifndef _ASM_S390_FPU_API_H
  8. #define _ASM_S390_FPU_API_H
  9. void save_fpu_regs(void);
  10. static inline int test_fp_ctl(u32 fpc)
  11. {
  12. u32 orig_fpc;
  13. int rc;
  14. asm volatile(
  15. " efpc %1\n"
  16. " sfpc %2\n"
  17. "0: sfpc %1\n"
  18. " la %0,0\n"
  19. "1:\n"
  20. EX_TABLE(0b,1b)
  21. : "=d" (rc), "=&d" (orig_fpc)
  22. : "d" (fpc), "0" (-EINVAL));
  23. return rc;
  24. }
  25. #endif /* _ASM_S390_FPU_API_H */