Re: -mregparm=3

Rogier Wolff (R.E.Wolff@BitWizard.nl)
Thu, 9 Jul 1998 08:27:21 +0200 (MET DST)


Benjamin C.R. LaHaise wrote:
> leal 28(%esp),%edx
> 1-> movl %edi,%eax
> 2-> movl 8(%ebp),%eax
> call *%eax
> ...
> .ident "GCC: (GNU) 2.8.1"
>
> Gcc reuses eax for the function pointer after having loaded it with the
> parameter for ei_get_8390_hdr. Hopefully gcc is ok when calling a
> specific function. I stand by my claim that -mregparm is currently
> unreliable.

Hey, thats funny. that's almost the same bug that I found about 10
years ago in Turbo Pascal. It goofed on code that did
function (array[i])
when the elements were a power of two in size. It would put
something in the cx register, and then use the lower byte of that
for the shiftcount...... History repeats....

...

And repeats.....

Roger.

-- 
Actor asks a collegue: "To what do you owe your success in acting?"
Answer: "Honesty. Once you've learned how to fake that, you've got it made."
-------- Custom Linux device drivers for sale! Call for a quote. ----------
Email: R.E.Wolff@BitWizard.nl || Tel: +31-15-2137555 || FAX: +31-15-2138217

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu