From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gateway36.websitewelcome.com (gateway36.websitewelcome.com [192.185.196.23]) by sourceware.org (Postfix) with ESMTPS id D567F383F858 for ; Thu, 7 May 2020 13:43:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D567F383F858 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=tom@tromey.com Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway36.websitewelcome.com (Postfix) with ESMTP id 0D01442584341 for ; Thu, 7 May 2020 08:02:10 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id Wgo7jh50K8vkBWgo7jOz9U; Thu, 07 May 2020 08:43:23 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=vPtlbG5F0plRIubZoidxgzY5ps1yTCArZCYR60Fjd1w=; b=bq2oEcIX/VsUWG/xxKOOFDORrZ mxtmnXB+EEQ3+EYoGrVT5SB0a+0w+BgTqDRIyaompn9s1bWO5bFZpz0tlDIdGTsUejLWs3tdCrn48 BXL2eUK1z2KSDbleLlSnPlmOP; Received: from 174-16-104-48.hlrn.qwest.net ([174.16.104.48]:34300 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1jWgo7-000oNG-2Q; Thu, 07 May 2020 07:43:23 -0600 From: Tom Tromey To: Hannes Domani via Gdb-patches Subject: Re: [RFC][PATCH] Fix function argument and return value locations References: <20200505133256.4790-1-ssbssa.ref@yahoo.de> <20200505133256.4790-1-ssbssa@yahoo.de> X-Attribution: Tom Date: Thu, 07 May 2020 07:43:22 -0600 In-Reply-To: <20200505133256.4790-1-ssbssa@yahoo.de> (Hannes Domani via Gdb-patches's message of "Tue, 5 May 2020 15:32:56 +0200") Message-ID: <87ftcbzwqt.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 174.16.104.48 X-Source-L: No X-Exim-ID: 1jWgo7-000oNG-2Q X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 174-16-104-48.hlrn.qwest.net (murgatroyd) [174.16.104.48]:34300 X-Source-Auth: tom+tromey.com X-Email-Count: 7 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, JMQ_SPF_NEUTRAL, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NEUTRAL, TXREP autolearn=no 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: Thu, 07 May 2020 13:43:34 -0000 >>>>> "Hannes" == Hannes Domani via Gdb-patches writes: Hannes> For return values, there were a lot more issues: Hannes> - TYPE_CODE_DECFLOAT is NOT returned via XMM0. Hannes> - long double is NOT returned via XMM0. Hannes> - but __int128 IS returned via XMM0. Hannes> - the comments for TYPE_CODE_FLT state that __m128, __m128i and __m128d are Hannes> returned by XMM0, and this is correct, but it doesn't actually check for Hannes> them, because they are TYPE_CODE_ARRAY with TYPE_VECTOR Hannes> Could it be that this depends on the version of the used compiler? It's definitely possible, but in this case I don't know. Normally, following the platform ABI is the best thing to do. In some cases, this isn't possible and you have to resort to other approaches, like compiler sniffing or whatever. I guess it's likely nobody ever tried these tests on Windows, or that they did but since the failures were 'baseline', they were just ignored. If the platform ABI doesn't cover the cases, but some common compiler (like gcc) does, then IMO it's fine to handle what the compiler emits. If compilers disagree, then it gets more difficult. Hannes> Also, in call-sc.exp, for the "value foo returned" test, I'm wondering Hannes> if it can really ever return 90. I think the idea there is that 90 is 'Z', so this catches the case where somehow "return" completely failed, but at the same time gdb didn't warn about it. Maybe it can't really happen and it's just a defensive test. Or maybe things changed since it was written and nobody noticed to update the test. Hannes> If any of this correct, then I will send a proper patch again (and maybe I Hannes> should split the argument part into its own patch), if not, please advise. I think it looks pretty reasonable, especially if it is making failing tests now pass :) Hannes> T foo = '1', L; Hannes> +T init = '9'; Hannes> - Fun(foo); Hannes> + Fun(init); I didn't understand the need for these parts. Hannes> +# On Windows, you can't replace the executable if it is still running. Hannes> +gdb_exit Hannes> +gdb_start This seems like something that could go in immediately. thanks, Tom