From owner-freebsd-current@FreeBSD.ORG Sun Aug 2 15:37:40 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BBFF106566B for ; Sun, 2 Aug 2009 15:37:40 +0000 (UTC) (envelope-from dalroi@solfertje.student.utwente.nl) Received: from solfertje.student.utwente.nl (solfertje.student.utwente.nl [130.89.167.40]) by mx1.freebsd.org (Postfix) with ESMTP id 4FFA08FC14 for ; Sun, 2 Aug 2009 15:37:39 +0000 (UTC) (envelope-from dalroi@solfertje.student.utwente.nl) Received: from localhost (localhost [127.0.0.1]) by solfertje.student.utwente.nl (Postfix) with SMTP id 00BFE802A for ; Sun, 2 Aug 2009 17:37:38 +0200 (CEST) Received: from hollewijn.internal (hollewijn.internal [10.236.150.4]) by solfertje.student.utwente.nl (Postfix) with ESMTP id DA3D3802E; Sun, 2 Aug 2009 17:37:36 +0200 (CEST) Message-Id: From: Alban Hertroys To: Christoph Mallon In-Reply-To: <4A75AC3D.6020507@gmx.de> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Date: Sun, 2 Aug 2009 17:37:36 +0200 References: <4A756214.8010002@elischer.org> <4A756BA1.90002@gmx.de> <9A2BA686-016B-4B60-A247-7321C1E7F51A@solfertje.student.utwente.nl> <4A75AC3D.6020507@gmx.de> X-Mailer: Apple Mail (2.935.3) X-DSPAM-Result: Innocent X-DSPAM-Processed: Sun Aug 2 17:37:38 2009 X-DSPAM-Confidence: 1.0000 X-DSPAM-Probability: 0.0023 X-DSPAM-Signature: 930,4a75b2c210131568315957 X-DSPAM-Factors: 27, but, 0.40000, Message-Id*7819E3A46E1D+solfertje.student.utwente.nl>, 0.40000, From*Alban, 0.40000, just, 0.40000, >+But, 0.40000, Date*Aug+2009, 0.40000, References*<4A756214.8010002, 0.40000, Message-Id*79FD, 0.40000, References*<4A75AC3D.6020507+gmx.de>, 0.40000, Mime-Version*Message, 0.40000, optimisation, 0.40000, one+to, 0.40000, have+no, 0.40000, an, 0.40000, an, 0.40000, References*<9A2BA686, 0.40000, trees, 0.40000, trees, 0.40000, doesn't+help, 0.40000, meant, 0.40000, Cc*FreeBSD+Current, 0.40000, cut, 0.40000, of, 0.40000, of, 0.40000, the+integer, 0.40000, >+Alban, 0.40000, But, 0.40000 Cc: Julian Elischer , FreeBSD Current Subject: Re: puzzling code in pcpu stuff X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 02 Aug 2009 15:37:40 -0000 On 2 Aug 2009, at 17:09, Christoph Mallon wrote: > Alban Hertroys schrieb: >> Not being familiar with x86 assembly doesn't help me here of >> course, the last time I touched assembly was on a Z80 a couple of >> decades back... > > Similarily, if you are not familiar with C, then ++i; will puzzle > you. Do you want to add /* add one to the integer variable named i > */ everywhere? > But you've got one point: There should be a comment added, which > states that the if () is just an optimisation. Ah sorry, that wasn't meant as a comment on the lack of comments on assembly code but merely as an aside that _I_ can't really comment on assembly code due to my lack of experience with it. I trust that most FreeBSD developers have no issues with reading assembly like this, so there is no real need to add comments there (unless something it does isn't immediately obvious of course). Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:930,4a75b2c210131568315957!