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

From: Petr Vandrovec (VANDROVE@vc.cvut.cz)
Date: Tue Sep 04 2001 - 06:22:45 EST


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/



This archive was generated by hypermail 2b29 : Fri Sep 07 2001 - 21:00:24 EST