5 ms·
You're missing the architecture-dependent implementations. Here's one for i386: http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/arch/i386/string/strlen.S?re
by dchest 18y ago
You're missing the architecture-dependent implementations. Here's one for i386:
http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/arch/i386/string/strlen.S?rev=1.3;content-type=text%2Fplain http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/arch/i386...
- tptacek 18y agoNote that this doesn't get used on x86-64, where the repne scasb sequence is apparently penalized.
- dchest 18y agoTheir x86-64 implementation is in amd64 tree: http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/arch/amd64/string/strlen.S?rev=1.1;content-type=text%2Fplain http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/arch/amd6... It uses repne scasb. Comment in x86-65 directory says: "change amd64's MACHINE_ARCH from x86_64 to amd64. There are many many reasons for this, quite a few of them technical, and not all of them in response to Intel's broken ia32e crud. The gcc toolchain stays at x86_64 for now."
- tptacek 18y agoWeird, I wonder why I thought it wasn't. I'll go look. Thanks!