Re: [PATCH] document optimizing macro for translating PROT_ to VM_ bits

From: Muli Ben-Yehuda
Date: Tue Sep 30 2003 - 02:43:02 EST


On Tue, Sep 30, 2003 at 04:34:31PM +0900, Miles Bader wrote:
> Muli Ben-Yehuda <mulix@xxxxxxxxx> writes:
> > Ah, much nicer, thank you. I'll submit it, but first, what do you
> > think about this version? it keeps the optimization and enforces the
> > "bit1 and bit2 must be single bits only" rule.
>
> On my arch it results in huge bloated code, including mul and div
> insns!

Eeek!

> [I've no idea what's up with that, I don't even think the generated code
> makes sense, but it seems like the presence of inline function is
> confusing something.]

Ok, that's a pretty convincing argument for scraping that
version. I'll rewrite it to evaluate the arguments at compile time if
they're constants, which they are, in our case. Unless someone else
beats me to it, of course ;-)
--
Muli Ben-Yehuda
http://www.mulix.org

Attachment: signature.asc
Description: Digital signature