Page MenuHomeFreeBSD

amd64: import asm strlen into libc
ClosedPublic

Authored by mjg on Feb 21 2021, 9:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Sep 14, 4:38 AM
Unknown Object (File)
Tue, Sep 3, 8:29 PM
Unknown Object (File)
Sat, Aug 31, 3:05 PM
Unknown Object (File)
Fri, Aug 30, 12:13 AM
Unknown Object (File)
Aug 24 2024, 2:03 AM
Unknown Object (File)
Aug 15 2024, 11:45 PM
Unknown Object (File)
Jul 18 2024, 10:56 AM
Unknown Object (File)
Jul 1 2024, 5:37 AM
Subscribers
None

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mjg requested review of this revision.Feb 21 2021, 9:29 PM
mjg created this revision.
lib/libc/amd64/string/strlen.S
3

I do not think this is valid notice form about 'public domain'. At very least it should specify who wrote the code and put it into the public domain.

Look for other examples in the tree.

15

Why redefining this instead of including machine/asmacros.h ?

Adding the header fails to compile with:

In file included from /usr/src/lib/libc/amd64/string/strlen.S:7:
/usr/include/machine/asm.h:88:9: error: 'ALTENTRY' macro redefined [-Werror,-Wmacro-redefined]
#define ALTENTRY(x)     _ENTRY(x)
        ^

with a host of other errors

Using it instead of asm.h results in:

/usr/src/lib/libc/amd64/string/strlen.S:8:22: error: expected ')' in parentheses expression
__asm__(".ident\t\"" "$FreeBSD$" "\"");
                     ^

someone(tm) needs to clean this up and I don't think it's worth the effort now

This revision is now accepted and ready to land.Feb 22 2021, 10:57 PM
This revision was automatically updated to reflect the committed changes.