From owner-cvs-sys Sat Sep 14 00:41:18 1996 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id AAA15365 for cvs-sys-outgoing; Sat, 14 Sep 1996 00:41:18 -0700 (PDT) Received: (from bde@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id AAA15326; Sat, 14 Sep 1996 00:41:07 -0700 (PDT) Date: Sat, 14 Sep 1996 00:41:07 -0700 (PDT) From: Bruce Evans Message-Id: <199609140741.AAA15326@freefall.freebsd.org> To: CVS-committers, cvs-all, cvs-sys Subject: cvs commit: src/sys/i386/boot/biosboot disk.c sys.c Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk bde 96/09/14 00:41:07 Modified: sys/i386/boot/biosboot disk.c sys.c Log: Moved instantiation of `poff' to sys.c. It is no longer used in disk.c. Saved a few bytes by copying `dosdev' and/or `name' to local variables. This optimization (for dosdev) was done in one place before but this was lost in the devread() cleanup. This optimization (for dosdev) can almost be done by bogusly declaring dosdev as const, but gcc still often space-pessimizes code like the following: extern const int dosdev; ... foo(dosdev); bar(dosdev); gcc often doesn't bother to copy dosdev to a temporary local because the local would have to be preserved in memory across the call to foo(). OTOH, for extern int dosdev; ... auto int dosdev_copy = dosdev; ... foo(dosdev_copy); bar(dosdev_copy); the copy must be made because foo() might alter dosdev. Revision Changes Path 1.20 +12 -9 src/sys/i386/boot/biosboot/disk.c 1.15 +18 -15 src/sys/i386/boot/biosboot/sys.c