From: notaz Date: Sat, 24 Oct 2015 20:53:05 +0000 (+0300) Subject: translate: don't overpromote to fastcall X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=236c23eb625fc3d412b3105ab6e67723d661348d;p=ia32rtools.git translate: don't overpromote to fastcall this creates false register deps and leads to problems --- diff --git a/tools/translate.c b/tools/translate.c index 44d6fb4..8ebda82 100644 --- a/tools/translate.c +++ b/tools/translate.c @@ -8634,8 +8634,9 @@ static void output_hdr_fp(FILE *fout, const struct func_prototype *fp, argc_normal++; regmask_dep = 0; } - else if (regmask_dep && (fp->is_stdcall || fp->argc_stack == 0) - && (regmask_dep & ~(mxCX | mxDX)) == 0) + else if ((regmask_dep == (mxCX | mxDX) + && (fp->is_stdcall || fp->argc_stack == 0)) + || (regmask_dep == mxCX && fp->argc_stack == 0)) { fprintf(fout, " __fastcall "); if (!(regmask_dep & (1 << xDX)) && fp->argc_stack == 0)