From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 0ABF2388F053 for ; Tue, 26 May 2020 16:14:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0ABF2388F053 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark@simark.ca Received: from [172.16.0.95] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 765901E5F9; Tue, 26 May 2020 12:14:29 -0400 (EDT) Subject: Re: [PATCH 1/7] Fix function argument and return value locations To: Hannes Domani , Gdb-patches References: <20200525185659.59346-1-ssbssa@yahoo.de> <20200525185659.59346-2-ssbssa@yahoo.de> <7c09d137-6938-6a01-3f8d-ff8ae26c87b5@simark.ca> <977050290.5716513.1590442329577@mail.yahoo.com> <1cc831e4-c36a-d0a3-a500-7f57bc7775e9@simark.ca> <64358647.5760638.1590447781446@mail.yahoo.com> From: Simon Marchi Message-ID: <8bdc3e1d-9a23-7ba9-0952-ad2c6f0f2a61@simark.ca> Date: Tue, 26 May 2020 12:14:28 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <64358647.5760638.1590447781446@mail.yahoo.com> Content-Type: text/plain; charset=utf-8 Content-Language: tl Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, BODY_8BITS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 May 2020 16:14:31 -0000 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