2 * CAPTIVE_STDCALL calling by hand as GCC has it broken
3 * Copyright (C) 2003 Jan Kratochvil <project-captive@jankratochvil.net>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; exactly version 2 of June 1991 is required
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 * typedef gpointer CAPTIVE_STDCALL (*CaptiveStdCallFunc4 )(gpointer arg0);
22 * gpointer captive_stdcall_call_4 (CaptiveStdCallFunc4 func,gpointer arg0);
24 .globl captive_stdcall_call_4
25 captive_stdcall_call_4:
26 pushl %ebp /* std stack frame */
27 movl %esp,%ebp /* std stack frame */
28 pushl 12(%ebp) /* arg0 */
29 movl 8(%ebp),%eax /* func */
31 /* keep '%eax' return value */
36 * typedef gpointer CAPTIVE_STDCALL (*CaptiveStdCallFunc8 )(gpointer arg0,gpointer arg1);
37 * gpointer captive_stdcall_call_8 (CaptiveStdCallFunc8 func,gpointer arg0,gpointer arg1);
39 .globl captive_stdcall_call_8
40 captive_stdcall_call_8:
41 pushl %ebp /* std stack frame */
42 movl %esp,%ebp /* std stack frame */
43 pushl 16(%ebp) /* arg1 */
44 pushl 12(%ebp) /* arg0 */
45 movl 8(%ebp),%eax /* func */
47 /* keep '%eax' return value */
52 * typedef gpointer CAPTIVE_STDCALL (*CaptiveStdCallFunc12)(gpointer arg0,gpointer arg1,gpointer arg2);
53 * gpointer captive_stdcall_call_12(CaptiveStdCallFunc12 func,gpointer arg0,gpointer arg1,gpointer arg2);
55 .globl captive_stdcall_call_12
56 captive_stdcall_call_12:
57 pushl %ebp /* std stack frame */
58 movl %esp,%ebp /* std stack frame */
59 pushl 20(%ebp) /* arg2 */
60 pushl 16(%ebp) /* arg1 */
61 pushl 12(%ebp) /* arg0 */
62 movl 8(%ebp),%eax /* func */
64 /* keep '%eax' return value */