Please sign in to comment.
[i386] : Optimize copystr assembly routines
This patch optimizes copyoutstr(9), copyinstr(9) and copystr(9) assembly routines in sys/arch/i386/i386/copy.S in case the last argument (done) is a NULL pointer. Indeed, previous code was loading actually copied size in %ecx before checking whether the last argument (done, aka 20(%esp)) is NULL or not. In case (done == NULL), there is no need to load the copied size in %ecx, we can therefore save two instructions from being executed. This patch moves the two instructions responsible for loading the copied size in %ecx after the test (done != NULL) is done.
- Loading branch information...