From owner-cvs-all Mon Dec 4 13:12:13 2000 From owner-cvs-all@FreeBSD.ORG Mon Dec 4 13:12:09 2000 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from green.dyndns.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 98B2837B402; Mon, 4 Dec 2000 13:12:06 -0800 (PST) Received: from localhost (8yoehb@localhost [127.0.0.1]) by green.dyndns.org (8.11.0/8.11.0) with ESMTP id eB4LBx736905; Mon, 4 Dec 2000 16:12:03 -0500 (EST) (envelope-from green@FreeBSD.org) Message-Id: <200012042112.eB4LBx736905@green.dyndns.org> X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 To: Peter Wemm Cc: John Baldwin , Jeroen Ruigrok van der Werven , cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/tail forward.c read.c reverse.c tail In-Reply-To: Message from Peter Wemm of "Mon, 04 Dec 2000 11:55:32 PST." <200012041955.eB4JtWJ11058@mobile.wemm.org> From: "Brian F. Feldman" Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 04 Dec 2000 16:11:59 -0500 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Peter Wemm wrote: > John Baldwin wrote: > > > > On 03-Dec-00 Jeroen Ruigrok van der Werven wrote: > > > asmodai 2000/12/03 09:05:45 PST > > > > > > Modified files: > > > usr.bin/tail forward.c read.c reverse.c tail.c > > > Log: > > > Remove register keyword usage with prejudice. > > > Modern compilers are smarter when it comes to allocating register > > > usage. > > > > They also ignore the register keyword, so this is a rather pointless change, > > although it does add to repo bloat and in more active code could make diffs > > harder to read. :-/ > > It doesn't actually ignore it. Try this: > > register int foo; > printf("%p\n", &foo); > > This does get in the way at times, which is why people remove it. For example, converting macros to side-effect-safe (macros|inline functions). #define M_PREPEND(m, plen, how) do { \ struct mbuf **_mmp = &(m); \ is my example for why it's useful not to try to force the compiler into using registers. Besides, I only know of one case when a register keyword does something: register reg_type variable __asm__("reg"). Even in that case, it's useless because that declaration will be optimized by the compiler (volatile doesn't help) and made useless in the process by taking away the special treatment of it. So I can't see any use of register. -- Brian Fundakowski Feldman \ FreeBSD: The Power to Serve! / green@FreeBSD.org `------------------------------' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message