https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66275

--- Comment #5 from Uroš Bizjak <ubizjak at gmail dot com> ---
Kai, can you please test the patch on x86_64-w64-mingw32 ?

The patch has been bootstrapped and regression tested on x86_64-linux-gnu, but
there is the comment which I'm not sure still applies:

   /* TODO: The function should depend on current function ABI but
      builtins.c would need updating then. Therefore we use the
      default ABI.  */

The patch fixes ix86_function_arg_regno_p and ix86_function_value_regno_p to
follow the ABI attribute. So, if there is ABI attribute specified, it won't
just change mid-compilation. If cfun is non-NULL, we can look into
cfun->machine->call_abi, to determine current ABI.

With the proposed patch, we get:

;;  entry block defs     0 [ax] 1 [dx] 2 [cx] 4 [si] 5 [di] 6 [bp] 7 [sp] 16
[argp] 20 [frame] 21 [xmm0] 22 [xmm1] 23 [xmm2] 24 [xmm3] 25 [xmm4] 26 [xmm5]
27 [xmm6] 28 [xmm7] 37 [r8] 38 [r9]

And AFAICS the assembly looks correct.

Reply via email to