kernel and world - Replace bcmp/bcopy/bzero/memcmp/memcpy/memmove/memset* Replace bcmp/bcopy/bzero/memcmp/memcpy/memmove/memset with mjg's code, with some minor adjustments.* mjg's code has bee
kernel and world - Replace bcmp/bcopy/bzero/memcmp/memcpy/memmove/memset* Replace bcmp/bcopy/bzero/memcmp/memcpy/memmove/memset with mjg's code, with some minor adjustments.* mjg's code has been given its own header file, <machine/asm_mjgmacros.h>* Also replaces copyin and copyout.* Around a 1.7% improvement in bulk-build performance.
show more ...
kernel - make bcmp linux-compatible, add memcmpworld - make bcmp linux-compatible* Make bcmp and memcmp the same. Our bcmp() was returning 0 or 1 (not subtracting the last byte), which is comp
kernel - make bcmp linux-compatible, add memcmpworld - make bcmp linux-compatible* Make bcmp and memcmp the same. Our bcmp() was returning 0 or 1 (not subtracting the last byte), which is compatible with the manual page but it isn't what linux does.* It also looks like memcmp is sometimes turned into bcmp by the compiler (?), at least when compiling the kernel, so we don't want to break that either.* Add memcmp to the kernel build, synchronize both memcmp and bcmp from libc.* This makes our bcmp compatible with linux.
kernel - Refactor bcmp, bcopy, bzero, memset* For now continue to use stosq/stosb, movsq/movsb, cmpsq/cmpsb sequences which are well optimized on AMD and Intel. Do not just use the '*b' string
kernel - Refactor bcmp, bcopy, bzero, memset* For now continue to use stosq/stosb, movsq/movsb, cmpsq/cmpsb sequences which are well optimized on AMD and Intel. Do not just use the '*b' string op. While this is optimized on Intel it is not optimized on AMD.* Note that two string ops in a row result in a serious pessimization. To fix this, for now, conditionalize the movsb, stosb, or cmpsb op so it is only executed when the remaining count is non-zero. That is, assume nominal 8-byte alignment.* Refactor pagezero() to use a movq/addq/jne sequence. This is significantly faster than movsq on AMD and only just very slightly slower than movsq on Intel.* Also use the above adjusted kernel code in libc for these functions, with minor modifications. Since we are copying the code wholesale, replace the copyright for the related files in libc.* Refactor libc's memset() to replicate the data to all 64 bits code and then use code similar to bzero().Reported-by: mjg_ (info on pessimizations)
Fix few typos.While there, make few whitespace adjustments.
libc/x86-64: Add GNU-stack ELF notes to many assembly filesMost of the assembly files in libc/x86-64 were missing GNU-stack ELFnotes (they never had them) which means libc and every program thatl
libc/x86-64: Add GNU-stack ELF notes to many assembly filesMost of the assembly files in libc/x86-64 were missing GNU-stack ELFnotes (they never had them) which means libc and every program thatlinks with it has required an executable stack. I need to determinea way to check which object files are missing this section and makesure every single libc object file is covered.
Fix typos in the licenses: withough -> withoutReported-by: vsrinivas
libc: Add assembler versions of fls, flsl, and ffsl for i386 and x86_64.
rename amd64 architecture to x86_64The rest of the world seems to call amd64 x86_64. Bite the bullet andrename all of the architecture files and references. This willhopefully make pkgsrc build
rename amd64 architecture to x86_64The rest of the world seems to call amd64 x86_64. Bite the bullet andrename all of the architecture files and references. This willhopefully make pkgsrc builds less painful.Discussed-with: dillon@
Revert "rename amd64 architecture to x86_64"This reverts commit c1543a890188d397acca9fe7f76bcd982481a763.I'm reverting it because: 1) the change didn't get properly discussed 2) it was based on
Revert "rename amd64 architecture to x86_64"This reverts commit c1543a890188d397acca9fe7f76bcd982481a763.I'm reverting it because: 1) the change didn't get properly discussed 2) it was based on false premises: "The rest of the world seems to call amd64 x86_64." 3) no pkgsrc bulk build was done to test the change 4) the original committer acted irresponsibly by committing such a big change just before going on vacation.