From 236c23eb625fc3d412b3105ab6e67723d661348d Mon Sep 17 00:00:00 2001 From: notaz Date: Sat, 24 Oct 2015 23:53:05 +0300 Subject: [PATCH] translate: don't overpromote to fastcall this creates false register deps and leads to problems --- tools/translate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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) -- 2.39.5