fpu-nofpu-low.S 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* MN10300 Low level FPU management operations
  2. *
  3. * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
  4. * Written by David Howells (dhowells@redhat.com)
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public Licence
  8. * as published by the Free Software Foundation; either version
  9. * 2 of the Licence, or (at your option) any later version.
  10. */
  11. #include <linux/linkage.h>
  12. #include <asm/cpu-regs.h>
  13. #include <asm/smp.h>
  14. #include <asm/thread_info.h>
  15. #include <asm/asm-offsets.h>
  16. #include <asm/frame.inc>
  17. ###############################################################################
  18. #
  19. # void fpu_disabled(void)
  20. # - handle an exception due to the FPU being disabled
  21. # when CONFIG_FPU is disabled
  22. #
  23. ###############################################################################
  24. .type fpu_disabled,@function
  25. .globl fpu_disabled
  26. fpu_disabled:
  27. add -4,sp
  28. SAVE_ALL
  29. mov -1,d0
  30. mov d0,(REG_ORIG_D0,fp)
  31. and ~EPSW_NMID,epsw
  32. mov fp,d0
  33. call unexpected_fpu_exception[],0
  34. jmp ret_from_exception
  35. .size fpu_disabled,.-fpu_disabled