U3copy_to_user.S
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:15k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /* $Id: U3copy_to_user.S,v 1.3 2000/11/01 09:29:19 davem Exp $
  2.  * U3memcpy.S: UltraSparc-III optimized copy to userspace.
  3.  *
  4.  * Copyright (C) 1999, 2000 David S. Miller (davem@redhat.com)
  5.  */
  6. #ifdef __KERNEL__
  7. #include <asm/visasm.h>
  8. #include <asm/asi.h>
  9. #include <asm/dcu.h>
  10. #include <asm/spitfire.h>
  11. #undef SMALL_COPY_USES_FPU
  12. #define EXNV(x,y,a,b)
  13. 98: x,y;
  14. .section .fixup;
  15. .align 4;
  16. 99: retl;
  17.  a, b, %o0;
  18. .section __ex_table;
  19. .align 4;
  20. .word 98b, 99b;
  21. .text;
  22. .align 4;
  23. #define EXNV2(x,y,a,b)
  24. 98: x,y;
  25. .section .fixup;
  26. .align 4;
  27. 99: a, b, %o0;
  28. retl;
  29.  add %o0, 1, %o0;
  30. .section __ex_table;
  31. .align 4;
  32. .word 98b, 99b;
  33. .text;
  34. .align 4;
  35. #define EXNV3(x,y,a,b)
  36. 98: x,y;
  37. .section .fixup;
  38. .align 4;
  39. 99: a, b, %o0;
  40. retl;
  41.  add %o0, 8, %o0;
  42. .section __ex_table;
  43. .align 4;
  44. .word 98b, 99b;
  45. .text;
  46. .align 4;
  47. #define EX(x,y,a,b)
  48. 98: x,y;
  49. .section .fixup;
  50. .align 4;
  51. 99: VISExitHalf;
  52. retl;
  53.  a, b, %o0;
  54. .section __ex_table;
  55. .align 4;
  56. .word 98b, 99b;
  57. .text;
  58. .align 4;
  59. #define EXBLK1(x,y)
  60. 98: x,y;
  61. .section .fixup;
  62. .align 4;
  63. 99: VISExitHalf;
  64. add %o4, 0x1c0, %o1;
  65. and %o2, (0x40 - 1), %o2;
  66. retl;
  67.  add %o1, %o2, %o0;
  68. .section __ex_table;
  69. .align 4;
  70. .word 98b, 99b;
  71. .text;
  72. .align 4;
  73. #define EXBLK2(x,y)
  74. 98: x,y;
  75. .section .fixup;
  76. .align 4;
  77. 99: VISExitHalf;
  78. sll %o3, 6, %o3;
  79. and %o2, (0x40 - 1), %o2;
  80. add %o3, 0x80, %o1;
  81. retl;
  82.  add %o1, %o2, %o0;
  83. .section __ex_table;
  84. .align 4;
  85. .word 98b, 99b;
  86. .text;
  87. .align 4;
  88. #define EXBLK3(x,y)
  89. 98: x,y;
  90. .section .fixup;
  91. .align 4;
  92. 99: VISExitHalf;
  93. and %o2, (0x40 - 1), %o2;
  94. retl;
  95.  add %o2, 0x80, %o0;
  96. .section __ex_table;
  97. .align 4;
  98. .word 98b, 99b;
  99. .text;
  100. .align 4;
  101. #define EXBLK4(x,y)
  102. 98: x,y;
  103. .section .fixup;
  104. .align 4;
  105. 99: VISExitHalf;
  106. and %o2, (0x40 - 1), %o2;
  107. retl;
  108.  add %o2, 0x40, %o0;
  109. .section __ex_table;
  110. .align 4;
  111. .word 98b, 99b;
  112. .text;
  113. .align 4;
  114. #else
  115. #define ASI_AIUS 0x80
  116. #define ASI_BLK_AIUS 0xf0
  117. #define FPRS_FEF  0x04
  118. #define VISEntryHalf rd %fprs, %o5; wr %g0, FPRS_FEF, %fprs
  119. #define VISExitHalf and %o5, FPRS_FEF, %o5; wr %o5, 0x0, %fprs
  120. #define SMALL_COPY_USES_FPU
  121. #define EXNV(x,y,a,b) x,y;
  122. #define EXNV2(x,y,a,b) x,y;
  123. #define EXNV3(x,y,a,b) x,y;
  124. #define EX(x,y,a,b) x,y;
  125. #define EXBLK1(x,y) x,y;
  126. #define EXBLK2(x,y) x,y;
  127. #define EXBLK3(x,y) x,y;
  128. #define EXBLK4(x,y) x,y;
  129. #endif
  130. /* Special/non-trivial issues of this code:
  131.  *
  132.  * 1) %o5 is preserved from VISEntryHalf to VISExitHalf
  133.  * 2) Only low 32 FPU registers are used so that only the
  134.  *    lower half of the FPU register set is dirtied by this
  135.  *    code.  This is especially important in the kernel.
  136.  * 3) This code never prefetches cachelines past the end
  137.  *    of the source buffer.
  138.  */
  139. .text
  140. .align 32
  141. /* The cheetah's flexible spine, oversized liver, enlarged heart,
  142.  * slender muscular body, and claws make it the swiftest hunter
  143.  * in Africa and the fastest animal on land.  Can reach speeds
  144.  * of up to 2.4GB per second.
  145.  */
  146. .globl U3copy_to_user
  147. U3copy_to_user: /* %o0=dst, %o1=src, %o2=len */
  148. /* Writing to %asi is _expensive_ so we hardcode it.
  149.  * Reading %asi to check for KERNEL_DS is comparatively
  150.  * cheap.
  151.  */
  152. rd %asi, %g1 ! MS Group (4 cycles)
  153. cmp %g1, ASI_AIUS ! A0 Group
  154. bne U3memcpy ! BR
  155.  nop ! A1
  156. #ifndef __KERNEL__
  157. /* Save away original 'dst' for memcpy return value. */
  158. mov %o0, %g3 ! A0 Group
  159. #endif
  160. /* Anything to copy at all? */
  161. cmp %o2, 0 ! A1
  162. ble,pn %icc, U3copy_to_user_short_ret ! BR
  163. /* Extremely small copy? */
  164.  cmp %o2, 31 ! A0 Group
  165. ble,pn %icc, U3copy_to_user_short ! BR
  166. /* Large enough to use unrolled prefetch loops? */
  167.  cmp %o2, 0x100 ! A1
  168. bge,a,pt %icc, U3copy_to_user_enter ! BR Group
  169.  andcc %o0, 0x3f, %g2 ! A0
  170. ba,pt %xcc, U3copy_to_user_toosmall ! BR Group
  171.  andcc %o0, 0x7, %g2 ! A0
  172. .align 32
  173. U3copy_to_user_short:
  174. /* Copy %o2 bytes from src to dst, one byte at a time. */
  175. ldub [%o1 + 0x00], %o3 ! MS Group
  176. add %o1, 0x1, %o1 ! A0
  177. add %o0, 0x1, %o0 ! A1
  178. subcc %o2, 1, %o2 ! A0 Group
  179. bg,pt %icc, U3copy_to_user_short ! BR
  180.  EXNV(stba %o3, [%o0 + -1] %asi, add %o2, 1) ! MS Group (1-cycle stall)
  181. U3copy_to_user_short_ret:
  182. #ifdef __KERNEL__
  183. retl ! BR Group (0-4 cycle stall)
  184.  clr %o0 ! A0
  185. #else
  186. retl ! BR Group (0-4 cycle stall)
  187.  mov %g3, %o0 ! A0
  188. #endif
  189. /* Here len >= (6 * 64) and condition codes reflect execution
  190.  * of "andcc %o0, 0x7, %g2", done by caller.
  191.  */
  192. .align 64
  193. U3copy_to_user_enter:
  194. /* Is 'dst' already aligned on an 64-byte boundary? */
  195. be,pt %xcc, 2f ! BR
  196. /* Compute abs((dst & 0x3f) - 0x40) into %g2.  This is the number
  197.  * of bytes to copy to make 'dst' 64-byte aligned.  We pre-
  198.  * subtract this from 'len'.
  199.  */
  200.  sub %g2, 0x40, %g2 ! A0 Group
  201. sub %g0, %g2, %g2 ! A0 Group
  202. sub %o2, %g2, %o2 ! A0 Group
  203. /* Copy %g2 bytes from src to dst, one byte at a time. */
  204. 1: ldub [%o1 + 0x00], %o3 ! MS (Group)
  205. add %o1, 0x1, %o1 ! A1
  206. add %o0, 0x1, %o0 ! A0 Group
  207. subcc %g2, 0x1, %g2 ! A1
  208. bg,pt %icc, 1b ! BR Group
  209.  EXNV2(stba %o3, [%o0 + -1] %asi, add %o2, %g2) ! MS Group
  210. 2: VISEntryHalf ! MS+MS
  211. and %o1, 0x7, %g1 ! A1
  212. ba,pt %xcc, U3copy_to_user_begin ! BR
  213.  alignaddr %o1, %g0, %o1 ! MS       (Break-after)
  214. .align 64
  215. U3copy_to_user_begin:
  216. #ifdef __KERNEL__
  217. .globl U3copy_to_user_nop_1_6
  218. U3copy_to_user_nop_1_6:
  219. ldxa [%g0] ASI_DCU_CONTROL_REG, %g3
  220. sethi %uhi(DCU_PE), %o3
  221. sllx %o3, 32, %o3
  222. or %g3, %o3, %o3
  223. stxa %o3, [%g0] ASI_DCU_CONTROL_REG ! Enable P-cache
  224. membar #Sync
  225. #endif
  226. prefetch [%o1 + 0x000], #one_read ! MS Group1
  227. prefetch [%o1 + 0x040], #one_read ! MS Group2
  228. andn %o2, (0x40 - 1), %o4 ! A0
  229. prefetch [%o1 + 0x080], #one_read ! MS Group3
  230. cmp %o4, 0x140 ! A0
  231. prefetch [%o1 + 0x0c0], #one_read ! MS Group4
  232. ldd [%o1 + 0x000], %f0 ! MS Group5 (%f0 results at G8)
  233. bge,a,pt %icc, 1f ! BR
  234.  prefetch [%o1 + 0x100], #one_read ! MS Group6
  235. 1: ldd [%o1 + 0x008], %f2 ! AX        (%f2 results at G9)
  236. cmp %o4, 0x180 ! A1
  237. bge,a,pt %icc, 1f ! BR
  238.  prefetch [%o1 + 0x140], #one_read ! MS Group7
  239. 1: ldd [%o1 + 0x010], %f4 ! AX        (%f4 results at G10)
  240. cmp %o4, 0x1c0 ! A1
  241. bge,a,pt %icc, 1f ! BR
  242.  prefetch [%o1 + 0x180], #one_read ! MS Group8
  243. 1: faligndata %f0, %f2, %f16 ! FGA Group9 (%f16 at G12)
  244. ldd [%o1 + 0x018], %f6 ! AX        (%f6 results at G12)
  245. faligndata %f2, %f4, %f18 ! FGA Group10 (%f18 results at G13)
  246. ldd [%o1 + 0x020], %f8 ! MS         (%f8 results at G13)
  247. faligndata %f4, %f6, %f20 ! FGA Group12 (1-cycle stall,%f20 at G15)
  248. ldd [%o1 + 0x028], %f10 ! MS (%f10 results at G15)
  249. faligndata %f6, %f8, %f22 ! FGA Group13 (%f22 results at G16)
  250. ldd [%o1 + 0x030], %f12 ! MS (%f12 results at G16)
  251. faligndata %f8, %f10, %f24 ! FGA Group15 (1-cycle stall,%f24 at G18)
  252. ldd [%o1 + 0x038], %f14 ! MS (%f14 results at G18)
  253. faligndata %f10, %f12, %f26 ! FGA Group16 (%f26 results at G19)
  254. ldd [%o1 + 0x040], %f0 ! MS (%f0 results at G19)
  255. /* We only use the first loop if len > (7 * 64). */
  256. subcc %o4, 0x1c0, %o4 ! A0 Group17
  257. bg,pt %icc, U3copy_to_user_loop1 ! BR
  258.  add %o1, 0x40, %o1 ! A1
  259. add %o4, 0x140, %o4 ! A0 Group18
  260. ba,pt %xcc, U3copy_to_user_loop2 ! BR
  261.  srl %o4, 6, %o3 ! A0 Group19
  262. nop
  263. nop
  264. nop
  265. nop
  266. nop
  267. nop
  268. nop
  269. /* This loop performs the copy and queues new prefetches.
  270.  * We drop into the second loop when len <= (5 * 64).  Note
  271.  * that this (5 * 64) factor has been subtracted from len
  272.  * already.
  273.  */
  274. U3copy_to_user_loop1:
  275. ldd [%o1 + 0x008], %f2 ! MS Group2 (%f2 results at G5)
  276. faligndata %f12, %f14, %f28 ! FGA (%f28 results at G5)
  277. ldd [%o1 + 0x010], %f4 ! MS Group3 (%f4 results at G6)
  278. faligndata %f14, %f0, %f30 ! FGA Group4 (1-cycle stall, %f30 at G7)
  279. EXBLK1(stda %f16, [%o0] ASI_BLK_AIUS) ! MS
  280. ldd [%o1 + 0x018], %f6 ! AX (%f6 results at G7)
  281. faligndata %f0, %f2, %f16 ! FGA Group12 (7-cycle stall)
  282. ldd [%o1 + 0x020], %f8 ! MS         (%f8 results at G15)
  283. faligndata %f2, %f4, %f18 ! FGA Group13 (%f18 results at G16)
  284. ldd [%o1 + 0x028], %f10 ! MS (%f10 results at G16)
  285. faligndata %f4, %f6, %f20 ! FGA Group14 (%f20 results at G17)
  286. ldd [%o1 + 0x030], %f12 ! MS (%f12 results at G17)
  287. faligndata %f6, %f8, %f22 ! FGA Group15 (%f22 results at G18)
  288. ldd [%o1 + 0x038], %f14 ! MS (%f14 results at G18)
  289. faligndata %f8, %f10, %f24 ! FGA Group16 (%f24 results at G19)
  290. ldd [%o1 + 0x040], %f0 ! AX (%f0 results at G19)
  291. prefetch [%o1 + 0x180], #one_read ! MS
  292. faligndata %f10, %f12, %f26 ! FGA Group17 (%f26 results at G20)
  293. subcc %o4, 0x40, %o4 ! A0
  294. add %o1, 0x40, %o1 ! A1
  295. bg,pt %xcc, U3copy_to_user_loop1 ! BR
  296.  add %o0, 0x40, %o0 ! A0 Group18
  297. U3copy_to_user_loop2_enter:
  298. mov 5, %o3 ! A1
  299. /* This loop performs on the copy, no new prefetches are
  300.  * queued.  We do things this way so that we do not perform
  301.  * any spurious prefetches past the end of the src buffer.
  302.  */
  303. U3copy_to_user_loop2:
  304. ldd [%o1 + 0x008], %f2 ! MS
  305. faligndata %f12, %f14, %f28 ! FGA Group2
  306. ldd [%o1 + 0x010], %f4 ! MS
  307. faligndata %f14, %f0, %f30 ! FGA Group4 (1-cycle stall)
  308. EXBLK2(stda %f16, [%o0] ASI_BLK_AIUS) ! MS
  309. ldd [%o1 + 0x018], %f6 ! AX
  310. faligndata %f0, %f2, %f16 ! FGA Group12 (7-cycle stall)
  311. ldd [%o1 + 0x020], %f8 ! MS
  312. faligndata %f2, %f4, %f18 ! FGA Group13
  313. ldd [%o1 + 0x028], %f10 ! MS
  314. faligndata %f4, %f6, %f20 ! FGA Group14
  315. ldd [%o1 + 0x030], %f12 ! MS
  316. faligndata %f6, %f8, %f22 ! FGA Group15
  317. ldd [%o1 + 0x038], %f14 ! MS
  318. faligndata %f8, %f10, %f24 ! FGA Group16
  319. ldd [%o1 + 0x040], %f0 ! AX
  320. faligndata %f10, %f12, %f26 ! FGA Group17
  321. subcc %o3, 0x01, %o3 ! A0
  322. add %o1, 0x40, %o1 ! A1
  323. bg,pt %xcc, U3copy_to_user_loop2 ! BR
  324.  add %o0, 0x40, %o0 ! A0 Group18
  325. /* Finally we copy the last full 64-byte block. */
  326. U3copy_to_user_loopfini:
  327. ldd [%o1 + 0x008], %f2 ! MS
  328. faligndata %f12, %f14, %f28 ! FGA
  329. ldd [%o1 + 0x010], %f4 ! MS Group19
  330. faligndata %f14, %f0, %f30 ! FGA
  331. EXBLK3(stda %f16, [%o0] ASI_BLK_AIUS) ! MS Group20
  332. ldd [%o1 + 0x018], %f6 ! AX
  333. faligndata %f0, %f2, %f16 ! FGA Group11 (7-cycle stall)
  334. ldd [%o1 + 0x020], %f8 ! MS
  335. faligndata %f2, %f4, %f18 ! FGA Group12
  336. ldd [%o1 + 0x028], %f10 ! MS
  337. faligndata %f4, %f6, %f20 ! FGA Group13
  338. ldd [%o1 + 0x030], %f12 ! MS
  339. faligndata %f6, %f8, %f22 ! FGA Group14
  340. ldd [%o1 + 0x038], %f14 ! MS
  341. faligndata %f8, %f10, %f24 ! FGA Group15
  342. cmp %g1, 0 ! A0
  343. be,pt %icc, 1f ! BR
  344.  add %o0, 0x40, %o0 ! A1
  345. ldd [%o1 + 0x040], %f0 ! MS
  346. 1: faligndata %f10, %f12, %f26 ! FGA Group16
  347. faligndata %f12, %f14, %f28 ! FGA Group17
  348. faligndata %f14, %f0, %f30 ! FGA Group18
  349. EXBLK4(stda %f16, [%o0] ASI_BLK_AIUS) ! MS
  350. add %o0, 0x40, %o0 ! A0
  351. add %o1, 0x40, %o1 ! A1
  352. #ifdef __KERNEL__
  353. .globl U3copy_to_user_nop_2_3
  354. U3copy_to_user_nop_2_3:
  355. mov PRIMARY_CONTEXT, %o3
  356. stxa %g0, [%o3] ASI_DMMU ! Flush P-cache
  357. stxa %g3, [%g0] ASI_DCU_CONTROL_REG ! Disable P-cache
  358. #endif
  359. membar #Sync ! MS Group26 (7-cycle stall)
  360. /* Now we copy the (len modulo 64) bytes at the end.
  361.  * Note how we borrow the %f0 loaded above.
  362.  *
  363.  * Also notice how this code is careful not to perform a
  364.  * load past the end of the src buffer just like similar
  365.  * code found in U3copy_to_user_toosmall processing.
  366.  */
  367. U3copy_to_user_loopend:
  368. and %o2, 0x3f, %o2 ! A0 Group
  369. andcc %o2, 0x38, %g2 ! A0 Group
  370. be,pn %icc, U3copy_to_user_endcruft ! BR
  371.  subcc %g2, 0x8, %g2 ! A1
  372. be,pn %icc, U3copy_to_user_endcruft ! BR Group
  373.  cmp %g1, 0 ! A0
  374. be,a,pt %icc, 1f ! BR Group
  375.  ldd [%o1 + 0x00], %f0 ! MS
  376. 1: ldd [%o1 + 0x08], %f2 ! MS Group
  377. add %o1, 0x8, %o1 ! A0
  378. sub %o2, 0x8, %o2 ! A1
  379. subcc %g2, 0x8, %g2 ! A0 Group
  380. faligndata %f0, %f2, %f8 ! FGA Group
  381. EX(stda %f8, [%o0 + 0x00] %asi, add %o2, 0x8) ! MS (XXX does it stall here? XXX)
  382. be,pn %icc, U3copy_to_user_endcruft ! BR
  383.  add %o0, 0x8, %o0 ! A0
  384. ldd [%o1 + 0x08], %f0 ! MS Group
  385. add %o1, 0x8, %o1 ! A0
  386. sub %o2, 0x8, %o2 ! A1
  387. subcc %g2, 0x8, %g2 ! A0 Group
  388. faligndata %f2, %f0, %f8 ! FGA
  389. EX(stda %f8, [%o0 + 0x00] %asi, add %o2, 0x8) ! MS (XXX does it stall here? XXX)
  390. bne,pn %icc, 1b ! BR
  391.  add %o0, 0x8, %o0 ! A0 Group
  392. /* If anything is left, we copy it one byte at a time.
  393.  * Note that %g1 is (src & 0x3) saved above before the
  394.  * alignaddr was performed.
  395.  */
  396. U3copy_to_user_endcruft:
  397. cmp %o2, 0
  398. add %o1, %g1, %o1
  399. VISExitHalf
  400. be,pn %icc, U3copy_to_user_short_ret
  401.  nop
  402. ba,a,pt %xcc, U3copy_to_user_short
  403. /* If we get here, then 32 <= len < (6 * 64) */
  404. U3copy_to_user_toosmall:
  405. #ifdef SMALL_COPY_USES_FPU
  406. /* Is 'dst' already aligned on an 8-byte boundary? */
  407. be,pt %xcc, 2f ! BR Group
  408. /* Compute abs((dst & 7) - 8) into %g2.  This is the number
  409.  * of bytes to copy to make 'dst' 8-byte aligned.  We pre-
  410.  * subtract this from 'len'.
  411.  */
  412.  sub %g2, 0x8, %g2 ! A0
  413. sub %g0, %g2, %g2 ! A0 Group (reg-dep)
  414. sub %o2, %g2, %o2 ! A0 Group (reg-dep)
  415. /* Copy %g2 bytes from src to dst, one byte at a time. */
  416. 1: ldub [%o1 + 0x00], %o3 ! MS (Group) (%o3 in 3 cycles)
  417. add %o1, 0x1, %o1 ! A1
  418. add %o0, 0x1, %o0 ! A0 Group
  419. subcc %g2, 0x1, %g2 ! A1
  420. bg,pt %icc, 1b ! BR Group
  421.  EXNV2(stba %o3, [%o0 + -1] %asi, add %o2, %g2) ! MS Group
  422. 2: VISEntryHalf ! MS+MS
  423. /* Compute (len - (len % 8)) into %g2.  This is guarenteed
  424.  * to be nonzero.
  425.  */
  426. andn %o2, 0x7, %g2 ! A0 Group
  427. /* You may read this and believe that it allows reading
  428.  * one 8-byte longword past the end of src.  It actually
  429.  * does not, as %g2 is subtracted as loads are done from
  430.  * src, so we always stop before running off the end.
  431.  * Also, we are guarenteed to have at least 0x10 bytes
  432.  * to move here.
  433.  */
  434. sub %g2, 0x8, %g2 ! A0 Group (reg-dep)
  435. alignaddr %o1, %g0, %g1 ! MS       (Break-after)
  436. ldd [%g1 + 0x00], %f0 ! MS Group (1-cycle stall)
  437. add %g1, 0x8, %g1 ! A0
  438. 1: ldd [%g1 + 0x00], %f2 ! MS Group
  439. add %g1, 0x8, %g1 ! A0
  440. sub %o2, 0x8, %o2 ! A1
  441. subcc %g2, 0x8, %g2 ! A0 Group
  442. faligndata %f0, %f2, %f8 ! FGA Group (1-cycle stall)
  443. EX(stda %f8, [%o0 + 0x00] %asi, add %o2, 0x8) ! MS Group (2-cycle stall)
  444. add %o1, 0x8, %o1 ! A0
  445. be,pn %icc, 2f ! BR
  446.  add %o0, 0x8, %o0 ! A1
  447. ldd [%g1 + 0x00], %f0 ! MS Group
  448. add %g1, 0x8, %g1 ! A0
  449. sub %o2, 0x8, %o2 ! A1
  450. subcc %g2, 0x8, %g2 ! A0 Group
  451. faligndata %f2, %f0, %f8 ! FGA Group (1-cycle stall)
  452. EX(stda %f8, [%o0 + 0x00] %asi, add %o2, 0x8) ! MS Group (2-cycle stall)
  453. add %o1, 0x8, %o1 ! A0
  454. bne,pn %icc, 1b ! BR
  455.  add %o0, 0x8, %o0 ! A1
  456. /* Nothing left to copy? */
  457. 2: cmp %o2, 0 ! A0 Group
  458. VISExitHalf ! A0+MS
  459. be,pn %icc, U3copy_to_user_short_ret ! BR Group
  460.  nop ! A0
  461. ba,a,pt %xcc, U3copy_to_user_short ! BR Group
  462. #else /* !(SMALL_COPY_USES_FPU) */
  463. xor %o1, %o0, %g2
  464. andcc %g2, 0x7, %g0
  465. bne,pn %icc, U3copy_to_user_short
  466.  andcc %o1, 0x7, %g2
  467. be,pt %xcc, 2f
  468.  sub %g2, 0x8, %g2
  469. sub %g0, %g2, %g2
  470. sub %o2, %g2, %o2
  471. 1: ldub [%o1 + 0x00], %o3
  472. add %o1, 0x1, %o1
  473. add %o0, 0x1, %o0
  474. subcc %g2, 0x1, %g2
  475. bg,pt %icc, 1b
  476.  EXNV2(stba %o3, [%o0 + -1] %asi, add %o2, %g2)
  477. 2: andn %o2, 0x7, %g2
  478. sub %o2, %g2, %o2
  479. 3: ldx [%o1 + 0x00], %o3
  480. add %o1, 0x8, %o1
  481. add %o0, 0x8, %o0
  482. subcc %g2, 0x8, %g2
  483. bg,pt %icc, 3b
  484.  EXNV3(stxa %o3, [%o0 + -8] %asi, add %o2, %g2)
  485. cmp %o2, 0
  486. bne,pn %icc, U3copy_to_user_short
  487.  nop
  488. ba,a,pt %xcc, U3copy_to_user_short_ret
  489. #endif /* !(SMALL_COPY_USES_FPU) */