From owner-freebsd-questions Wed Jun 20 10:23:59 2001 Delivered-To: freebsd-questions@freebsd.org Received: from serenity.mcc.ac.uk (serenity.mcc.ac.uk [130.88.200.93]) by hub.freebsd.org (Postfix) with ESMTP id 5524A37B401 for ; Wed, 20 Jun 2001 10:23:55 -0700 (PDT) (envelope-from jcm@freebsd-uk.eu.org) Received: from dogma.freebsd-uk.eu.org ([130.88.200.97] ident=root) by serenity.mcc.ac.uk with esmtp (Exim 2.05 #6) id 15Clhq-0007tv-00; Wed, 20 Jun 2001 18:23:54 +0100 Received: (from jcm@localhost) by dogma.freebsd-uk.eu.org (8.11.3/8.11.1) id f5KHNs904038; Wed, 20 Jun 2001 18:23:54 +0100 (BST) (envelope-from jcm) Date: Wed, 20 Jun 2001 18:23:53 +0100 From: j mckitrick To: John Merryweather Cooper Cc: freebsd-questions@freebsd.org Subject: Re: what does this define do? Message-ID: <20010620182353.A3958@dogma.freebsd-uk.eu.org> References: <20010620173855.A2941@dogma.freebsd-uk.eu.org> <20010620094925.A14541@johncoop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <20010620094925.A14541@johncoop>; from jmcoopr@webmail.bmi.net on Wed, Jun 20, 2001 at 09:49:25AM -0700 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG | This is, of course, highly compiler dependent. Looks like somebody is | concerned with the efficiency of a MOV AX, 0 as opposed to an XOR AX, AX. I wondered about that. But i agree, with no way of knowing what the compiler is doing anyway, it doesn't make much sense. The way it is being used seems to invalid the potential benefit: static char var = FLAG1 | FLAG2 | n(FLAG3) because the compiler might drop the n() values anyway, since ORing with 0 does nothing anyway. I can understand the n() values being in the code as placeholders, so you can see what lines are hi or low on the hardware register, but if the compiler drops them anyway, optimizing the macro rather than just using 0 doesn't seem to buy any benefits. Jonathon -- "It is through will alone I set my mind in motion...." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message