Fork of the vendor (Boundary Devices) u-boot for Reform 2, with minor tweaks. The goal is to migrate to mainstream u-boot or barebox ASAP. The main impediment so far is the 4GB RAM config.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
 
 

226 lines
5.4 KiB

  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 1995, 1997, 2007-2013 Free Software Foundation, Inc.
  4. */
  5. /* ANSI concatenation macros. */
  6. #define CONCAT1(a, b) CONCAT2(a, b)
  7. #define CONCAT2(a, b) a ## b
  8. /* Use the right prefix for global labels. */
  9. #define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
  10. #ifndef WORKING_ASSEMBLER
  11. #define abs_l abs
  12. #define asl_l asl
  13. #define mov_l mov
  14. #endif
  15. #define FUNC(X) .type SYM(X),@function
  16. #define HIDDEN_FUNC(X) FUNC(X)` .hidden X
  17. #define ENDFUNC0(X) .Lfe_##X: .size X,.Lfe_##X-X
  18. #define ENDFUNC(X) ENDFUNC0(X)
  19. .section .text
  20. .align 4
  21. .global SYM(__st_r13_to_r15)
  22. .global SYM(__st_r13_to_r16)
  23. .global SYM(__st_r13_to_r17)
  24. .global SYM(__st_r13_to_r18)
  25. .global SYM(__st_r13_to_r19)
  26. .global SYM(__st_r13_to_r20)
  27. .global SYM(__st_r13_to_r21)
  28. .global SYM(__st_r13_to_r22)
  29. .global SYM(__st_r13_to_r23)
  30. .global SYM(__st_r13_to_r24)
  31. .global SYM(__st_r13_to_r25)
  32. HIDDEN_FUNC(__st_r13_to_r15)
  33. HIDDEN_FUNC(__st_r13_to_r16)
  34. HIDDEN_FUNC(__st_r13_to_r17)
  35. HIDDEN_FUNC(__st_r13_to_r18)
  36. HIDDEN_FUNC(__st_r13_to_r19)
  37. HIDDEN_FUNC(__st_r13_to_r20)
  38. HIDDEN_FUNC(__st_r13_to_r21)
  39. HIDDEN_FUNC(__st_r13_to_r22)
  40. HIDDEN_FUNC(__st_r13_to_r23)
  41. HIDDEN_FUNC(__st_r13_to_r24)
  42. HIDDEN_FUNC(__st_r13_to_r25)
  43. .align 4
  44. SYM(__st_r13_to_r25):
  45. st r25, [sp,48]
  46. SYM(__st_r13_to_r24):
  47. st r24, [sp,44]
  48. SYM(__st_r13_to_r23):
  49. st r23, [sp,40]
  50. SYM(__st_r13_to_r22):
  51. st r22, [sp,36]
  52. SYM(__st_r13_to_r21):
  53. st r21, [sp,32]
  54. SYM(__st_r13_to_r20):
  55. st r20, [sp,28]
  56. SYM(__st_r13_to_r19):
  57. st r19, [sp,24]
  58. SYM(__st_r13_to_r18):
  59. st r18, [sp,20]
  60. SYM(__st_r13_to_r17):
  61. st r17, [sp,16]
  62. SYM(__st_r13_to_r16):
  63. st r16, [sp,12]
  64. SYM(__st_r13_to_r15):
  65. #ifdef __ARC700__
  66. st r15, [sp,8] ; minimum function size to avoid stall: 6 bytes.
  67. #else
  68. st_s r15, [sp,8]
  69. #endif
  70. st_s r14, [sp,4]
  71. j_s.d [%blink]
  72. st_s r13, [sp,0]
  73. ENDFUNC(__st_r13_to_r15)
  74. ENDFUNC(__st_r13_to_r16)
  75. ENDFUNC(__st_r13_to_r17)
  76. ENDFUNC(__st_r13_to_r18)
  77. ENDFUNC(__st_r13_to_r19)
  78. ENDFUNC(__st_r13_to_r20)
  79. ENDFUNC(__st_r13_to_r21)
  80. ENDFUNC(__st_r13_to_r22)
  81. ENDFUNC(__st_r13_to_r23)
  82. ENDFUNC(__st_r13_to_r24)
  83. ENDFUNC(__st_r13_to_r25)
  84. .section .text
  85. .align 4
  86. ; ==================================
  87. ; the loads
  88. .global SYM(__ld_r13_to_r15)
  89. .global SYM(__ld_r13_to_r16)
  90. .global SYM(__ld_r13_to_r17)
  91. .global SYM(__ld_r13_to_r18)
  92. .global SYM(__ld_r13_to_r19)
  93. .global SYM(__ld_r13_to_r20)
  94. .global SYM(__ld_r13_to_r21)
  95. .global SYM(__ld_r13_to_r22)
  96. .global SYM(__ld_r13_to_r23)
  97. .global SYM(__ld_r13_to_r24)
  98. .global SYM(__ld_r13_to_r25)
  99. HIDDEN_FUNC(__ld_r13_to_r15)
  100. HIDDEN_FUNC(__ld_r13_to_r16)
  101. HIDDEN_FUNC(__ld_r13_to_r17)
  102. HIDDEN_FUNC(__ld_r13_to_r18)
  103. HIDDEN_FUNC(__ld_r13_to_r19)
  104. HIDDEN_FUNC(__ld_r13_to_r20)
  105. HIDDEN_FUNC(__ld_r13_to_r21)
  106. HIDDEN_FUNC(__ld_r13_to_r22)
  107. HIDDEN_FUNC(__ld_r13_to_r23)
  108. HIDDEN_FUNC(__ld_r13_to_r24)
  109. HIDDEN_FUNC(__ld_r13_to_r25)
  110. SYM(__ld_r13_to_r25):
  111. ld r25, [sp,48]
  112. SYM(__ld_r13_to_r24):
  113. ld r24, [sp,44]
  114. SYM(__ld_r13_to_r23):
  115. ld r23, [sp,40]
  116. SYM(__ld_r13_to_r22):
  117. ld r22, [sp,36]
  118. SYM(__ld_r13_to_r21):
  119. ld r21, [sp,32]
  120. SYM(__ld_r13_to_r20):
  121. ld r20, [sp,28]
  122. SYM(__ld_r13_to_r19):
  123. ld r19, [sp,24]
  124. SYM(__ld_r13_to_r18):
  125. ld r18, [sp,20]
  126. SYM(__ld_r13_to_r17):
  127. ld r17, [sp,16]
  128. SYM(__ld_r13_to_r16):
  129. ld r16, [sp,12]
  130. SYM(__ld_r13_to_r15):
  131. #ifdef __ARC700__
  132. ld r15, [sp,8] ; minimum function size to avoid stall: 6 bytes.
  133. #else
  134. ld_s r15, [sp,8]
  135. #endif
  136. ld_s r14, [sp,4]
  137. j_s.d [%blink]
  138. ld_s r13, [sp,0]
  139. ENDFUNC(__ld_r13_to_r15)
  140. ENDFUNC(__ld_r13_to_r16)
  141. ENDFUNC(__ld_r13_to_r17)
  142. ENDFUNC(__ld_r13_to_r18)
  143. ENDFUNC(__ld_r13_to_r19)
  144. ENDFUNC(__ld_r13_to_r20)
  145. ENDFUNC(__ld_r13_to_r21)
  146. ENDFUNC(__ld_r13_to_r22)
  147. ENDFUNC(__ld_r13_to_r23)
  148. ENDFUNC(__ld_r13_to_r24)
  149. ENDFUNC(__ld_r13_to_r25)
  150. .global SYM(__ld_r13_to_r14_ret)
  151. .global SYM(__ld_r13_to_r15_ret)
  152. .global SYM(__ld_r13_to_r16_ret)
  153. .global SYM(__ld_r13_to_r17_ret)
  154. .global SYM(__ld_r13_to_r18_ret)
  155. .global SYM(__ld_r13_to_r19_ret)
  156. .global SYM(__ld_r13_to_r20_ret)
  157. .global SYM(__ld_r13_to_r21_ret)
  158. .global SYM(__ld_r13_to_r22_ret)
  159. .global SYM(__ld_r13_to_r23_ret)
  160. .global SYM(__ld_r13_to_r24_ret)
  161. .global SYM(__ld_r13_to_r25_ret)
  162. HIDDEN_FUNC(__ld_r13_to_r14_ret)
  163. HIDDEN_FUNC(__ld_r13_to_r15_ret)
  164. HIDDEN_FUNC(__ld_r13_to_r16_ret)
  165. HIDDEN_FUNC(__ld_r13_to_r17_ret)
  166. HIDDEN_FUNC(__ld_r13_to_r18_ret)
  167. HIDDEN_FUNC(__ld_r13_to_r19_ret)
  168. HIDDEN_FUNC(__ld_r13_to_r20_ret)
  169. HIDDEN_FUNC(__ld_r13_to_r21_ret)
  170. HIDDEN_FUNC(__ld_r13_to_r22_ret)
  171. HIDDEN_FUNC(__ld_r13_to_r23_ret)
  172. HIDDEN_FUNC(__ld_r13_to_r24_ret)
  173. HIDDEN_FUNC(__ld_r13_to_r25_ret)
  174. .section .text
  175. .align 4
  176. SYM(__ld_r13_to_r25_ret):
  177. ld r25, [sp,48]
  178. SYM(__ld_r13_to_r24_ret):
  179. ld r24, [sp,44]
  180. SYM(__ld_r13_to_r23_ret):
  181. ld r23, [sp,40]
  182. SYM(__ld_r13_to_r22_ret):
  183. ld r22, [sp,36]
  184. SYM(__ld_r13_to_r21_ret):
  185. ld r21, [sp,32]
  186. SYM(__ld_r13_to_r20_ret):
  187. ld r20, [sp,28]
  188. SYM(__ld_r13_to_r19_ret):
  189. ld r19, [sp,24]
  190. SYM(__ld_r13_to_r18_ret):
  191. ld r18, [sp,20]
  192. SYM(__ld_r13_to_r17_ret):
  193. ld r17, [sp,16]
  194. SYM(__ld_r13_to_r16_ret):
  195. ld r16, [sp,12]
  196. SYM(__ld_r13_to_r15_ret):
  197. ld r15, [sp,8]
  198. SYM(__ld_r13_to_r14_ret):
  199. ld blink,[sp,r12]
  200. ld_s r14, [sp,4]
  201. ld.ab r13, [sp,r12]
  202. j_s.d [%blink]
  203. add_s sp,sp,4
  204. ENDFUNC(__ld_r13_to_r14_ret)
  205. ENDFUNC(__ld_r13_to_r15_ret)
  206. ENDFUNC(__ld_r13_to_r16_ret)
  207. ENDFUNC(__ld_r13_to_r17_ret)
  208. ENDFUNC(__ld_r13_to_r18_ret)
  209. ENDFUNC(__ld_r13_to_r19_ret)
  210. ENDFUNC(__ld_r13_to_r20_ret)
  211. ENDFUNC(__ld_r13_to_r21_ret)
  212. ENDFUNC(__ld_r13_to_r22_ret)
  213. ENDFUNC(__ld_r13_to_r23_ret)
  214. ENDFUNC(__ld_r13_to_r24_ret)
  215. ENDFUNC(__ld_r13_to_r25_ret)