kernel_linkage.c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Kevin D. Kissell, kevink@mips and Carsten Langgaard, carstenl@mips.com
  3. * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved.
  4. *
  5. * This program is free software; you can distribute it and/or modify it
  6. * under the terms of the GNU General Public License (Version 2) as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  12. * for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along
  15. * with this program; if not, write to the Free Software Foundation, Inc.,
  16. * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  17. *
  18. * Routines corresponding to Linux kernel FP context
  19. * manipulation primitives for the Algorithmics MIPS
  20. * FPU Emulator
  21. */
  22. #include <linux/sched.h>
  23. #include <asm/processor.h>
  24. #include <asm/signal.h>
  25. #include <asm/uaccess.h>
  26. #include <asm/fpu.h>
  27. #include <asm/fpu_emulator.h>
  28. #define SIGNALLING_NAN 0x7ff800007ff80000LL
  29. void fpu_emulator_init_fpu(void)
  30. {
  31. static int first = 1;
  32. int i;
  33. if (first) {
  34. first = 0;
  35. printk("Algorithmics/MIPS FPU Emulator v1.5\n");
  36. }
  37. current->thread.fpu.fcr31 = 0;
  38. for (i = 0; i < 32; i++)
  39. set_fpr64(&current->thread.fpu.fpr[i], 0, SIGNALLING_NAN);
  40. }