program_jun_quick.go 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460
  1. // Aplica o back-end do juninho
  2. @target : mips
  3. // Especifica o tipo de metodo empregado para salvar o resultado da compilação
  4. //@export : MultCoreJun
  5. @export : simulation
  6. // Diretorio onde o resultado da compilação será gravado
  7. @outputDirectory : `C:\Users\EUGENIO CARVALHO\Desktop\tmp\bitCount_1`
  8. // Quantidade de palavras de um bloco 32 palavras de 4bytes
  9. @cacheBlockSize: `32`
  10. /**
  11. Profile de compilacao do back-end
  12. O formato da string é um json que descreve um array de definições de cada core
  13. {
  14. "stackBaseAddress" : 5888, -> endereço da base da pilha do core em questão
  15. "initFunction": "multiplica(0)", -> define a main de cada core. aceita ate 4 parametros com valores de constantes
  16. "id": "core0" -> label que define o codigo de cada core
  17. },
  18. Se "stackBaseAddress" não for definido o compilador irá inferir o valor iniciando do ultimo endereço da memoria
  19. */
  20. @profile: `[
  21. {
  22. "id" : "core0",
  23. "initFunction" : "bitCount(0)",
  24. "filename" : "%s_core_0.txt"
  25. },
  26. {
  27. "id" : "core1",
  28. "initFunction" : "bitCount(18750)",
  29. "filename" : "%s_core_1.txt"
  30. },
  31. {
  32. "id" : "core2",
  33. "initFunction" : "bitCount(37500)",
  34. "filename" : "%s_core_2.txt"
  35. },
  36. {
  37. "id" : "core3",
  38. "initFunction" : "bitCount(56250)",
  39. "filename" : "%s_core_3.txt"
  40. }
  41. ]`
  42. package main;
  43. var (
  44. result [4][32]int32
  45. )
  46. func bitCount(init int32, core int32){
  47. var (
  48. n int32
  49. x int32
  50. tmp = 0
  51. zero = 0
  52. seed = 112500
  53. //seed = 1000
  54. )
  55. for i:= init; i < init + 4500; i++ {
  56. n = 0
  57. x = seed
  58. if x > 0 {
  59. for true {
  60. n++
  61. if x = x & (x-1); x == 0 {
  62. break
  63. }
  64. }
  65. tmp += n
  66. }
  67. seed +=13
  68. }
  69. result[core][zero] = tmp
  70. }
  71. func main(){
  72. bitCount(18750,1)
  73. }
  74. /*
  75. $$$$$$$$$$$$$$$$ SetLoaded:_S6:false
  76. $$$$$$$$$$$$$$$$ SetLoaded:_S8:false
  77. $$$$$$$$$$$$$$$$ SetLoaded:_S10:false
  78. $$$$$$$$$$$$$$$$ SetLoaded:_S12:false
  79. $$$$$$$$$$$$$$$$ LOADED _S2 : false
  80. $$$$$$$$$$$$$$$$ SetLoaded:_S2:true
  81. $$$$$$$$$$$$$$$$ SetLoaded:_S14:false
  82. $$$$$$$$$$$$$$$$ SetLoaded:_S17:false
  83. $$$$$$$$$$$$$$$$ LOADED _S15 : false
  84. $$$$$$$$$$$$$$$$ SetLoaded:_S15:true
  85. $$$$$$$$$$$$$$$$ LOADED _S17 : false
  86. $$$$$$$$$$$$$$$$ SetLoaded:_S17:true
  87. $$$$$$$$$$$$$$$$ LOADED _S18 : false
  88. $$$$$$$$$$$$$$$$ SetLoaded:_S18:true
  89. $$$$$$$$$$$$$$$$ SetLoaded:_S18:false
  90. $$$$$$$$$$$$$$$$ LOADED _S18 : false
  91. $$$$$$$$$$$$$$$$ SetLoaded:_S18:true
  92. $$$$$$$$$$$$$$$$ LOADED _S19 : false
  93. $$$$$$$$$$$$$$$$ SetLoaded:_S19:true
  94. $$$$$$$$$$$$$$$$ LOADED _S19 : true
  95. $$$$$$$$$$$$$$$$ SetLoaded:_S19:false
  96. $$$$$$$$$$$$$$$$ LOADED _S19 : false
  97. $$$$$$$$$$$$$$$$ SetLoaded:_S19:true
  98. $$$$$$$$$$$$$$$$ LOADED _S23 : false
  99. $$$$$$$$$$$$$$$$ SetLoaded:_S23:true
  100. $$$$$$$$$$$$$$$$ LOADED _S22 : false
  101. $$$$$$$$$$$$$$$$ SetLoaded:_S22:true
  102. $$$$$$$$$$$$$$$$ SetLoaded:_S23:false
  103. $$$$$$$$$$$$$$$$ LOADED _S23 : false
  104. $$$$$$$$$$$$$$$$ SetLoaded:_S23:true
  105. $$$$$$$$$$$$$$$$ LOADED _S24 : false
  106. $$$$$$$$$$$$$$$$ SetLoaded:_S24:true
  107. $$$$$$$$$$$$$$$$ SetLoaded:_S24:false
  108. $$$$$$$$$$$$$$$$ LOADED _S24 : false
  109. $$$$$$$$$$$$$$$$ SetLoaded:_S24:true
  110. $$$$$$$$$$$$$$$$ LOADED _S25 : false
  111. $$$$$$$$$$$$$$$$ SetLoaded:_S25:true
  112. $$$$$$$$$$$$$$$$ SetLoaded:_S25:false
  113. $$$$$$$$$$$$$$$$ LOADED _S25 : false
  114. $$$$$$$$$$$$$$$$ SetLoaded:_S25:true
  115. $$$$$$$$$$$$$$$$ LOADED _S27 : false
  116. $$$$$$$$$$$$$$$$ SetLoaded:_S27:true
  117. $$$$$$$$$$$$$$$$ LOADED _S26 : false
  118. $$$$$$$$$$$$$$$$ SetLoaded:_S26:true
  119. $$$$$$$$$$$$$$$$ LOADED _S30 : false
  120. $$$$$$$$$$$$$$$$ SetLoaded:_S30:true
  121. $$$$$$$$$$$$$$$$ LOADED _S30 : true
  122. $$$$$$$$$$$$$$$$ LOADED _S32 : false
  123. $$$$$$$$$$$$$$$$ SetLoaded:_S32:true
  124. $$$$$$$$$$$$$$$$ LOADED _S32 : true
  125. $$$$$$$$$$$$$$$$ SetLoaded:_S36[_T34]:false
  126. $$$$$$$$$$$$$$$$ LOADED _S29 : false
  127. $$$$$$$$$$$$$$$$ SetLoaded:_S29:true
  128. package main
  129. import (
  130. "fmt"
  131. )
  132. var (
  133. result [4][32]int
  134. )
  135. func bitCount(init int, core int){
  136. var (
  137. n int
  138. x int
  139. tmp = 0
  140. seed = 112500
  141. )
  142. for i:= init; i < init + 4500; i++ {
  143. n = 0
  144. x = seed
  145. fmt.Println("X: ", x)
  146. if x > 0 {
  147. for true {
  148. n++
  149. if x = x & (x-1); x == 0 {
  150. break
  151. }
  152. }
  153. tmp += n
  154. }
  155. seed +=13
  156. }
  157. fmt.Println(tmp)
  158. }
  159. */
  160. /**
  161. <main>:
  162. 0: 0604260670 addiu a0,zero,18750 .2 -- push param
  163. 4: 0604307457 addiu a1,zero,1 .2 -- push param
  164. 8: 0201326597 jal 14 <bitCount+0x0> .2 -- jump to <bitCount>
  165. c: 0000000000 sll zero,zero,0 .2 -- Nop
  166. 10: 4294967295 stop -- End of programa
  167. <bitCount>:
  168. 14: 0666763232 addiu sp,sp,-32 -- prolog| push stack frame
  169. 18: 0001962017 addu fp,zero,sp -- prolog|copy fp ← sp
  170. 1c: 2948857856 sw a0,0(fp) .0 -- pop param
  171. 20: 2948923396 sw a1,4(fp) .1 -- pop param
  172. 24: 2948595720 sw zero,8(fp) .2 -- store content of zero in _VTMP5
  173. 28: 2948595724 sw zero,12(fp) .3 -- store content of zero in _VZERO7
  174. 2c: 0604636136 addiu t2,zero,1000 .4 -- load param (p1)
  175. 30: 2949251088 sw t2,16(fp) .4 -- store content of t2 in _VSEED9
  176. 34: 2413101056 lw s5,0(fp) .5 -- load content from _VINIT1 in s5
  177. 38: 0000000000 sll zero,zero,0 .5 -- Nop
  178. 3c: 2949971988 sw s5,20(fp) .6 -- store content of s5 in _VI11
  179. 40: 0134217795 j 10c <bitCount+0xf8> .7 -- jump to bitCount+_i3
  180. 44: 0000000000 sll zero,zero,0 .7 -- Nop
  181. 48: 2948595736 sw zero,24(fp) .8 -- store content of zero in _VN13
  182. 4c: 2412904464 lw s2,16(fp) .9 -- load content from _VSEED9 in s2
  183. 50: 0000000000 sll zero,zero,0 .9 -- Nop
  184. 54: 2949775388 sw s2,28(fp) .10 -- store content of s2 in _VX16
  185. 58: 2413035548 lw s4,28(fp) .11 -- load content from _VX16 in s4
  186. 5c: 0000000000 sll zero,zero,0 .11 -- Nop
  187. 60: 0041947171 subu v0,s4,zero .12
  188. 64: 0406847517 blez v0,dc <bitCount+0xc8> .12 -- branch if register <= 0
  189. 68: 0000000000 sll zero,zero,0 .12 -- Nop
  190. 6c: 0134217774 j b8 <bitCount+0xa4> .13 -- jump to bitCount+_i9
  191. 70: 0000000000 sll zero,zero,0 .13 -- Nop
  192. 74: 2413101080 lw s5,24(fp) .14 -- load content from _VN13 in s5
  193. 78: 0000000000 sll zero,zero,0 .14 -- Nop
  194. 7c: 0649396225 addiu s5,s5,1 .15 -- _S18 = _S18 + 1
  195. 80: 2413101080 lw s5,24(fp) .16 -- load content from _VN13 in s5
  196. 84: 0000000000 sll zero,zero,0 .16 -- Nop
  197. 88: 2949971992 sw s5,24(fp) .17 -- store content of s5 in _VN13
  198. 8c: 2413232156 lw s7,28(fp) .18 -- load content from _VX16 in s7
  199. 90: 0000000000 sll zero,zero,0 .18 -- Nop
  200. 94: 0653262847 addiu t7,s7,-1 .19 -- _T20 = _S19 - 1
  201. 98: 0049266724 and t8,s7,t7 .20 -- _T21 = _S19 & _T20
  202. 9c: 2950168604 sw t8,28(fp) .21 -- store content of t8 in _VX16
  203. a0: 2413232156 lw s7,28(fp) .22 -- load content from _VX16 in s7
  204. a4: 0000000000 sll zero,zero,0 .22 -- Nop
  205. a8: 0383778819 bne zero,s7,b8 <bitCount+0xa4> .23 -- branch if not equals
  206. ac: 0000000000 sll zero,zero,0 .23 -- Nop
  207. b0: 0134217776 j c0 <bitCount+0xac> .24 -- jump to bitCount+_i7
  208. b4: 0000000000 sll zero,zero,0 .24 -- Nop
  209. b8: 0134217757 j 74 <bitCount+0x60> .25 -- jump to bitCount+_i6
  210. bc: 0000000000 sll zero,zero,0 .25 -- Nop
  211. c0: 2412904456 lw s2,8(fp) .26 -- load content from _VTMP5 in s2
  212. c4: 2413035544 lw s4,24(fp) .27 -- load content from _VN13 in s4
  213. c8: 0000000000 sll zero,zero,0 .27 -- Nop
  214. cc: 0039096353 addu s2,s2,s4 .28 -- _S23 = _S23 + _S22
  215. d0: 2412904456 lw s2,8(fp) .29 -- load content from _VTMP5 in s2
  216. d4: 0000000000 sll zero,zero,0 .29 -- Nop
  217. d8: 2949775368 sw s2,8(fp) .30 -- store content of s2 in _VTMP5
  218. dc: 2412773392 lw s0,16(fp) .31 -- load content from _VSEED9 in s0
  219. e0: 0000000000 sll zero,zero,0 .31 -- Nop
  220. e4: 0638582797 addiu s0,s0,13 .32 -- _S24 = _S24 + 13
  221. e8: 2412773392 lw s0,16(fp) .33 -- load content from _VSEED9 in s0
  222. ec: 0000000000 sll zero,zero,0 .33 -- Nop
  223. f0: 2949644304 sw s0,16(fp) .34 -- store content of s0 in _VSEED9
  224. f4: 2413232148 lw s7,20(fp) .35 -- load content from _VI11 in s7
  225. f8: 0000000000 sll zero,zero,0 .35 -- Nop
  226. fc: 0653721601 addiu s7,s7,1 .36 -- _S25 = _S25 + 1
  227. 100: 2413232148 lw s7,20(fp) .37 -- load content from _VI11 in s7
  228. 104: 0000000000 sll zero,zero,0 .37 -- Nop
  229. 108: 2950103060 sw s7,20(fp) .38 -- store content of s7 in _VI11
  230. 10c: 2413035520 lw s4,0(fp) .39 -- load content from _VINIT1 in s4
  231. 110: 0000000000 sll zero,zero,0 .39 -- Nop
  232. 114: 0646713748 addiu t4,s4,4500 .40 -- _T28 = _S27 + 4500
  233. 118: 2412838932 lw s1,20(fp) .41 -- load content from _VI11 in s1
  234. 11c: 0000000000 sll zero,zero,0 .41 -- Nop
  235. 120: 0036442147 subu v0,s1,t4 .42
  236. 124: 0071368648 bltz v0,48 <bitCount+0x34> .42 -- branch if register < 0
  237. 128: 0000000000 sll zero,zero,0 .42 -- Nop
  238. 12c: 2413101060 lw s5,4(fp) .43 -- load content from _VCORE3 in s5
  239. 130: 0000000000 sll zero,zero,0 .43 -- Nop
  240. 134: 0001403200 sll t5,s5,5 .44 -- _T31 = _S30 << 5
  241. 138: 2413166604 lw s6,12(fp) .45 -- load content from _VZERO7 in s6
  242. 13c: 0000000000 sll zero,zero,0 .45 -- Nop
  243. 140: 0028731425 addu t5,t5,s6 .46 -- _T31 = _T31 + _S32
  244. 144: 0000880768 sll t6,t5,2 .47 -- _T34 = _T31 << 2
  245. 148: 2413035528 lw s4,8(fp) .48 -- load content from _VTMP5 in s4
  246. 14c: 0000000000 sll zero,zero,0 .48 -- Nop
  247. 150: 2916352000 sw s4,0(t6) .49 -- store content of s4 in _G35[_T34]
  248. 154: 0666697760 addiu sp,sp,32 -- epilog| pop stack frame
  249. 158: 0001962017 addu fp,zero,sp -- epilog| pop stack frame
  250. 15c: 0065011720 jr ra -- epilog| return
  251. Target[mips]:
  252. <main>:
  253. 0: 0604260670 addiu a0,zero,18750 .2 -- push param
  254. 4: 0604307457 addiu a1,zero,1 .2 -- push param
  255. 8: 0201326597 jal 14 <bitCount+0x0> .2 -- jump to <bitCount>
  256. c: 0000000000 sll zero,zero,0 .2 -- Nop
  257. 10: 4294967295 stop -- End of programa
  258. <bitCount>:
  259. 14: 0666763232 addiu sp,sp,-32 -- prolog| push stack frame
  260. 18: 0001962017 addu fp,zero,sp -- prolog|copy fp ← sp
  261. 1c: 2948857856 sw a0,0(fp) .0 -- pop param
  262. 20: 2948923396 sw a1,4(fp) .1 -- pop param
  263. 24: 2948595720 sw zero,8(fp) .2 -- store content of zero in _VTMP5
  264. 28: 2948595724 sw zero,12(fp) .3 -- store content of zero in _VZERO7
  265. 2c: 0604636136 addiu t2,zero,1000 .4 -- load param (p1)
  266. 30: 2949251088 sw t2,16(fp) .4 -- store content of t2 in _VSEED9
  267. 34: 2413101056 lw s5,0(fp) .5 -- load content from _VINIT1 in s5
  268. 38: 0000000000 sll zero,zero,0 .5 -- Nop
  269. 3c: 2949971988 sw s5,20(fp) .6 -- store content of s5 in _VI11
  270. 40: 0134217785 j e4 <bitCount+0xd0> .7 -- jump to bitCount+_i3
  271. 44: 0000000000 sll zero,zero,0 .7 -- Nop
  272. 48: 2948595736 sw zero,24(fp) .8 -- store content of zero in _VN13
  273. 4c: 2412904464 lw s2,16(fp) .9 -- load content from _VSEED9 in s2
  274. 50: 0000000000 sll zero,zero,0 .9 -- Nop
  275. 54: 2949775388 sw s2,28(fp) .10 -- store content of s2 in _VX16
  276. 58: 2413035548 lw s4,28(fp) .11 -- load content from _VX16 in s4
  277. 5c: 0000000000 sll zero,zero,0 .11 -- Nop
  278. 60: 0041947171 subu v0,s4,zero .12
  279. 64: 0406847511 blez v0,c4 <bitCount+0xb0> .12 -- branch if register <= 0
  280. 68: 0000000000 sll zero,zero,0 .12 -- Nop
  281. 6c: 0134217770 j a8 <bitCount+0x94> .13 -- jump to bitCount+_i9
  282. 70: 0000000000 sll zero,zero,0 .13 -- Nop
  283. 74: 2413101080 lw s5,24(fp) .14 -- load content from _VN13 in s5
  284. 78: 0000000000 sll zero,zero,0 .14 -- Nop
  285. 7c: 0649396225 addiu s5,s5,1 .15 -- _S18 = _S18 + 1
  286. 80: 2949971992 sw s5,24(fp) .16 -- store content of s5 in _VN13
  287. 84: 2413232156 lw s7,28(fp) .17 -- load content from _VX16 in s7
  288. 88: 0000000000 sll zero,zero,0 .17 -- Nop
  289. 8c: 0653262847 addiu t7,s7,-1 .18 -- _T20 = _S19 - 1
  290. 90: 0049266724 and t8,s7,t7 .19 -- _T21 = _S19 & _T20
  291. 94: 2950168604 sw t8,28(fp) .20 -- store content of t8 in _VX16
  292. 98: 0383778819 bne zero,s7,a8 <bitCount+0x94> .21 -- branch if not equals
  293. 9c: 0000000000 sll zero,zero,0 .21 -- Nop
  294. a0: 0134217772 j b0 <bitCount+0x9c> .22 -- jump to bitCount+_i7
  295. a4: 0000000000 sll zero,zero,0 .22 -- Nop
  296. a8: 0134217757 j 74 <bitCount+0x60> .23 -- jump to bitCount+_i6
  297. ac: 0000000000 sll zero,zero,0 .23 -- Nop
  298. b0: 2412904456 lw s2,8(fp) .24 -- load content from _VTMP5 in s2
  299. b4: 2413035544 lw s4,24(fp) .25 -- load content from _VN13 in s4
  300. b8: 0000000000 sll zero,zero,0 .25 -- Nop
  301. bc: 0039096353 addu s2,s2,s4 .26 -- _S23 = _S23 + _S22
  302. c0: 2949775368 sw s2,8(fp) .27 -- store content of s2 in _VTMP5
  303. c4: 2412773392 lw s0,16(fp) .28 -- load content from _VSEED9 in s0
  304. c8: 0000000000 sll zero,zero,0 .28 -- Nop
  305. cc: 0638582797 addiu s0,s0,13 .29 -- _S24 = _S24 + 13
  306. d0: 2949644304 sw s0,16(fp) .30 -- store content of s0 in _VSEED9
  307. d4: 2413232148 lw s7,20(fp) .31 -- load content from _VI11 in s7
  308. d8: 0000000000 sll zero,zero,0 .31 -- Nop
  309. dc: 0653721601 addiu s7,s7,1 .32 -- _S25 = _S25 + 1
  310. e0: 2950103060 sw s7,20(fp) .33 -- store content of s7 in _VI11
  311. e4: 2413035520 lw s4,0(fp) .34 -- load content from _VINIT1 in s4
  312. e8: 0000000000 sll zero,zero,0 .34 -- Nop
  313. ec: 0646713748 addiu t4,s4,4500 .35 -- _T28 = _S27 + 4500
  314. f0: 2412838932 lw s1,20(fp) .36 -- load content from _VI11 in s1
  315. f4: 0000000000 sll zero,zero,0 .36 -- Nop
  316. f8: 0036442147 subu v0,s1,t4 .37
  317. fc: 0071368658 bltz v0,48 <bitCount+0x34> .37 -- branch if register < 0
  318. 100: 0000000000 sll zero,zero,0 .37 -- Nop
  319. 104: 2413101060 lw s5,4(fp) .38 -- load content from _VCORE3 in s5
  320. 108: 0000000000 sll zero,zero,0 .38 -- Nop
  321. 10c: 0001403200 sll t5,s5,5 .39 -- _T31 = _S30 << 5
  322. 110: 2413166604 lw s6,12(fp) .40 -- load content from _VZERO7 in s6
  323. 114: 0000000000 sll zero,zero,0 .40 -- Nop
  324. 118: 0028731425 addu t5,t5,s6 .41 -- _T31 = _T31 + _S32
  325. 11c: 0000880768 sll t6,t5,2 .42 -- _T34 = _T31 << 2
  326. 120: 2413035528 lw s4,8(fp) .43 -- load content from _VTMP5 in s4
  327. 124: 0000000000 sll zero,zero,0 .43 -- Nop
  328. 128: 2916352000 sw s4,0(t6) .44 -- store content of s4 in _G35[_T34]
  329. 12c: 0666697760 addiu sp,sp,32 -- epilog| pop stack frame
  330. 130: 0001962017 addu fp,zero,sp -- epilog| pop stack frame
  331. 134: 0065011720 jr ra -- epilog| return
  332. <main>:
  333. 0: 0604522814 addiu t0,zero,18750 .2 -- load param (p1)
  334. 4: 0604260670 addiu a0,zero,18750 .2 -- push param
  335. 8: 0604569601 addiu t1,zero,1 .2 -- load param (p1)
  336. c: 0604307457 addiu a1,zero,1 .2 -- push param
  337. 10: 0201326599 jal 1c <bitCount+0x0> .2 -- jump to <bitCount>
  338. 14: 0000000000 sll zero,zero,0 .2 -- Nop
  339. 18: 4294967295 stop -- End of programa
  340. <bitCount>:
  341. 1c: 0666763232 addiu sp,sp,-32 -- prolog| push stack frame
  342. 20: 0001962017 addu fp,zero,sp -- prolog|copy fp ← sp
  343. 24: 2412773376 lw s0,fp,0 .0 -- load content from _V1 in s0
  344. 28: 0000000000 sll zero,zero,0 .0 -- Nop
  345. 2c: 2948857856 sw a0,fp,0 .1 -- pop param
  346. 30: 2412838916 lw s1,fp,4 .2 -- load content from _V2 in s1
  347. 34: 0000000000 sll zero,zero,0 .2 -- Nop
  348. 38: 2948923396 sw a1,fp,4 .3 -- pop param
  349. 3c: 0605159424 addiu s2,zero,0 .4 -- copy _V3 ← 0
  350. 40: 2949775368 sw s2,fp,8 .5 -- store content of s2 in _V3
  351. 44: 0605224960 addiu s3,zero,0 .6 -- copy _V4 ← 0
  352. 48: 2949840908 sw s3,fp,12 .7 -- store content of s3 in _V4
  353. 4c: 1007943681 lui s4,1 .8 -- load param upper(p1)
  354. 50: 0915715956 ori s4,s4,46964 .8 -- load param lower(p1)
  355. 54: 2949906448 sw s4,fp,16 .9 -- store content of s4 in _V5
  356. 58: 2412773376 lw s0,fp,0 .10 -- load content from _V1 in s0
  357. 5c: 0000000000 sll zero,zero,0 .10 -- Nop
  358. 60: 0001091617 addu s5,zero,s0 .11 -- copy _V6 ← _V1
  359. 64: 2949971988 sw s5,fp,20 .12 -- store content of s5 in _V6
  360. 68: 0134217805 j 134 <bitCount+0x118> .13 -- jump to bitCount+_i3
  361. 6c: 0000000000 sll zero,zero,0 .13 -- Nop
  362. 70: 0605421568 addiu s6,zero,0 .14 -- copy _V7 ← 0
  363. 74: 2950037528 sw s6,fp,24 .15 -- store content of s6 in _V7
  364. 78: 2413232144 lw s7,fp,16 .16 -- load content from _V5 in s7
  365. 7c: 0000000000 sll zero,zero,0 .16 -- Nop
  366. 80: 0001542177 addu s1,zero,s7 .17 -- copy _V8 ← _V5
  367. 84: 2949709852 sw s1,fp,28 .18 -- store content of s1 in _V8
  368. 88: 2412838940 lw s1,fp,28 .19 -- load content from _V8 in s1
  369. 8c: 0000000000 sll zero,zero,0 .19 -- Nop
  370. 90: 0035655715 subu v0,s1,zero .20
  371. 94: 0406847517 blez zero,v0,10c <bitCount+0xf0> .20 -- branch if register <= 0
  372. 98: 0000000000 sll zero,zero,0 .20 -- Nop
  373. 9c: 0134217788 j f0 <bitCount+0xd4> .21 -- jump to bitCount+_i9
  374. a0: 0000000000 sll zero,zero,0 .21 -- Nop
  375. a4: 2412904472 lw s2,fp,24 .22 -- load content from _V7 in s2
  376. a8: 0000000000 sll zero,zero,0 .22 -- Nop
  377. ac: 0604831745 addiu t5,zero,1 .23 -- load param (p2)
  378. b0: 0642908161 addiu s2,s2,1 .23 -- _V7 = _V7 + 1
  379. b4: 2949775384 sw s2,fp,24 .24 -- store content of s2 in _V7
  380. b8: 2412970012 lw s3,fp,28 .25 -- load content from _V8 in s3
  381. bc: 0000000000 sll zero,zero,0 .25 -- Nop
  382. c0: 0604897281 addiu t6,zero,1 .26 -- load param (p2)
  383. c4: 0644874239 addiu t7,s3,-1 .26 -- _T9 = _V8 - 1
  384. c8: 2412970012 lw s3,fp,28 .27 -- load content from _V8 in s3
  385. cc: 0000000000 sll zero,zero,0 .27 -- Nop
  386. d0: 0040867876 and s3,s3,t7 .28 -- _V8 = _V8 & _T9
  387. d4: 2949840924 sw s3,fp,28 .29 -- store content of s3 in _V8
  388. d8: 2412970012 lw s3,fp,28 .30 -- load content from _V8 in s3
  389. dc: 0000000000 sll zero,zero,0 .30 -- Nop
  390. e0: 0375390211 bne zero,s3,f0 <bitCount+0xd4> .31 -- branch if not equals
  391. e4: 0000000000 sll zero,zero,0 .31 -- Nop
  392. e8: 0134217790 j f8 <bitCount+0xdc> .32 -- jump to bitCount+_i7
  393. ec: 0000000000 sll zero,zero,0 .32 -- Nop
  394. f0: 0134217769 j a4 <bitCount+0x88> .33 -- jump to bitCount+_i6
  395. f4: 0000000000 sll zero,zero,0 .33 -- Nop
  396. f8: 2413035528 lw s4,fp,8 .34 -- load content from _V3 in s4
  397. fc: 2412773400 lw s0,fp,24 .35 -- load content from _V7 in s0
  398. 100: 0000000000 sll zero,zero,0 .35 -- Nop
  399. 104: 0043032609 addu s4,s4,s0 .36 -- _V3 = _V3 + _V7
  400. 108: 2949906440 sw s4,fp,8 .37 -- store content of s4 in _V3
  401. 10c: 2413101072 lw s5,fp,16 .38 -- load content from _V5 in s5
  402. 110: 0000000000 sll zero,zero,0 .38 -- Nop
  403. 114: 0604504077 addiu t0,zero,13 .39 -- load param (p2)
  404. 118: 0649396237 addiu s5,s5,13 .39 -- _V5 = _V5 + 13
  405. 11c: 2949971984 sw s5,fp,16 .40 -- store content of s5 in _V5
  406. 120: 2413166612 lw s6,fp,20 .41 -- load content from _V6 in s6
  407. 124: 0000000000 sll zero,zero,0 .41 -- Nop
  408. 128: 0604569601 addiu t1,zero,1 .42 -- load param (p2)
  409. 12c: 0651558913 addiu s6,s6,1 .42 -- _V6 = _V6 + 1
  410. 130: 2950037524 sw s6,fp,20 .43 -- store content of s6 in _V6
  411. 134: 2413232128 lw s7,fp,0 .44 -- load content from _V1 in s7
  412. 138: 0000000000 sll zero,zero,0 .44 -- Nop
  413. 13c: 0604639636 addiu t2,zero,4500 .45 -- load param (p2)
  414. 140: 0652939668 addiu t3,s7,4500 .45 -- _T11 = _V1 + 4500
  415. 144: 2412838932 lw s1,fp,20 .46 -- load content from _V6 in s1
  416. 148: 0000000000 sll zero,zero,0 .46 -- Nop
  417. 14c: 0036376611 subu v0,s1,t3 .47
  418. 150: 0071368647 bltz 00000,v0,70 <bitCount+0x54> .47 -- branch if register < 0
  419. 154: 0000000000 sll zero,zero,0 .47 -- Nop
  420. 158: 2412904452 lw s2,fp,4 .48 -- load content from _V2 in s2
  421. 15c: 0000000000 sll zero,zero,0 .48 -- Nop
  422. 160: 0001204257 addu t4,zero,s2 .49 -- copy _T12 ← _V2
  423. 164: 0000813376 sll t5,t4,5 .50 -- _T13 = _T12 << 5
  424. 168: 2412969996 lw s3,fp,12 .51 -- load content from _V4 in s3
  425. 16c: 0000000000 sll zero,zero,0 .51 -- Nop
  426. 170: 0001273889 addu t6,zero,s3 .52 -- copy _T15 ← _V4
  427. 174: 0028207137 addu t5,t5,t6 .53 -- _T13 = _T13 + _T15
  428. 178: 0000882816 sll t7,t5,2 .54 -- _T19 = _T13 << 2
  429. 17c: 2412773384 lw s0,fp,8 .55 -- load content from _V3 in s0
  430. 180: 0000000000 sll zero,zero,0 .55 -- Nop
  431. 184: 2918449152 sw s4,t7,0 .57 -- store content of s4 in _G21[_T19]
  432. 188: 0666697760 addiu sp,sp,32 -- epilog| pop stack frame
  433. 18c: 0001962017 addu fp,zero,sp -- epilog| pop stack frame
  434. 190: 0065011720 jr ra -- epilog| return T< store >
  435. */