<p>So i have a piece of assembly that needs to call a function with the fastcall calling convention on windows, but gcc doesn't (afaict) support it.  GCC does provide the regparm attribute but that expects the first 3 parameters to be passed in eax, edx and ecx, whereas fastcall expects the first two parameters to be passed in ecx and edx.</p>

<p>I'm merely trying to avoid effectively duplicating a few code paths, so this isn't exactly critical, but it would be great if it were avoidable.</p>

If you're calling the function from asm then surely you have complete control over how you call the function. What's stopping you from just loading up the registers and issuing a
```
CALL
```
?