Rev 2787 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2787 | Rev 3425 | ||
---|---|---|---|
Line 65... | Line 65... | ||
65 | * |
65 | * |
66 | * @param MEMCPY_DST(%esp) Destination address. |
66 | * @param MEMCPY_DST(%esp) Destination address. |
67 | * @param MEMCPY_SRC(%esp) Source address. |
67 | * @param MEMCPY_SRC(%esp) Source address. |
68 | * @param MEMCPY_SIZE(%esp) Size. |
68 | * @param MEMCPY_SIZE(%esp) Size. |
69 | * |
69 | * |
70 | * @return MEMCPY_SRC(%esp) on success and 0 on failure. |
70 | * @return MEMCPY_DST(%esp) on success and 0 on failure. |
71 | */ |
71 | */ |
72 | memcpy: |
72 | memcpy: |
73 | memcpy_from_uspace: |
73 | memcpy_from_uspace: |
74 | memcpy_to_uspace: |
74 | memcpy_to_uspace: |
75 | movl %edi, %edx /* save %edi */ |
75 | movl %edi, %edx /* save %edi */ |
Line 90... | Line 90... | ||
90 | rep movsb /* copy the rest byte by byte */ |
90 | rep movsb /* copy the rest byte by byte */ |
91 | 91 | ||
92 | 0: |
92 | 0: |
93 | movl %edx, %edi |
93 | movl %edx, %edi |
94 | movl %eax, %esi |
94 | movl %eax, %esi |
95 | movl MEMCPY_SRC(%esp), %eax /* MEMCPY_SRC(%esp), success */ |
95 | movl MEMCPY_DST(%esp), %eax /* MEMCPY_DST(%esp), success */ |
96 | ret |
96 | ret |
97 | 97 | ||
98 | /* |
98 | /* |
99 | * We got here from as_page_fault() after the memory operations |
99 | * We got here from as_page_fault() after the memory operations |
100 | * above had caused a page fault. |
100 | * above had caused a page fault. |