Re: [PATCH] reduce large stack usage

From: Arnd Bergmann (arnd@arndb.de)
Date: Sun Mar 02 2003 - 12:07:53 EST


On Sunday 02 March 2003 16:26, Manfred Spraul wrote:

> What do you mean with broken? On i386, the function needs 32 byte stack
> + the space for register saving.
> It must be either a gcc bug, or a bug in your detection script - I don't
> see anything special in twofish_setkey.

You are right that the code itself is not broken -- I did not read it
properly at first. The stack frame gets small if I compile for s390x
with -fno-schedule-insn, so I suppose that optimization does
not work to well on this particular code. I'll try a different compiler
tomorrow.

I can verify the 32 bytes on i386 with both gcc-3.2 and gcc-3.3-snapshot.
However, when compiling i386 twofish with gcc-2.95, I get an 804 bytes
stack frame. Other architectures are probably somewhere in between
i386 and s390x here, so there should be done something about this.

        Arnd <><
-
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 Mar 07 2003 - 22:00:18 EST