From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <985de6bd0d7ab132a2c3708e4d8d3963@plan9.bell-labs.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] how to avoid a memset() optimization From: "Russ Cox" MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Thu, 14 Nov 2002 12:28:10 -0500 Topicbox-Message-UUID: 200f7794-eacb-11e9-9e20-41e7f4b1d025 > Do you really want the compiler to always generate code > MOV R1,#0 > MOV R2,#0 > AND R2,R1 > MOV R2,X(SP) > ? Almost any modern compiler will peform the AND at > compiler time (constant folding), and most customers want > that. Anyway, I don't see why you need to AND in this > context. Are you talking about the C and V bits? If some > other process can inspect those for your process I'd think > it could inspect a whole lot more.. i _said_ it was a stupid argument. my point was more that volatile addresses memory optimizations but not necessarily other things which might matter just as much.