From owner-cvs-sys Sat Apr 13 07:37:33 1996 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id HAA26160 for cvs-sys-outgoing; Sat, 13 Apr 1996 07:37:33 -0700 (PDT) Received: (from jhay@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id HAA26141 Sat, 13 Apr 1996 07:37:24 -0700 (PDT) Date: Sat, 13 Apr 1996 07:37:24 -0700 (PDT) From: John Hay Message-Id: <199604131437.HAA26141@freefall.freebsd.org> To: CVS-committers, cvs-all, cvs-sys Subject: cvs commit: src/sys/netipx ipx_usrreq.c Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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