Date: Sat, 13 Apr 1996 07:37:24 -0700 (PDT) From: John Hay <jhay> To: CVS-committers, cvs-all, cvs-sys Subject: cvs commit: src/sys/netipx ipx_usrreq.c Message-ID: <199604131437.HAA26141@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
jhay 96/04/13 07:37:23 Modified: sys/netipx ipx_usrreq.c Log: Don't use a newfangled auto initializer. Initialize everything by assignment to avoid one bug and several pessimizations. In the old version, gcc-2.6.3 (i386 version) generates 16 bytes of static data and copies it using 4 4-byte load-stores. gcc-2.7.2 generates 2 1-byte stores and calls memset() to zero 14 bytes. Linking fails because memset() doesn't exist in the kernel. In both versions, the 2 bytes stored directly are all that is actually used unless the null padding at the end is used, since the 3 4-byte words in the middle are initialized again by struct assignment. These words are misaligned. gcc generates misaligned load-stores for (small) misaligned struct copies. Submitted by: Bruce Evans Revision Changes Path 1.6 +6 -2 src/sys/netipx/ipx_usrreq.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604131437.HAA26141>