Date: Wed, 20 Jun 2001 18:23:53 +0100 From: j mckitrick <jcm@FreeBSD-uk.eu.org> To: John Merryweather Cooper <jmcoopr@webmail.bmi.net> Cc: freebsd-questions@freebsd.org Subject: Re: what does this define do? Message-ID: <20010620182353.A3958@dogma.freebsd-uk.eu.org> In-Reply-To: <20010620094925.A14541@johncoop>; from jmcoopr@webmail.bmi.net on Wed, Jun 20, 2001 at 09:49:25AM -0700 References: <20010620173855.A2941@dogma.freebsd-uk.eu.org> <20010620094925.A14541@johncoop>
next in thread | previous in thread | raw e-mail | index | archive | help
| 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010620182353.A3958>