Robert Shearman rob@codeweavers.com writes:
- "shrl $2, %ecx\n\t" /* divide by 4 */
- "rep movsl\n\t" /* Copy dword blocks */
- "movl %eax, %ecx\n\t"
- "andl $3, %ecx\n\t" /* modulus 4 */
- "rep movsb\n\t" /* Copy remainder */
If the argument size is not a multiple of 4 you are in serious trouble...
Instead of reinventing it I'd suggest copying the call_entry_point function from dlls/ntdll/relay.c, it will also get the stack alignment right (plus it saves ebp at the right place ;-)