Turns out clang converts "memcmp(foo, bar, len) == 0" and similar to bcmp calls, which makes it worth it to provide the dedicated routine.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Do probably want to change the recent change to depends-cleanup.sh to check for bcmp.c instead of bcmp.S (and update the date and git hash).
lib/libc/amd64/string/memcmp.S | ||
---|---|---|
150–168 | Maybe s/Before we compute it/Before we compute mismatch,/ since the comment is now split up a bit and the antecedent of 'it' may not be as obvious now? | |
161 | This is just the same as 'inc %eax' or 'add $1,%eax'? I assume the simplification here is that you only need a non-zero value for bcmp() as it doesn't determine a tri-state like memcmp? |