1
0
forked from 0ad/0ad

Fix the calling conventions properly this time (I hope)

This was SVN commit r7542.
This commit is contained in:
Ykkrosh 2010-05-13 16:22:07 +00:00
parent f728050b3f
commit 202b13d557
2 changed files with 12 additions and 9 deletions

View File

@ -519,9 +519,12 @@ static const char* listCppTargets(const char* name)
strcpy(input_dir, path_translate(path_getdir(name) , NULL)); strcpy(input_dir, path_translate(path_getdir(name) , NULL));
strcat(input_dir, "/"); strcat(input_dir, "/");
opts = ""; if (os_is("windows"))
if (!os_is("windows") && !os_is("macosx")) opts = "";
opts = "-dDONT_USE_UNDERLINE=1 -dOS_LINUX=1 "; else if (os_is("macosx"))
opts = "-dOS_UNIX=1 ";
else
opts = "-dDONT_USE_UNDERLINE=1 -dOS_UNIX=1 ";
strcat(g_buffer, "nasm "); strcat(g_buffer, opts); strcat(g_buffer, "nasm "); strcat(g_buffer, opts);
strcat(g_buffer, " -i"); strcat(g_buffer,input_dir ); strcat(g_buffer, " -i"); strcat(g_buffer,input_dir );

View File

@ -1,12 +1,12 @@
%ifdef OS_WIN %ifdef OS_UNIX
%define arg0 rcx
%define arg1 rdx
%define arg2 r8
%define arg3 r9
%else
%define arg0 rdi %define arg0 rdi
%define arg1 rsi %define arg1 rsi
%define arg2 rdx %define arg2 rdx
%define arg3 rcx %define arg3 rcx
%else
%define arg0 rcx
%define arg1 rdx
%define arg2 r8
%define arg3 r9
%endif %endif