Rev 3107 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 3107 | Rev 3403 | ||
|---|---|---|---|
| Line 96... | Line 96... | ||
| 96 | * |
96 | * |
| 97 | * @param MEMCPY_DST Destination address. |
97 | * @param MEMCPY_DST Destination address. |
| 98 | * @param MEMCPY_SRC Source address. |
98 | * @param MEMCPY_SRC Source address. |
| 99 | * @param MEMCPY_SIZE Number of bytes to copy. |
99 | * @param MEMCPY_SIZE Number of bytes to copy. |
| 100 | * |
100 | * |
| 101 | * @retrun MEMCPY_SRC on success, 0 on failure. |
101 | * @retrun MEMCPY_DST on success, 0 on failure. |
| 102 | */ |
102 | */ |
| 103 | memcpy: |
103 | memcpy: |
| 104 | memcpy_from_uspace: |
104 | memcpy_from_uspace: |
| 105 | memcpy_to_uspace: |
105 | memcpy_to_uspace: |
| 106 | movq MEMCPY_SRC, %rax |
106 | movq MEMCPY_DST, %rax |
| 107 | 107 | ||
| 108 | movq MEMCPY_SIZE, %rcx |
108 | movq MEMCPY_SIZE, %rcx |
| 109 | shrq $3, %rcx /* size / 8 */ |
109 | shrq $3, %rcx /* size / 8 */ |
| 110 | 110 | ||
| 111 | rep movsq /* copy as much as possible word by word */ |
111 | rep movsq /* copy as much as possible word by word */ |