From owner-freebsd-current@FreeBSD.ORG Wed Aug 25 11:12:24 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2218B16A4CE for ; Wed, 25 Aug 2004 11:12:24 +0000 (GMT) Received: from internal.mail.demon.net (internal.mail.demon.net [193.195.224.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7589843D41 for ; Wed, 25 Aug 2004 11:12:23 +0000 (GMT) (envelope-from mike@urgle.com) Received: from singsing.eng.demon.net (singsing.eng.demon.net [194.217.90.11]) by internal.mail.demon.net with ESMTP id i7PBF0414733; Wed, 25 Aug 2004 11:15:00 GMT Received: from singsing.eng.demon.net (localhost [127.0.0.1]) i7PBCHqn061636; Wed, 25 Aug 2004 12:12:17 +0100 (BST) (envelope-from mike@urgle.com) Received: (from michaelb@localhost) by singsing.eng.demon.net (8.12.10/8.12.10/Submit) id i7PBCGoC061635; Wed, 25 Aug 2004 12:12:16 +0100 (BST) (envelope-from mike@urgle.com) X-Authentication-Warning: singsing.eng.demon.net: michaelb set sender to mike@urgle.com using -f From: Mike Bristow To: "Li, Qing" In-Reply-To: <00CDF9AA240E204FA6E923BD35BC6436063B074A@bcs-mail.internal.cacheflow.com> References: <00CDF9AA240E204FA6E923BD35BC6436063B074A@bcs-mail.internal.cacheflow.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: (none) Message-Id: <1093432335.57022.141.camel@singsing.eng.demon.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 25 Aug 2004 12:12:16 +0100 cc: freebsd-current@freebsd.org Subject: RE: IPv4 checksum oddness (gcc compiler bug?) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Aug 2004 11:12:24 -0000 On Wed, 2004-08-25 at 00:57, Li, Qing wrote: > I ran into a checksum problem and filed the following bug > report. > See if it's related. > > http://www.freebsd.org/cgi/query-pr.cgi?pr=69257 To quote from Apple's GCC 3.3 docs: You can't expect a sequence of volatile asm instructions to remain perfectly consecutive. If you want consecutive output, use a single asm. Also, GCC will perform some optimizations across a volatile asm instruction; GCC does not "forget everything" when it encounters a volatile asm instruction the way some other compilers do. I've added a patch to the PR above which uses a single asm statement; I'll make some noise about it post 5.3. -- Mike Bristow - http://www.urgle.com/~mike/ - mike@urgle.com Why did the farmer call his horse Blacksmith? Mrs Sippi