Messages in this thread | | | Date | Wed, 8 Jul 1998 11:42:03 -0400 (EDT) | From | "Benjamin C.R. LaHaise" <> | Subject | Re: -mregparm=3 |
| |
On Tue, 7 Jul 1998, Andrea Arcangeli wrote:
> What about to compile the kernel with -mregparm=3? On linux-c-programming > we made some tests and seems that using regparm(3) in the most of > functions of bzip2 improve bzip2 of 6%.
<sigh> It's a wonderful idea that really cuts down on the cost of function calls quite a bit, but alas, neither gcc nor egcs work even vaguely reliably with the -mregparm option. Circa 2.1.24, I patched up the assembly portions of the kernel to deal with the register parameter passing, and it was able to boot fairly far, until it hit assembly that in no way corresponded to the source... Unfortunately, incorrect code seems to be occasionally emitted for function calls through function pointers -- which is a heavily used feature of the C language throughout the kernel. Last time I reported the bug to the egcs people (gcc-bugs never responded), I got back a reply to the tune of it being too complicated to fix. Fwiw, I extracted a portion of the NE2000 driver that demonstrates the bug (that's where my -mregparm'd kernel would Oops during booting).
-ben
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |