微波EDA网,见证研发工程师的成长!
首页 > 硬件设计 > 嵌入式设计 > linux内核中的copy_to_user和copy_from_user(一)

linux内核中的copy_to_user和copy_from_user(一)

时间:11-22 来源:互联网 点击:

  1. #4
  2. ldrnetr3,[r1],#4@Shouldntfault
  3. strner3,[r0],#4
  4. andsip,ip,#3
  5. beq.cfu_0fupi
  6. .cfu_0nowords:teqip,#0
  7. beq.cfu_finished
  8. .cfu_nowords:cmpip,#2
  9. USER(ldrbtr3,[r1],#1)@Mayfault
  10. strbr3,[r0],#1
  11. USER(ldrgebtr3,[r1],#1)@Mayfault
  12. strgebr3,[r0],#1
  13. USER(ldrgtbtr3,[r1],#1)@Mayfault
  14. strgtbr3,[r0],#1
  15. b.cfu_finished
  16. .cfu_not_enough:
  17. movsip,r2
  18. bne.cfu_nowords
  19. .cfu_finished:movr0,#0
  20. addsp,sp,#8
  21. LOADREGS(fd,sp!,{r4-r7,pc})
  22. .cfu_src_not_aligned:
  23. bicr1,r1,#3
  24. USER(ldrtr7,[r1],#4)@Mayfault
  25. cmpip,#2
  26. bgt.cfu_3fupi
  27. beq.cfu_2fupi
  28. .cfu_1fupi:subsr2,r2,#4
  29. addmiip,r2,#4
  30. bmi.cfu_1nowords
  31. movr3,r7,pull#8
  32. USER(ldrtr7,[r1],#4)@Mayfault
  33. orrr3,r3,r7,push#24
  34. strr3,[r0],#4
  35. movip,r1,lsl#32-PAGE_SHIFT
  36. rsbip,ip,#0
  37. movsip,ip,lsr#32-PAGE_SHIFT
  38. beq.cfu_1fupi
  39. cmpr2,ip
  40. movltip,r2
  41. subr2,r2,ip
  42. subsip,ip,#16
  43. blt.cfu_1rem8lp
  44. PLD(pld[r1,#12])
  45. PLD(pld[r0,#12])
  46. PLD(subsip,ip,#32)
  47. PLD(blt.cfu_1cpynopld)
  48. PLD(pld[r1,#28])
  49. PLD(pld[r0,#28])
  50. .cfu_1cpy8lp:
  51. PLD(pld[r1,#44])
  52. PLD(pld[r0,#44])
  53. .cfu_1cpynopld:movr3,r7,pull#8
  54. ldmiar1!,{r4-r7}@Shouldntfault
  55. subsip,ip,#16
  56. orrr3,r3,r4,push#24
  57. movr4,r4,pull#8
  58. orrr4,r4,r5,push#24
  59. movr5,r5,pull#8
  60. orrr5,r5,r6,push#24
  61. movr6,r6,pull#8
  62. orrr6,r6,r7,push#24
  63. stmiar0!,{r3-r6}
  64. bpl.cfu_1cpy8lp
  65. PLD(cmnip,#32)
  66. PLD(bge.cfu_1cpynopld)
  67. PLD(addip,ip,#32)
  68. .cfu_1rem8lp:tstip,#8
  69. movner3,r7,pull#8
  70. ldmneiar1!,{r4,r7}@Shouldntfault
  71. orrner3,r3,r4,push#24
  72. movner4,r4,pull#8
  73. orrner4,r4,r7,push#24
  74. stmneiar0!,{r3-r4}
  75. tstip,#4
  76. movner3,r7,pull#8
  77. USER(ldrnetr7,[r1],#4)@Mayfault
  78. orrner3,r3,r7,push#24
  79. strner3,[r0],#4
  80. andsip,ip,#3
  81. beq.cfu_1fupi
  82. .cfu_1nowords:movr3,r7,get_byte_1
  83. teqip,#0
  84. beq.cfu_finished
  85. cmpip,#2
  86. strbr3,[r0],#1
  87. movger3,r7,get_byte_2
  88. strgebr3,[r0],#1
  89. movgtr3,r7,get_byte_3
  90. strgtbr3,[r0],#1
  91. b.cfu_finished
  92. .cfu_2fupi:subsr2,r2,#4
  93. addmiip,r2,#4
  94. bmi.cfu_2nowords
  95. movr3,r7,pull#16
  96. USER(ldrtr7,[r1],#4)@Mayfault
  97. orrr3,r3,r7,push#16
  98. strr3,[r0],#4
  99. movip,r1,lsl#32-PAGE_SHIFT
  100. rsbip,ip,#0
  101. movsip,ip,lsr#32-PAGE_SHIFT
  102. beq.cfu_2fupi
  103. cmpr2,ip
  104. movltip,r2
  105. subr2,r2,ip
  106. subsip,ip,#16
  107. blt.cfu_2rem8lp
  108. PLD(pld[r1,#12])
  109. PLD(pld[r0,#12])
  110. PLD(subsip,ip,#32)
  111. PLD(blt.cfu_2cpynopld)
  112. PLD(pld[r1,#28])
  113. PLD(pld[r0,#28])
  114. .cfu_2cpy8lp:
  115. PLD(pld[r1,#44])
  116. PLD(pld[r0,#44])
  117. .cfu_2cpynopld:movr3,r7,pull#16
  118. ldmiar1!,{r4-r7}@Shouldntfault
  119. subsip,ip,#16
  120. orrr3,r3,r4,push#16
  121. movr4,r4,pull#16
  122. orrr4,r4,r5,push#16
  123. movr5,r5,pull#16
  124. orrr5,r5,r6,push#16
  125. movr6,r6,pull#16
  126. orrr6,r6,r7,push#16
  127. stmiar0!,{r3-r6}
  128. bpl.cfu_2cpy8lp
  129. PLD(cmnip,#32)
  130. PLD(bge.cfu_2cpynopld)
  131. PLD(addip,ip,#32)
  132. .cfu_2rem8lp:tstip,#8
  133. movner3,r7,pull#16
  134. ldmneiar1!,{r4,r7}@Shouldntfault
  135. orrner3,r3,r4,push#16
  136. movner4,r4,pull#16
  137. orrner4,r4,r7,push#16
  138. stmneiar0!,{r3-r4}
  139. tstip,#4
  140. movner3,r7,pull#16
  141. USER(ldrnetr7,[r1],#4)@Mayfault
  142. orrner3,r3,r7,push#16
  143. strner3,[r0],#4
  144. andsip,ip,#3
  145. beq.cfu_2fupi
  146. .cfu_2nowords:movr3,r7,get_byte_2
  147. teqip,#0
  148. beq.cfu_finished
  149. cmpip,#2
  150. strbr3,[r0],#1
  151. movger3,r7,get_byte_3
  152. strgebr3,[r0],#1
  153. USER(ldrgtbtr3,[r1],#0)@Mayfault
  154. strgtbr3,[r0],#1
  155. b.cfu_finished
  156. .cfu_3fupi:subsr2,r2,#4
  157. addmiip,r2,#4
  158. bmi.cfu_3nowords
  159. movr3,r7,pull#24
  160. USER(ldrtr7,[r1],#4)@Mayfault
  161. orrr3,r3,r7,push#8
  162. strr3,[r0],#4
  163. movip,r1,lsl#32-PAGE_SHIFT
  164. rsbip,ip,#0
  165. movsip,ip,lsr#32-PAGE_SHIFT
  166. beq.cfu_3fupi
  167. cmpr2,ip
  168. movltip,r2
  169. subr2,r2,ip
  170. subsip,ip,#16
  171. blt.cfu_3rem8lp
  172. PLD(pld[r1,#12])
  173. PLD(pld[r0,#12])
  174. PLD(subsip,ip,#32)
  175. PLD(blt.cfu_3cpynopld)
  176. PLD(pld[r1,#28])
  177. PLD(pld[r0,#28])
  178. .cfu_3cpy8lp:
  179. PLD(pld[r1,#44])
  180. PLD(pld[r0,#44])
  181. .cfu_3cpynopld:movr3,r7,pull#24
  182. ldmiar1!,{r4-r7}@Shouldntfault
  183. orrr3,r3,r4,push#8
  184. movr4,r4,pull#24
  185. orrr4,r4,r5,push#8
  186. movr5,r5,pull#24
  187. orrr5,r5,r6,push#8
  188. movr6,r6,pull#24
  189. orrr6,r6,r7,push#8
  190. stmiar0!,{r3-r6}
  191. subsip,ip,#16
  192. bpl.cfu_3cpy8lp
  193. PLD(cmnip,#32)
  194. PLD(bge.cfu_3cpynopld)
  195. PLD(addip,ip,#32)
  196. .cfu_3rem8lp:tstip,#8
  197. movner3,r7,pull#24
  198. ldmneiar1!,{r4,r7}@Shouldntfault
  199. orrner3,r3,r4,push#8
  200. movner4,r4,pull#24
  201. orrner4,r4,r7,push#8
  202. stmneiar0!,{r3-r4}
  203. tstip,#4
  204. movner3,r7,pull#

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top