From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2000-11-30 00:04:45
Hi! On Wed, Nov 29, 2000 at 05:32:12PM -0500, Greg King wrote: > The library's "enter" subroutine can compute that length. It gets the size > of the entire argument-list from the caller. Cc65 can give, to "enter," > the size of the fixxed part of that list. The subroutine can subtract one > size from the other, and put the difference on the stack. After that, the > compiler can include code to add it to offsets whenever cc65 wants a named > argument. Yes that's a good idea. It is not even needed to change the enter subroutine, since it does already store the size of all arguments into a stack location so the correct number of parameters can be dropped on function exit. When generating code, the compiler can account for the know size of fixed parameters. Doing this would mean that access to the "fixed" parameters is slower than usual, since the stack offset has to be calculated for the access. On the other side, it would be transparent for the programmer, and the non-standard va_fix macro is no longer needed. I don't think this will go into the next release, since there is not enough time left to implement and test it, but I will have a look at it once the new release is out. Thanks for your support! Regards Uz -- Ullrich von Bassewitz uz_at_musoftware.de
This archive was generated by hypermail 2.1.3 : 2001-12-14 22:05:37 CET