Re: [IDEA+RFC] Possible solution for min()/max() war

Petr Vandrovec (VANDROVE@vc.cvut.cz)
Tue, 4 Sep 2001 13:17:36 MET-1


On 4 Sep 01 at 12:09, VDA wrote:
> min2 performs a very strict checking.
> min3 gives you full control, but checks for too small target type.
> Do anybody see any flaws? Any improvements?
> For compiler folks: Why GCC compiles ...f(1);f(1);f(1)... to
> ...
> pushl $1
> call f
> addl $32,%esp <-- My grandma optimizes better
> addl $-12,%esp <-- ?
> pushl $1
> call f
> addl $16,%esp <-- ?
> addl $-12,%esp <-- ?

Compile with 'gcc -mpreferred-stack-boundary=2', gcc generates
unbelievable stupid code for other values.
Best regards,
Petr Vandrovec
vandrove@vc.cvut.cz

-
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/