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