------- Comment #15 from rth at gcc dot gnu dot org 2009-09-09 21:28 ------- (In reply to comment #13) > Could this chain perhaps be moved to %edx?
No, regparm(3) uses all of %eax, %edx, %ecx. There are no other available call-clobbered registers. Incidentally, fastcall functions are currently broken as well, though for them %eax is available as a scratch. > Could trampoline just push %ecx as its first operation? this way > trampoline would "convert" regparm(2) to regparm(3) function No. Any change that affects the stack cannot be done in the trampoline only, as the stack change needs to be undone in the nested function itself. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41246