1
0

arm 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. // ARM7500 support
  2. defn acidinit() // Called after all the init modules are loaded
  3. {
  4. bplist = {};
  5. bpfmt = 'b';
  6. srcpath = {
  7. "./",
  8. "/sys/src/libc/port/",
  9. "/sys/src/libc/9sys/",
  10. "/sys/src/libc/arm/"
  11. };
  12. srcfiles = {}; // list of loaded files
  13. srctext = {}; // the text of the files
  14. }
  15. defn linkreg(addr)
  16. {
  17. return 0;
  18. }
  19. defn stk() // trace
  20. {
  21. _stk(*PC, *SP, 0, 0);
  22. }
  23. defn lstk() // trace with locals
  24. {
  25. _stk(*PC, *SP, 0, 1);
  26. }
  27. defn gpr() // print general purpose registers
  28. {
  29. print("R0\t", *R0, " R1\t", *R1, " R2\t", *R2, "\n");
  30. print("R3\t", *R3, " R4\t", *R4, " R5\t", *R5, "\n");
  31. print("R6\t", *R6, " R7\t", *R7, " R8\t", *R8, "\n");
  32. print("R9\t", *R9, " R10\t", *R10, " R11\t", *R11, "\n");
  33. print("R12\t", *R12, " R13\t", *R13, " R14\t", *R14, "\n");
  34. print("R15\t", *R15, "\n");
  35. }
  36. defn regs() // print all registers
  37. {
  38. gpr();
  39. }
  40. defn pstop(pid)
  41. {
  42. return 0;
  43. }
  44. aggr Ureg
  45. {
  46. 'U' 0 r0;
  47. 'U' 4 r1;
  48. 'U' 8 r2;
  49. 'U' 12 r3;
  50. 'U' 16 r4;
  51. 'U' 20 r5;
  52. 'U' 24 r6;
  53. 'U' 28 r7;
  54. 'U' 32 r8;
  55. 'U' 36 r9;
  56. 'U' 40 r10;
  57. 'U' 44 r11;
  58. 'U' 48 r12;
  59. 'U' 52 r13;
  60. 'U' 56 r14;
  61. 'U' 60 type;
  62. 'U' 64 psr;
  63. 'U' 68 pc;
  64. };
  65. defn
  66. Ureg(addr) {
  67. complex Ureg addr;
  68. print(" r0 ", addr.r0, "\n");
  69. print(" r1 ", addr.r1, "\n");
  70. print(" r2 ", addr.r2, "\n");
  71. print(" r3 ", addr.r3, "\n");
  72. print(" r4 ", addr.r4, "\n");
  73. print(" r5 ", addr.r5, "\n");
  74. print(" r6 ", addr.r6, "\n");
  75. print(" r7 ", addr.r7, "\n");
  76. print(" r8 ", addr.r8, "\n");
  77. print(" r9 ", addr.r9, "\n");
  78. print(" r10 ", addr.r10, "\n");
  79. print(" r11 ", addr.r11, "\n");
  80. print(" r12 ", addr.r12, "\n");
  81. print(" r13 ", addr.r13, "\n");
  82. print(" r14 ", addr.r14, "\n");
  83. print(" type ", addr.type, "\n");
  84. print(" psr ", addr.psr, "\n");
  85. print(" pc ", addr.pc, "\n");
  86. };
  87. defn acornmap()
  88. {
  89. map({"text", _startup, end, 0x20});
  90. }
  91. print("/sys/lib/acid/arm");