From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92720 invoked by alias); 16 Apr 2019 16:39:33 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 92705 invoked by uid 89); 16 Apr 2019 16:39:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-9.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=H*RU:cmsmtp, HX-Languages-Length:1351, HX-Spam-Relays-External:cmsmtp, H*r:cmsmtp X-HELO: gateway24.websitewelcome.com Received: from gateway24.websitewelcome.com (HELO gateway24.websitewelcome.com) (192.185.51.61) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 16 Apr 2019 16:39:31 +0000 Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway24.websitewelcome.com (Postfix) with ESMTP id 0F202828CE for ; Tue, 16 Apr 2019 11:39:30 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id GR7Jh3v5F2qH7GR7JhPow4; Tue, 16 Apr 2019 11:39:30 -0500 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=rurNiUhI13H5Ogya3hfboXeTVCdijDEc1GQQD6sXCak=; b=ZNm/HsjXdXhO/TgG7C3JXtGDor CGhlsBiql7HKS0qcC+YnjXvCyRA0/vonQmbUT3VhJaeKqydKpj7BUNgIT3o11mc3SOqevGYrgjNZY y0BKh9hUAgU4rwj1FZzebf20P; Received: from 75-166-39-124.hlrn.qwest.net ([75.166.39.124]:43822 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1hGR7J-002z4a-1R; Tue, 16 Apr 2019 11:39:29 -0500 From: Tom Tromey To: "Leszek Swirski via gdb-patches" Cc: Leszek Swirski , palves@redhat.com Subject: Re: [PATCH v3] [amd64] Fix AMD64 return value ABI in expression evaluation References: <20190214151602.147300-1-leszeks@google.com> <20190214151810.149322-1-leszeks@google.com> Date: Tue, 16 Apr 2019 16:39:00 -0000 In-Reply-To: <20190214151810.149322-1-leszeks@google.com> (Leszek Swirski via gdb-patches's message of "Thu, 14 Feb 2019 16:18:10 +0100") Message-ID: <87v9zducov.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-04/txt/msg00272.txt.bz2 >>>>> ">" == Leszek Swirski via gdb-patches writes: >> This ABI mismatch resulted in issues when calling a function that returns >> a class of size <16 bytes which has a base class, including issues such >> as the "this" pointer being incorrect (as it was passed as the second >> argument rather than the first). I'm still looking into the problem, but this regressed an internal test case here at AdaCore. In particular, this patch doesn't seem to treat bitfields the same way that gcc does. >> * amd64-tdep.c (amd64_classify_aggregate): Use cp_pass_by_reference >> rather than a hand-rolled POD check when checking for forced MEMORY >> classification. This mentions cp_pass_by_reference but the patch doesn't actually introduce a call to this function. >> - /* 1. If the size of an object is larger than two eightbytes, or in >> - C++, is a non-POD structure or union type, or contains >> + /* 1. If the size of an object is larger than two eightbytes, or it has >> unaligned fields, it has class memory. */ This area seems to differ between gcc and gdb as well. The psABI mentions using 8 eightbytes here, but then has a complicated footnote about the post-merge cleanup, so I'm not certain if gcc and gdb always agree in practice. Tom