4
0

riscv64imac-unknown-none-elf-s.s 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. .text
  2. .attribute 4, 16
  3. .attribute 5, "rv64i2p0_m2p0_a2p0_c2p0"
  4. .file "5194e8m2dkkkh98p"
  5. .section .init,"ax",@progbits
  6. .globl _start
  7. _start:
  8. .option push
  9. .option norelax
  10. .Ltmp0:
  11. auipc ra, %pcrel_hi(.Ltmp1)
  12. ld ra, %pcrel_lo(.Ltmp0)(ra)
  13. ret
  14. .p2align 3
  15. .Ltmp1:
  16. .quad _abs_start
  17. .option pop
  18. _abs_start:
  19. .cfi_startproc
  20. .cfi_undefined ra
  21. csrwi sie, 0
  22. csrwi sip, 0
  23. li ra, 0
  24. li sp, 0
  25. li gp, 0
  26. li tp, 0
  27. li t0, 0
  28. li t1, 0
  29. li t2, 0
  30. li s0, 0
  31. li s1, 0
  32. li a3, 0
  33. li a4, 0
  34. li a5, 0
  35. li a6, 0
  36. li a7, 0
  37. li s2, 0
  38. li s3, 0
  39. li s4, 0
  40. li s5, 0
  41. li s6, 0
  42. li s7, 0
  43. li s8, 0
  44. li s9, 0
  45. li s10, 0
  46. li s11, 0
  47. li t3, 0
  48. li t4, 0
  49. li t5, 0
  50. li t6, 0
  51. .option push
  52. .option norelax
  53. .Lpcrel_hi0:
  54. auipc gp, %pcrel_hi(__global_pointer$)
  55. addi gp, gp, %pcrel_lo(.Lpcrel_hi0)
  56. .option pop
  57. mv t2, a0
  58. lui t0, %hi(_max_hart_id)
  59. addi t0, t0, %lo(_max_hart_id)
  60. bltu t0, t2, abort
  61. .Lpcrel_hi1:
  62. auipc sp, %pcrel_hi(_stack_start)
  63. addi sp, sp, %pcrel_lo(.Lpcrel_hi1)
  64. lui t0, %hi(_hart_stack_size)
  65. addi t0, t0, %lo(_hart_stack_size)
  66. mul t0, t2, t0
  67. sub sp, sp, t0
  68. mv s0, sp
  69. j _start_rust
  70. .cfi_endproc
  71. .section .trap,"ax",@progbits
  72. .globl default_start_trap
  73. default_start_trap:
  74. addi sp, sp, -128
  75. sd ra, 0(sp)
  76. sd t0, 8(sp)
  77. sd t1, 16(sp)
  78. sd t2, 24(sp)
  79. sd t3, 32(sp)
  80. sd t4, 40(sp)
  81. sd t5, 48(sp)
  82. sd t6, 56(sp)
  83. sd a0, 64(sp)
  84. sd a1, 72(sp)
  85. sd a2, 80(sp)
  86. sd a3, 88(sp)
  87. sd a4, 96(sp)
  88. sd a5, 104(sp)
  89. sd a6, 112(sp)
  90. sd a7, 120(sp)
  91. mv a0, sp
  92. jal _start_trap_rust
  93. ld ra, 0(sp)
  94. ld t0, 8(sp)
  95. ld t1, 16(sp)
  96. ld t2, 24(sp)
  97. ld t3, 32(sp)
  98. ld t4, 40(sp)
  99. ld t5, 48(sp)
  100. ld t6, 56(sp)
  101. ld a0, 64(sp)
  102. ld a1, 72(sp)
  103. ld a2, 80(sp)
  104. ld a3, 88(sp)
  105. ld a4, 96(sp)
  106. ld a5, 104(sp)
  107. ld a6, 112(sp)
  108. ld a7, 120(sp)
  109. addi sp, sp, 128
  110. sret
  111. .section .text.abort,"ax",@progbits
  112. .globl abort
  113. abort:
  114. j abort