Following info I found in emxgnu.inf
>
> The calling convention used by GCC is almost compatible with the `system' calling
>convention of IBM C Set/2. Structures are returned differently: IBM C Set/2 uses a
>hidden parameter which is removed from the stack by the caller, GCC returns the
>structure in registers EAX and EDX if its size is 8 bytes or less
>(-freg-struct-return is the default). GCC uses a hidden parameter if the size of the
>structure is more than 8 bytes, but the callee removes the hidden parameter from the
>stack. Currently, the GCC option -fpcc-struct-return doesn't solve that problem.
>Instead, rewrite the function and the function call as follows:
> /* Original code */
> struct s1 func1 (int a1)
> {
> struct s1 t1;
> ...
> return (t1);
> }
> ...
>
> struct s1 v1;
> v1 = f1 (0);
>
>
> /* Modified code */
>
> struct s1 *f1 (struct s1 *ret, int a1)
> {
> struct s1 t1;
> ...
> *ret = t1;
> return (ret);
> }
>
> ...
>
> struct s1 v1;
> f1 (&v1, 0);