From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 41814 invoked by alias); 30 May 2017 08:27:46 -0000 Mailing-List: contact libffi-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libffi-discuss-owner@sourceware.org Received: (qmail 41804 invoked by uid 89); 30 May 2017 08:27:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=HTo:U*libffi-discuss, Ltd, ltd X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 30 May 2017 08:27:44 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E7B608123F for ; Tue, 30 May 2017 08:27:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E7B608123F Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=aph@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E7B608123F Received: from zebedee.pink (unknown [10.40.205.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3FEC45DC1F; Tue, 30 May 2017 08:27:45 +0000 (UTC) Subject: Re: Also: problem with return value in ffi_call on PPC64. To: libffi-discuss@sourceware.org References: From: Andrew Haley Message-ID: <2cca1ce1-3ccb-843a-347e-bd2eaa60ca97@redhat.com> Date: Tue, 30 May 2017 08:27:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017/txt/msg00014.txt.bz2 On 28/05/17 02:36, Kaz Kylheku (libffi) wrote: > Are users supposed to assume that the return value has been widened to a > register-wide (8 byte) value regardless of its declared FFI type? Yes. > Why doesn't that convention apply to the arguments, then? When dup is > being called above, the int value is being written at the bottom of the > argument buffer, not displaced by four bytes. It's more of a historical accident than anything planned. But it's not important enough to break backwards compatibility. -- Andrew Haley Java Platform Lead Engineer Red Hat UK Ltd. EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671