Re: Algoritmic Complexity Attacks and 2.4.20 the dcache code

Aaron Lehmann (aaronl@vitelus.com)
Sat, 31 May 2003 11:40:23 -0700


On Fri, May 30, 2003 at 11:45:29PM -0700, David S. Miller wrote:
> From: William Lee Irwin III <wli@holomorphy.com>
> Date: Fri, 30 May 2003 23:41:38 -0700
>
> If it's literally that trivial I'll put digging around the machine
> descriptions on my TODO list.
>
> Look at TARGET_RTX_COSTS, thats where all of this happens.

Reading the code that handles this stuff (expmed.c) always cracks me up.

/* We might want to refine this now that we have division-by-constant
optimization. Since expand_mult_highpart tries so many variants, it is
not straightforward to generalize this. Maybe we should make an array
of possible modes in init_expmed? Save this for GCC 2.7. */

/* We could just as easily deal with negative constants here,
but it does not seem worth the trouble for GCC 2.6. */

/* This is extremely similar to the code for the unsigned case
above. For 2.7 we should merge these variants, but for
2.6.1 I don't want to touch the code for unsigned since that
get used in C. The signed case will only be used by other
languages (Ada). */

Sometimes I wish the gcc code was tame enough for me to work on.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/