Re: [PATCH 1/7] Fix function argument and return value locations

Simon Marchi
2020-05-26T16:14:30Z

On 2020-05-25 7:03 p.m., Hannes Domani via Gdb-patches wrote:
> You're absolutely right again.
> The complex arguments didn't work before, so I just tried it with
> amd64_windows_passed_by_xmm_register (because that seemed the obvious choice
> for me), and then it worked.
>
> But it only worked because in case of XMM register, the argument is also
> passed via the integer register:
>
>       else if (amd64_windows_passed_by_xmm_register (type))
>         {
>           amd64_windows_store_arg_in_reg
>             (regcache, args[i], AMD64_XMM0_REGNUM + reg_idx);
>           /* In case of varargs, these parameters must also be
>          passed via the integer registers.  */
>           amd64_windows_store_arg_in_reg
>         (regcache, args[i],
>          amd64_windows_dummy_call_integer_regs[reg_idx]);
>           on_stack_p = 0;
>           reg_idx++;
>         }
>
> So it actually should be added to amd64_windows_passed_by_integer_register,
> and a quick test just now confirms that this also works.
>
> I'm very sorry about that, I should have checked the asm code.

I don't deserve much credit, I just randomly poked at it :)

Simon