linux-fixed-code.s 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /* Linux fixed code userspace ABI
  2. Copyright (C) 2005-2022 Free Software Foundation, Inc.
  3. Contributed by Analog Devices, Inc.
  4. This file is part of simulators.
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  15. /* For more info, see this page:
  16. http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:fixed-code */
  17. .text
  18. .align 16
  19. _sigreturn_stub:
  20. P0 = 173;
  21. EXCPT 0;
  22. 0: JUMP.S 0b;
  23. .align 16
  24. _atomic_xchg32:
  25. R0 = [P0];
  26. [P0] = R1;
  27. rts;
  28. .align 16
  29. _atomic_cas32:
  30. R0 = [P0];
  31. CC = R0 == R1;
  32. IF !CC JUMP 1f;
  33. [P0] = R2;
  34. 1:
  35. rts;
  36. .align 16
  37. _atomic_add32:
  38. R1 = [P0];
  39. R0 = R1 + R0;
  40. [P0] = R0;
  41. rts;
  42. .align 16
  43. _atomic_sub32:
  44. R1 = [P0];
  45. R0 = R1 - R0;
  46. [P0] = R0;
  47. rts;
  48. .align 16
  49. _atomic_ior32:
  50. R1 = [P0];
  51. R0 = R1 | R0;
  52. [P0] = R0;
  53. rts;
  54. .align 16
  55. _atomic_and32:
  56. R1 = [P0];
  57. R0 = R1 & R0;
  58. [P0] = R0;
  59. rts;
  60. .align 16
  61. _atomic_xor32:
  62. R1 = [P0];
  63. R0 = R1 ^ R0;
  64. [P0] = R0;
  65. rts;
  66. .align 16
  67. _safe_user_instruction:
  68. NOP; NOP; NOP; NOP;
  69. EXCPT 0x4;