Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/amd64/support.S
Show First 20 Lines • Show All 590 Lines • ▼ Show 20 Lines | ENTRY(subyte) | ||||
POP_FRAME_POINTER | POP_FRAME_POINTER | ||||
ret | ret | ||||
END(subyte) | END(subyte) | ||||
/* | /* | ||||
* copyinstr(from, to, maxlen, int *lencopied) - MP SAFE | * copyinstr(from, to, maxlen, int *lencopied) - MP SAFE | ||||
* %rdi, %rsi, %rdx, %rcx | * %rdi, %rsi, %rdx, %rcx | ||||
* | * | ||||
* copy a string from from to to, stop when a 0 character is reached. | * copy a string from 'from' to 'to', stop when a 0 character is reached. | ||||
* return ENAMETOOLONG if string is longer than maxlen, and | * return ENAMETOOLONG if string is longer than maxlen, and | ||||
* EFAULT on protection violations. If lencopied is non-zero, | * EFAULT on protection violations. If lencopied is non-zero, | ||||
* return the actual length in *lencopied. | * return the actual length in *lencopied. | ||||
*/ | */ | ||||
ENTRY(copyinstr) | ENTRY(copyinstr) | ||||
PUSH_FRAME_POINTER | PUSH_FRAME_POINTER | ||||
movq %rdx,%r8 /* %r8 = maxlen */ | movq %rdx,%r8 /* %r8 = maxlen */ | ||||
movq %rcx,%r9 /* %r9 = *len */ | movq %rcx,%r9 /* %r9 = *len */ | ||||
▲ Show 20 Lines • Show All 206 Lines • Show Last 20 Lines |